-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
(?) Any idea when this will add into the main project? |
I am actually 👎 on the "consistent" appearance. Command Palette actually uses keybindings; scope names are not keybindings. Would this be better suited as a tooltip (#42)? |
@50Wliu :
That should not be the overriding argument. It is a functionality/information that is (IMHO) useful to have "close by". I know I would use this. It would be better to have a functionality there and have the community hit heads together on how to make it pretty; in contrast for the community not having such functionality. A tooltip will work if it pops up on the selection list of grammars.. not as shown in link (#42). Counter suggestion - have the scope names be written in the same colour as the background, then when the grammar is selected / mouse pointer hover over it, the colour of the text changes. Very much the same as highlighting text in another colour, but this time it becomes visible. |
@50Wliu - I rather like your newest proposal. My personal view is to have it in the The scope name could be placed in a tooltip.. but that is |
I don't think it works as a tooltip for two reasons: tooltips are used to save space and for supplemental information. This information is something that someone might open the grammar selector in order to find, so making them mouse over the box in order to get that information would be additional work when the proposal was aimed at reducing work. There's also plenty of real estate. Having the scope name be inline with the grammar name is a possibility, but one of the things I like about pushing them over to the right is that it looks better when two different items of information are balanced on either side of the available real estate. Obviously, the most important part is to get the information included, so if the maintainers decide that they want a format with all of the information left-justified, then that's perfectly doable. The scope names are like the keybindings in the sense that both are supplemental information to the primary item of information. You pull up the Command Palette to check keybindings in the same way that you might pull up the Grammar Selector to check scopes, if this feature were implemented. I don't see much difference between the two. |
I went ahead and merged this. The class name Thanks for the contribution @DamnedScholar! |
Description of the Change
It came up on the forum, so I decided that it would be cool if the grammar selector also displayed the
scopeName
for each grammar. This would make it much more convenient for someone to identify the scope selector of a given language than having to go toSettings
,Packages
, wait for the package list to load, and then the package settings page. So I did it.http://puu.sh/toDVZ/02f699229f.png
Alternate Designs
I used precisely the same method as is used to display keybindings in the Command Palette, so that the appearance of the two modals will be consistent. I didn't consider any alternatives.
Benefits
Centralized
scopeName
s, less work for someone to figure out which selector they need for an entry inconfig.cson
,snippets.cson
, orstyles.less
.Possible Drawbacks
I can't conceive of any.