Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow truncating SVG in AppNodeText #945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptgolden
Copy link
Member

Labels in the phenogrid were previously rendered as <text> SVG elements, rather than <AppNodeText> Vue elements which whitelist certain markup. This replaces those text elements with AppNodeText elements.

An issue, though, is that labels were previously truncated based on their bare text length. So the string 'label<b>with bolded</b>' might be truncated to 'label<b' or 'label<b>with bo' rather than 'label with bo' (where "with bo" would be bolded).

This PR fixes that bug by truncating text according to its length as it appears in rendered SVG.

Fixes the bug mentioned in #943 (comment).

Additionally, use AppNodeText for SVG labels
Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for monarch-app ready!

Name Link
🔨 Latest commit 877ffa1
🔍 Latest deploy log https://app.netlify.com/sites/monarch-app/deploys/679bdaa87a6696000827642e
😎 Deploy Preview https://deploy-preview-945--monarch-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.97%. Comparing base (b953722) to head (877ffa1).
Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #945      +/-   ##
==========================================
+ Coverage   70.75%   70.97%   +0.21%     
==========================================
  Files          91       91              
  Lines        3084     3128      +44     
==========================================
+ Hits         2182     2220      +38     
- Misses        902      908       +6     

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

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