Skip to content

Move timeline marker styles into marker schemas - #6293

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

Move timeline marker styles into marker schemas#6293
fatadel wants to merge 2 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

Marker styles use methods to resolve theme-dependent colors, which
cannot be serialized as marker schema metadata. Store only color data
in each style and resolve it when drawing timeline markers.
@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 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.83%. Comparing base (7abc8b8) to head (07edfc7).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/components/timeline/Markers.tsx 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6293      +/-   ##
==========================================
+ Coverage   83.82%   83.83%   +0.01%     
==========================================
  Files         350      350              
  Lines       37744    37742       -2     
  Branches    10646    10647       +1     
==========================================
+ Hits        31638    31641       +3     
+ Misses       5677     5672       -5     
  Partials      429      429              

☔ 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.

Timeline rendering selects styles from a hardcoded table keyed by
marker `data.type`. Putting the style in each schema removes that
type-specific lookup and lets producers define marker appearance.
@canova
canova removed their request for review September 3, 2026 14:36
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

1 participant