Skip to content

Move timeline marker styles into marker schemas - #6293

Open
fatadel wants to merge 4 commits into
firefox-devtools:mainfrom
fatadel:issue-6292
Open

fatadel wants to merge 4 commits into
firefox-devtools:mainfrom
fatadel:issue-6292

Conversation

@fatadel

@fatadel fatadel commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Timeline marker styles are currently selected from a hardcoded table keyed by marker data.type. The style objects also contain methods, so they cannot be stored as marker schema metadata.

This PR makes marker styles serializable and stores them in marker schemas. Timeline rendering now reads styles from the schemas, while preserving marker-name overrides.

Profile processing and the processed-profile upgrader derive the existing styles for schemas without this metadata. A follow-up Gecko change will populate the style field in Gecko marker schemas.

Closes #6292


Profile

@fatadel
fatadel requested review from canova and mstange September 1, 2026 15:25
@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.96%. Comparing base (e5ea81f) to head (fec4761).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/components/timeline/Markers.tsx 66.66% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6293   +/-   ##
=======================================
  Coverage   84.95%   84.96%           
=======================================
  Files         359      359           
  Lines       39137    39152   +15     
  Branches    11091    11115   +24     
=======================================
+ Hits        33249    33265   +16     
+ Misses       5451     5450    -1     
  Partials      437      437           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fatadel

fatadel commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Bug for the Gecko side - https://bugzilla.mozilla.org/show_bug.cgi?id=2068137.

@canova
canova removed their request for review September 3, 2026 14:36
@fatadel

fatadel commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@mstange A kind reminder for review 😌

@mstange mstange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the somewhat non-actionable feedback here - I'm curious if you have ideas or opinions.

Comment thread src/types/markers.ts Outdated
Comment on lines +146 to +151
top: CssPixels;
height: CssPixels;
background: MarkerSchemaStyleColor;
squareCorners: boolean;
borderLeft: MarkerSchemaStyleColor | null;
borderRight: MarkerSchemaStyleColor | null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the color is worth having. I'm not sure what to do about the other properties. Putting them all in here feels like we're giving profiles too much control over our UI. Also, the existing code is a bit of a mess - nobody has looked at it in a long time and it hasn't been updated as the markers that Firefox emitted changed. For example, I think the RefreshDriverTick doesn't actually apply anymore - either it doesn't match the marker, or the markers ask to not be shown in the timeline (because they're Text markers? not sure) so I think nothing actually uses squareCorners:false.

Maybe as a first pass we should remove marker styles which aren't matching any markers in profiles from modern Firefox anymore? And then we can remove unused marker style properties. And then we can think about whether we want top and height in there.

@canova
canova removed their request for review October 21, 2026 09:42
The optional `color` field takes a graph color and replaces the
background of the marker type's style.
Markers without a valid `colorField` value are drawn in their schema's
`color` instead of the default blue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drive marker styling from marker schemas

2 participants