Made the GridOutline component work with only 1 grid at a time.
It already did, but in a not so obvious way.
Removed the setState that happened during the render call to avoid
React warnings.
Cleaned up various data attribute to use the dataset property instead.
Removed the mouseover/out that controled the background color of the
highlighted cells. This now happens in CSS :hover, using currentColor.
Avoided React warnings related to missing "key" props.
Made changes to grid-inspector to avoid loops of re-renders when the
highlighter would highlight a cell on hover.
The component would wait for highlighter's events to dispatch store
actions. Instead, we dispatch them first, then when the events come, we
check if things have really changed! This way, the events will still have
effect if they come from the rule-view for instance, but not if they
come from the grid outline itself.
MozReview-Commit-ID: 6LK8B1P8iMU
Changes:
- Callout now changed to a triangle.
- Finally found a way to make the GCLI window 80% of viewport width (80vw).
- overflow-x is now hidden as the output width should be plenty wide enough to display any text.
The implementation is much prettier and works far better than it previously did. It is still not perfect e.g. when the output is scrollable we lose the triangular callout. I believe this was intentional in an effort to fit as much text in the output box as possible.
MozReview-Commit-ID: 3xEl9nmU47Z
This is easy to test:
Green tick marks (gcli_sec_good.svg) and Red Crosses (gcli_sec_bad.svg):
1. Go to https://csp-evaluator.withgoogle.com/
2. Shift+F2
3. security csp
I couldn't find a way to show the Orange Minus (gcli_sec_moderate.svg) but the path is changed in line with the other images and I did test it programatically so it will be fine.
MozReview-Commit-ID: 5897IV7epax
This is easy to test:
Green tick marks (gcli_sec_good.svg) and Red Crosses (gcli_sec_bad.svg):
1. Go to https://csp-evaluator.withgoogle.com/
2. Shift+F2
3. security csp
I couldn't find a way to show the Orange Minus (gcli_sec_moderate.svg) but the path is changed in line with the other images and I did test it programatically so it will be fine.
MozReview-Commit-ID: 5897IV7epax
This changeset modifies devtools-browser.css to import:
- commandline-browser.css (needed for GCLI)
- responsivedesign.css (needed for the old RDM)
These files are no longer included in the main browser.css files.
devtools-browser.css is also no longer loaded by browser.xul.
Instead it is dynamically loaded when devtools need the browser stylesheet:
- when creating a side or bottom host (need the splitter)
- when opening gcli
- when opening the old responsive design
devtools-browser.js keeps track of the browser stylesheets loaded in the
various tracked windows and will remove the stylesheet when the window is unloaded.
MozReview-Commit-ID: AL3CxS7mvdO
Because we now parse the arguments of console.group like in console.log,
we are using Reps to display the group name. This implies that the Reps
styles are used, which is not something we want for simple text group names.
We add specificity to the existing group rule so we can have the default style back.
MozReview-Commit-ID: A2zrF8ElZGZ