-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] CSS Code Hinting as new extension for Brackets #2382
Comments
Comment by redmunds Andre, Thank you for this awesome contribution to Brackets. Also, thanks for changing your code as we changed the API. Some of the changes we made to the API were based on feedback we received from you, so hopefully it helped make the code better for everyone. Let us know if you have any suggestions for improvements to the API. I started by testing out the extension, so I have some comments about how it works based on my expectations. Let us know if you disagree with any of my assumptions. Also, let us know if any of the requests are not possible, or more difficult than they should be, using the existing API. Thanks, |
Comment by redmunds When the entire (unfiltered) properties list pops up, there is a horizontal scroll bar. I'm pretty sure this requires a fix to the core Brackets code (not part of the API). List should auto-stretch to the width of the content, so there is no need for an API. UPDATE: I opened issue adobe/brackets#2532 for this. |
Comment by redmunds Here's a case where I expect the properties list to automatically pop up, but it doesn't. When starting a new rule, I type:
I expect the property list to popup after typing the "{". |
Comment by redmunds Another case where I expect property list to automatically pop up is when adding a new property to an existing rule, for example:
If I place insertion pointer (IP) at end of line with "color: red;" and press Enter, I expect property list to pop up. Note that his works if I press space. It also doesn't work for Tab. |
Comment by redmunds Yet another case where I expect property list to automatically pop up is after selecting a value from list. For example:
If I place IP after "text-align" and press ":" the list of values pops up. Very nice. But after I select something from the list, ";" is automatically added to the end, but the property list does not pop up. Interesting that if I type in the value and press ";" then I do get the |
Comment by redmunds When either property or value list is popped up, the first item is selected. This causes the first item to be selected if user presses Enter or Tab to add whitespace to page. We put in a parameter just handle this specific case, so let us know if it's not working correctly. |
Comment by redmunds After selecting a property from list, the ":" is automatically added. This is always needed, so this is perfect. But, a space char is also added. Whitespace is optional in this case, and some people don't want it, so this shouldn't be added automatically. Note that this would be a nice preference to have, but it needs to be left off for now. |
Comment by redmunds Those are all of the comments I have about how extension works. After those are resolved, I'll take a closer look at the code. Thanks for a nice set of unit tests! |
Comment by peterflynn
Although certainly we should fix the bug where you get value instead of property hints after typing the semicolon -- I wonder if that could be a bug in CSSUtils? |
Comment by redmunds
Regarding my comment about ";" should not be added, thanks for reminding me that case is out of scope. But, I still think that it's a simpler solution in addition to solving an inevitable future case. So, |
Comment by zoufahl Hi there, Some thoughts on the comments:
if ((event.keyCode !== 32 && event.ctrlKey) || event.altKey || event.metaKey) {
// End the session if the user presses any key with a modifier (other than Ctrl+Space).
_endSession();
} So this is not possible at the moment :(
|
Comment by redmunds This is looking good. Only a few more comments. |
Comment by redmunds Filed adobe/brackets#2539 for German keyboard issue. |
Comment by zoufahl I just adjusted the unittest-descriptions and fixed the remaining bugs. |
Comment by redmunds This looks great. Thanks for sticking with this complicated feature. Merging into master. |
Issue by zoufahl
Wednesday Jan 09, 2013 at 20:15 GMT
Originally opened as adobe/brackets#2498
This extension adds basic CSS Code Hinting for Brackets. (similar to HTML Code Hinting), but uses more keys to trigger the hinting.
It differentiates between primary (alphabet) and secondary (whitespace, (semi-)colon) trigger keys to distinguish whether hints should be selected initially or not.
Works in *.css files and style-blocks in html-files
Does not work in inline-css yet, due to limited tokenizing.
Hope I didn't missed a propertyname/-value, else let me know.
zoufahl included the following code: https://github.com/adobe/brackets/pull/2498/commits
The text was updated successfully, but these errors were encountered: