Fixing filter button in marker hover panel#5718
Conversation
|
@canova would love a review when you get a chance. Thanks! |
canova
left a comment
There was a problem hiding this comment.
Sorry for the late review. It was pretty busy last week and I could only look at it today. And thanks for the PR!
It makes sense to have this prop and set it in these components. But I think the value of showFilterButton === undefined being interpreted as true is a bit unusual. I would prefer to have a readonly hideFilterButton?: boolean; prop, with its default showFilterButton === undefined meaning false. And then we need to invert the boolean values in the components.
Also, I think it would be good to have some an explicit hideFilterButton={true} here:
With a comment on top of it, saying something like this: "Network Chart doesn't have sticky tooltips yet. But we should convert it to false once we implement sticky tooltips for the network chart."
Also I think it would make sense to have a test for this. Could you write a simple test inside src/test/components/Marker.test.tsx assigning true and false values and asserting if we have the button or not?
Thanks for the patience and for the contribution!
| > | ||
| ( | ||
| 1.58 kB | ||
| 1.59 kB |
There was a problem hiding this comment.
Interesting, the CI wants to revert these changes. I tried it locally and these test also fail locally in my machine. What does it do in your machine when you run yarn test? You might want to update the dependencies with yarn install and do a yarn test -u to update the snapshots.
0a97b77 to
a8f25cc
Compare
|
@canova No worries at all — and thank you so much for the detailed review, I really appreciate you taking the time to go through this so thoroughly! Your suggestions make a lot of sense. I updated the prop to use a hideFilterButton?: boolean with clearer defaults, add the explicit usage and comment in NetworkChartRow, and also add a small test to cover both true/false cases as suggested. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5718 +/- ##
=======================================
Coverage 85.64% 85.64%
=======================================
Files 313 313
Lines 31013 31016 +3
Branches 8535 8538 +3
=======================================
+ Hits 26562 26565 +3
Misses 4021 4021
Partials 430 430 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
canova
left a comment
There was a problem hiding this comment.
Thanks for the PR, looks great to me!
I'll remove the WIP from the title and land it.
| beforeEach(() => { | ||
| (compress as any).mockResolvedValue(new Uint8Array(FIXED_GZIP_BYTES)); | ||
| }); |
Lots of exciting changes 🎉: [arai-a] Put radio buttons into labels (#5738) [DaniPopes] Update comment for "unique-string" (#5741) [Karan Pradhan] Hide tooltip filter button in non-sticky tooltips and add hideFilterButton tests (#5718) [arai-a] Add a menu to copy the Marker Table as text (#5732) [arai-a] Make the entire list item clickable for the "Full Range" (#5742) [Markus Stange] Move symbol table demangling out of SymbolStore into SymbolProvider (#5746) [Markus Stange] Remove SVG asset imports from profile-data.ts (#5747) [arai-a] Do not apply sticky tooltip on double click (#5754) [arai-a] Skip the ChartCanvas redraw on the Viewport's internal default state usage (#5744) [Markus Stange] Stop blindly extracting uint8array.buffer after calling compress() (#5753) [Markus Stange] In the assembly view state, refer to the current symbol by index (#5755) [Markus Stange] Fix "scroll to hotspot" functionality in the source view + assembly view (#5759) [Markus Stange] Keep the colorField markerSchema field when processing profiles in the gecko format (#5760) [Markus Stange] Implement dark mode (#5740) [Markus Stange] Fix light-mode colors (#5765) [Markus Stange] Tweak dark mode colours. (#5767) [Nazım Can Altınova] Enable some basic type-aware lints (#5775) [Markus Stange] Allow seeing different assembly code for the same function (#5349) [fatadel] Refine tree view a11y (#5779) [fatadel] Align double-click behavior of stack chart with flame graph (#5782) [Markus Stange] Split gz.ts properly into node and browser variants (#5764) [Markus Stange] Simplify and optimize the computation of per-call-node line and address timings (#5770) [Nazım Can Altınova] Move the dark mode toggle to devtools console (#5783) [Nazım Can Altınova] 🔃 Sync: l10n -> main (Jan 27, 2026) (#5785) [Nazım Can Altınova] Improve Chrome importer marker payload logic (#5717) [Markus Stange] Add a Focus Self transform (#5774) [Nazım Can Altınova] Enable the Turkish locale in production (#5786) And huge thanks to our localizers 🎉 : be: Mikalai Udodau de: Ger de: Michael Köhler el: Jim Spentzos en-CA: chutten en-CA: Saurabh en-GB: Ian Neal en-GB: Saurabh es-CL: ravmn fy-NL, nl: Fjoerfoks fr: Skywarp fr: Théo Chevalier fur: Fabio Tomat fy-NL: Fjoerfoks ia: Melo46 it: Francesco Lodolo [:flod] nl: Fjoerfoks nl: Mark Heijl pt-BR: Marcelo Ghelman ru: berry ru: Valery Ledovskoy sv-SE: Andreas Pettersson tr: Grk zh-CN: Olvcpr423 zh-CN: wxie zh-TW: Pin-guang Chen
Closes: #5704
Tooltip Filter Button Default Behavior
Changes
showFilterButton = trueinsrc/components/tooltip/Marker.tsx.showFilterButton={false}in:src/components/timeline/Markers.tsxsrc/components/timeline/TrackNetwork.tsxsrc/components/timeline/TrackCustomMarkerGraph.tsxsrc/components/marker-chart/Canvas.tsx.Tests
src/test/components/__snapshots__/TrackCustomMarker.test.tsx.snapsrc/test/components/__snapshots__/TrackNetwork.test.tsx.snapsrc/test/components/__snapshots__/MenuButtons.test.tsx.snap