Bug 57954 - Enhancement: Warn users when resource names start with uppercase letters
Summary: Enhancement: Warn users when resource names start with uppercase letters
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in (show other bugs)
Version: 7.0 (VSforMac)
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Cody Russell
Depends on:
Reported: 2017-07-05 17:59 UTC by John Miller [MSFT]
Modified: 2018-01-09 20:47 UTC (History)
5 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:

Screenshot of Android Studio error (25.35 KB, image/png)
2017-07-05 17:59 UTC, John Miller [MSFT]

Description John Miller [MSFT] 2017-07-05 17:59:05 UTC
Created attachment 23308 [details]
Screenshot of Android Studio error

## Overview

Using uppercase letters for android layout files can cause issues. See: https://bugzilla.xamarin.com/show_bug.cgi?id=47441

When working in Android Studio, there is an error if you try to title a layout file with an uppercase letter. See attached photo. 

## Suggestion

Add a similar feature of letting the user know that this is invalid to help reduce the chance of creating issues like in Bug #47411.
Comment 1 David Karlaš 2017-07-06 04:52:30 UTC
I'm confirming this and assigning to 15.4, but feel free to move to 15.5 if it's too much work since it's enhancement.
Comment 2 Greg Munn 2017-07-06 14:19:36 UTC
@Matt, is this something that's doable in the new file dialog? Do you know? Asking since you did the work on the new project dialog.
Comment 3 Matt Ward 2017-07-06 14:45:08 UTC
Looking at the code the OK button can be disabled if the file name is considered not valid.


But there is no explanation shown in the dialog as to why the OK button is disabled. Which is not going to be that good a user experience. Ideally the dialog would show a label somewhere, similar to Android Studio does.

It looks like a custom FileDescriptionTemplate or a custom FileTemplate would be needed with a custom implementation of the IsValidName method.
Comment 4 Greg Munn 2017-07-06 14:49:51 UTC
Thanks Matt. I think this will have to wait for 15.5 since 15.4 is too close and this is technically an enhancement
Comment 5 Ashley Gazich [MSFT] 2018-01-09 20:47:59 UTC
Now tracked as an internal backlog work item on https://devdiv.visualstudio.com/DevDiv/_workitems/edit/549350

Note You need to log in before you can comment on or make changes to this bug.