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

feature : added truncation and tooltip to patientview timeline track labels #4864

Closed
wants to merge 3 commits into from
Closed

feature : added truncation and tooltip to patientview timeline track labels #4864

wants to merge 3 commits into from

Conversation

anantJjain
Copy link

Fix cBioPortal/cbioportal#10448

Describe changes proposed in this pull request:

  • Used the already existing TruncatedText class/component limiting the maxLength value to 8(for labels with length < = 10) or if label length>10 dividing it by a factor of 1.5 which was previously set to 20 characters long.
  • After getting truncated the text label shows a tooltip(when hovered) displaying the complete track label.
  • Defined a minimum width of the parent div of the span containing the track label based on the length of track label.

Any screenshots or GIFs?

Before:
image

After:
image

Notify reviewers

@alisman @inodb
Kindly check this PR and let me know if I am missing out on something.

Copy link

netlify bot commented Mar 3, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit 2e5691a
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/65e6dc3628f25d00084c0eac
😎 Deploy Preview https://deploy-preview-4864--cbioportalfrontend.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.

@alisman
Copy link
Collaborator

alisman commented Mar 4, 2024

@anantJjain thanks for looking at this. there's still a problem. it seems that the label "pane" width is dynamic but then the labels get truncated inside unnecessarily. see if there's a way

image

@anantJjain
Copy link
Author

anantJjain commented Mar 4, 2024

Sure @alisman,will look into it.

@alisman alisman closed this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Patientview timeline track labels need truncation and tooltips
2 participants