Adapt time-slice selection in High Contrast Mode. #5259
Conversation
|
I'm curious about your opinion on the second commit to have more control hover the icon colors |
6fd0211 to
5e53575
Compare
|
I think the filter solution is fine but you could use <filter id="--button-icon-color" color-interpolation-filters="sRGB">
<feFlood flood-color="red"/>
<feComposite operator="in" in2="SourceAlpha"/>
</filter> |
|
Oh, I found an even better solution! You can use <filter id="--use-fill-color" color-interpolation-filters="sRGB">
<feComposite operator="in" in="FillPaint" in2="SourceAlpha"/>
</filter>fill: green;
filter: url(#--use-fill-color); |
Unfortunately this doesn't seem to work in Chromium browser. Would have been nice!
Ah yes that's better, I'll do that |
5e53575 to
5c75e6b
Compare
|
I don't really know flow, so not sure what's needed to please it here |
julienw
left a comment
There was a problem hiding this comment.
I'm very newbie in terms of SVG filters. I looked at MDN but still I'm not sure I fully understand how filters work, but I'm not opposed.
I was a bit afraid that @property doesn't work in the old ESR, can you double check that the button still works as expected in that version? I don't mind that the forced-colors version doesn't work properly there, but at least the main way of working should work.
Thanks!
You mean current ESR (128) or the previous one (115) ? |
yeah I meant v115, as far as I understand it's still supported. |
Make sure the start and end grips look like button, make the outbound of the selection even dimmer and add border to make the selection super obvious.
testing this I realized I don't even need |
3aecec9 to
a32e0fa
Compare
|
@julienw I checked on ESR 115 and everything seems to be okay, and I think I addressed all the comments you added, so this should be good for the final review :) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5259 +/- ##
==========================================
- Coverage 86.04% 85.97% -0.07%
==========================================
Files 311 311
Lines 29809 29832 +23
Branches 8217 8224 +7
==========================================
Hits 25648 25648
- Misses 3575 3593 +18
- Partials 586 591 +5 ☔ View full report in Codecov by Sentry. |
|
not sure what changed that makes codecov unhappy now :/ |
|
don't worry about codecov, it's unhappy because the added code in index.js isn't exercised by the tests. I think that's OK, but if you'd like to exercise it, we would probably need to extract the code to a separate function in a different file (so that we could call it directly), and add something such as https://www.npmjs.com/package/jest-matchmedia-mock. But again I'm not asking for this here :-) |
| --button-icon-hover-color: SelectedItem; | ||
| --button-icon-active-color: SelectedItem; |
There was a problem hiding this comment.
BTW the same than usual still happens: SelectedItem is not great for me in light mode. But out of scope here...
There was a problem hiding this comment.
yeah, I need to reach to the accessibility team to sort this out
We can use CSS variables whose values are extracted and put into SVG filters that we can then apply on top of the icon we use, in CSS. The time-slice zoom icon takes advantage of this new capability to adapt to High Contrast Mode.
a32e0fa to
a42f516
Compare
if that's okay with you, I won't touch it then :) |
Updates: [Julien Wajsberg] Some more small refactorings (#5320) [Markus Stange] Pass the correct sample index offset to getTimingsForCallNodeIndex for the flame graph tooltip. (#5328) [Nisarg Jhaveri] Update docs to include Android Studio/Simpleperf trace file support (#5309) [Markus Stange] Don't pass the preview filtered thread to getTimingsForPath/CallNodeIndex. (#5329) [Nazım Can Altınova] Add a "Sample timestamp" field to the sample tooltip in timeline (#5322) [Markus Stange] Reduce confusion between call tree summary strategy aware samples and regular samples (#5330) [Markus Stange] Rename this getCounter selector to getCounters. (#5337) [Markus Stange] Make sample indexes compatible between the unfiltered and (preview) filtered call tree summary strategy samples when using an allocation strat> [Markus Stange] Remove some code that uses the preview filtered thread (#5336) [Markus Stange] Remove getMarkerSchemaName special cases - look up marker schemas from data.type and nothing else (#5293) [Markus Stange] Remove the makeProfileSerializable step - make the raw in-memory profile match the format that's stored in the file (#5287) [Nicolas Chevobbe] Adapt FilterNavigatorBar to High Contrast Mode. (#5257) [Nicolas Chevobbe] Adapt Tracks to High Contrast Mode. (#5252) [Markus Stange] Adjust string index fields in markers when merging threads (#5344) [Theodoros Nikolaou] Localize title and aria label in ProfileName (#5345) [Julien Wajsberg] Adapt time-slice selection in High Contrast Mode. (#5259) [Markus Stange] Make stackTable (sub)category derived data (#5342) [Markus Stange] Compute cpuRatio values when computing the derived thread (#5288) [Nazım Can Altınova] Add a context menu item to open the JS scripts in DevTools debugger (#5295) Also thanks to our localizers: el: Jim Spentzos fr: Théo Chevalier it: Francesco Lodolo [:flod] zh-TW: Pin-guang Chen
Make sure the start and end grips look like button, make the
outbound of the selection even dimmer and add border to make
the selection super obvious.
Using registered property we can get the rgb component from
given values that we can then turn into SVG filters that
we can then apply on top of the icon we use, in CSS.
The time-slice zoom icon takes advantage of this new capability
to adapt to High Contrast Mode.