feat(call-tree): apply theme colours to Name column#782
Open
FishOfPrey wants to merge 2 commits into
Open
Conversation
Colours the Name cell in all three Call Tree views (Time Order, Aggregated, Bottom-Up) using the same category colours as the flame graph, consistent with the active timeline theme. Each row gets a CSS class derived from its event category (e.g. `row-cat-dml`). CSS custom properties set on the host element map those classes to the current theme colours, so switching themes updates all rows instantly without a table redraw. Closes certinia#734 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ting Replaces the full background+text colouring with a 6px coloured border-left chip on the Name column by default. Adds a `lana.callTree.categoryColourise` boolean VS Code setting (default false). When enabled, the full background tint and text colour are applied via a `.category-colourise` host class, matching the reviewer's request for opt-in full colouring. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
@lcottercertinia I've updated the PR as requested to make the default colouring more subtle with a chip/border to the left of each row. There is also a setting to enable the more colourful option if desired. 🌈 😃 Subtle Mode
Extension Setting
Rainbow Mode
|
Author
Author
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.





📝 PR Overview
Colours the Name cell in all three Call Tree views (Time Order, Aggregated, Bottom-Up) using the same category colours as the flame graph, consistent with the active timeline theme.
Each row gets a CSS class derived from its event category (e.g.
row-cat-dml). CSS custom properties set on the host element map those classes to the current theme colours, so switching themes updates all rows instantly without a table redraw.🛠️ Changes made
CalltreeView.ts
connectedCallbackthat reads the active theme from settings on load and listens forswitchTimelineThememessages to stay in sync with the timeline_applyThemewhich sets 8 CSS custom properties (--ct-color-apex,--ct-color-dml, etc.) on the host element usinggetTheme()_rowFormatterwhich stamps a category CSS class (e.g.row-cat-dml) onto each Tabulator row based onoriginalData.category.datagrid-code-text) in each row_rowFormatterto all three table creation calls (Time Order, Aggregated, Bottom-Up)TableShared.ts
rowFormattercallback to theTableCallbacksinterfaceTimeOrderTable.ts, AggregatedTable.ts, BottomUpTable.ts
callbacks.rowFormatterthrough to the Tabulator optionsDesign notes
category.toLowerCase().replace(' ', '-')) so no lookup table or lint suppression is required🧩 Type of change (check all applicable)
📷 Screenshots / gifs / video [optional]
🔗 Related Issues
Closes #734
✅ Tests added?
📚 Docs updated?
Anything else we need to know? [optional]