-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New emmet: css property width expands to widows
??
#28933
Comments
I am having a deja vu :)
This is coming from the way snippets are defined in https://github.com/emmetio/snippets/blob/master/css.json @sergeche thoughts? cc @sergeche |
but then I would expect that the label updates too... |
Not sure what expected behaviour should be if you type full property name and try to expand it as Emmet abbreviation. CSS itself has too much clashing properties/abbreviations. The goal of shortcuts is to provide shorthands for most commonly used properties. Users should learn these shortcuts by typing first letters and seeing autocomplete popup with available options. If the full property names will be considered in abbreviation resolving, they will collide with shorthands, especially ones with embedded shorthand values, like So the ultimate goal is to provide matched snippets and expanded abbreviation with previews |
Another example: User expectation would be to match "padding" @sergeche In this case the only match between "padd" and the suggested shorthand "pgba" is the first letter "p". Aren't we being too eager while matching here? |
Indeed, this eager matching to the Emmet shorthands severely breaks (this) user expectations. When I have almost complete property name, like "borde", "paddin", "margi", etc, I would assume that VS Code does the right thing and expands these widely-used properties. Instead, I get completely random and unrelated (at least that's how it looks) suggestions from Emmet. My expectation would be that Emmet's suggestions should not always be the number 1 in the suggestion list, and sometimes they should be ranked lower as compared to the almost fully-matched widely used properties. Suggesting "pgba" shorthand as a top choice for "paddin" is just wrong (at least, to me). |
One solution I have in mind here is for the css completion provider (from the css extension that is built in) to call the emmet completion provider (See #29114 (comment)) instead of the emmet extension. As the css extension will also have in hand the other suggestions, it can add some logic to filter/sort appropriately. I'll look into that next week. Until then, I am pushing the below changes
The changes will be out in Monday's Insiders build. Please give it a try then and let me know how the improvements work out for you. Again, thanks for all the feedback! |
temporary fixed with microsoft/vscode-emmet-helper@2bbf018 |
I have logged #29113 to track the work of moving emmet completion provider to css language service. Closing this issue for the June milestone as the improvements listed in #28933 (comment) should help most of the cases. |
Note to verifier:
|
Hi @ramya-rao-a , many thanks for the improvements, they significantly improve the user experience w.r.t editing CSS/SCSS files! The sorting of the suggestions is much, much better now. There is one issue though (actually two), regarding snippets. == Issue 1 == I type 'b' and see the following: The help for my snippet == Issue 2 == When I type the full name of the snippet, Should I file separate issues for that? |
I'm still running into issues with emmet and specifically the
Gif below to show what I'm seeing... |
@ekfuhrmann You can set a custom emmet snippet for
See Using Custom Snippets in Emmet Or you can take advantage of emmet and instead of typing |
(1 theme extensions excluded)
have fun.
// cc @ramya-rao-a
The text was updated successfully, but these errors were encountered: