-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix: pageheader subtitle truncation visibility #6551
fix: pageheader subtitle truncation visibility #6551
Conversation
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
even using just wanted to get some opinions on all this because it turned out to be more complicated than i thought 😅 |
updated the subtitle to use |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6551 +/- ##
==========================================
- Coverage 80.06% 80.05% -0.01%
==========================================
Files 394 395 +1
Lines 12907 12911 +4
Branches 4277 4278 +1
==========================================
+ Hits 10334 10336 +2
- Misses 2573 2575 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long text in subtitle breaks styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @davidmenendez, It looks like the styles and tooltip are breaking when we update the subtitle using the controls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good. However found this behaviour , but not sure is really applicable to adopter. However , could not see this issue for title
Screen.Recording.2024-12-09.at.4.46.58.PM.mov
@anamikaanu96 @makafsal @amal-k-joy thank you for catching this. i realized that my problem was that i wasn't accounting for calculating the overflow by height. i refactored my code to take that into consideration for subtitle. |
i know this needs to include testing, but i wanted to get feedback on the implementation of this solution. specifically with regards to would love to get y'all's opinion on this! |
Solution looks good to me , since we we clamping vertically based on number of lines, its sensible to check for height overflow in case of title. |
packages/ibm-products-styles/src/components/PageHeader/_page-header.scss
Outdated
Show resolved
Hide resolved
to be honest i struggled a bit with naming convention here and i think it's because i got too caught up in maintaining the "normal" vs "overflow" refs, but now that i think about it those could (should) be done in the component instead of the utility. |
packages/ibm-products/src/global/js/utils/replaceWithOverflow.ts
Outdated
Show resolved
Hide resolved
tests have been added 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work .
26394dd
also for #6636 |
Closes #6534
two issues i'd like to point out
StringFormatter
needs to be updated to be TypeScriptStringFormatter
doesn't dynamically hide the overflow text. I'm not sure if we have an alternative toStringFormatter
that can display the text without making the popover always visible. would like some thoughts on this.