Bug 57954 - Enhancement: Warn users when resource names start with uppercase letters
Summary: Enhancement: Warn users when resource names start with uppercase letters
Status: RESOLVED ANSWERED
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
URL:
Depends on:
Blocks:
 
Reported: 2017-07-05 17:59 UTC by John Miller [MSFT]
Modified: 2018-01-09 20:47 UTC (History)
5 users (show)

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


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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

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.

https://github.com/mono/monodevelop/blob/2e8d751aef81752800ac646c5938f06367ccb69b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs#L474-L476

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