Skip to content

Conversation

@M-Kusumgar
Copy link
Collaborator

@M-Kusumgar M-Kusumgar commented Feb 9, 2026

the general strategy is to collect up all the labels that can appear on the legend (excluded those that are hidden in the graph config) and fill in a paragraph tag one by one and find the longest width, we then set the legend text width equal to that

this should ensure that the legend width is the same across all different graphs and never longer than it needs to be because it ignores hidden variables

unfortunately, this is another one of those features thats hard to test, i cant really test the width value at all because the width depends on font family, font size, text content, which can all change, a test that checks the numerical value of the width is far too brittle

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 62.50000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.31%. Comparing base (cdf98e3) to head (986dee9).

Files with missing lines Patch % Lines
app/static/src/components/WodinLegend.vue 62.50% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           mrc-6446     #257      +/-   ##
============================================
- Coverage     99.51%   99.31%   -0.20%     
============================================
  Files           190      190              
  Lines          4524     4548      +24     
  Branches       1006     1015       +9     
============================================
+ Hits           4502     4517      +15     
- Misses           19       25       +6     
- Partials          3        6       +3     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this test failed because we hardcoded tick values but these change because of the width of the plot, so i am just testing that the tick values have changed and they are the same across all the different graphs, i think its a less brittle test

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.

1 participant