ui: Refactor Flame Graph color mapping logic#5954
Merged
Merged
Conversation
|
✅ Meticulous spotted visual differences in 17 of 590 screens tested, but all differences have already been approved: view differences detected. Meticulous evaluated ~5 hours of user flows against your PR. Last updated for commit 225b3a0. This comment will update as new commits are pushed. |
yomete
commented
Sep 15, 2025
| prevProps.totalWidth === nextProps.totalWidth && | ||
| prevProps.height === nextProps.height && | ||
| prevProps.effectiveDepth === nextProps.effectiveDepth | ||
| prevProps.effectiveDepth === nextProps.effectiveDepth && |
Contributor
Author
There was a problem hiding this comment.
This part fixes the bug where the Flame Graph doesn't get redrawn/recolored when changing the color by value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was an opportunity to consolidate how the mapping files and filenames are used to derive the colors to be used for the Flame Graph.
This PR helps to ensure we're not repeating logic in different components by using the
useProfileMetadataanduseVisualizationStatehooks to get all the coloring data needed and passing it down as props to the components that needs them.It also fixes a bug where if you switch the coloring by from filename to binary and vice versa, the Flame Graph is not immediately re-rendered with the new colors.