Limit QuickView to literal color names in some languages#8156
Limit QuickView to literal color names in some languages#8156redmunds merged 8 commits intoadobe:masterfrom
Conversation
|
I wonder if we should go further and switch to a whitelist -- respecting named colors only in CSS/LESS/SCSS files. I sometimes get the popover on words when editing plain .txt files, for example... |
|
On words, you'll still get a popover (right now). It's currently only disabled for object/array keys and functions. |
|
Definitely want something along these lines. Triage Complete. |
|
@dangoor @SAplayer After a closer look, I'm concerned about performance. Currently, a fair amount of Quick View processing is done during mousemove event processing and this adds a lot parsing using CodeMirror tokenizer. I don't think this pull request should be merged until the Defer most Quick View processing until after delay pull request has been merged. |
|
@redmunds That's ok. But btw, this check is only executed after we have at least one result. |
|
@redmunds @peterflynn FYI, I changed it to a whitelist with only CSS/SASS/SCSS/LESS in it. |
There was a problem hiding this comment.
Drive-by comment: "checkForLiteral()" is a name that leaves things vague about what's returned. Maybe something like "isNamedColor()"?
Similarly for "literalCheck" -- how about "disallowNamedColors" or "ignoreNamedColors"?
There was a problem hiding this comment.
Need to add LESS. FYI, In general Brackets plans to support scss, but not sass, but I guess it's OK if sass is accepted here.
|
Done with review. |
|
Thanks. Merging. |
Limit QuickView to literal color names in some languages
For #6836.
Limits QuickView to only literal color names in JS (including JSON), PHP and CoffeeScript.
Includes Unit tests and one new test file.