-
Notifications
You must be signed in to change notification settings - Fork 733
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
Learning activity bar truncation and alignment fixes #8747
Learning activity bar truncation and alignment fixes #8747
Conversation
to make it cooperate with truncation via text ellipsis
The text truncator component is sometimes used in <span>s and it's not valid to have block elements inside of inline elements.
`KLabeledIcon`s calculation of label's max-width seems to be the main cause of the resource title being truncated all the time in Internet Explorer 11 (reported as part of learningequality#8678)
`width: auto` was breaking the title truncation in Internet Explorer 11 since with this width settings the title was overflowing the container even when it should already be truncated and ellipsis was never displayed. It seems that the main reason of using `width: auto` was displaying the progress icon right to the title without any gap in between. For that purpose using `flex-grow: 0` works too and it doesn't break truncation in IE.
Fixes an issue when controls were displayed outside of the toolbar when a resource had a very long title
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.
Tested also on Firefox and Chrome clients on Android 9, looking great! Thank you 🙂
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.
Code changes make sense to me, and the cross browser experience looks solid!
Summary
Fixes a couple of truncation and alignment problems in the learning activity bar.
(1) Replaces
TextTruncator
withTextTruncatorCss
on this opportunity to avoid investigating issues in the environment using a component that may soon be obsolete as we agreed to move towardsTextTruncatorCss
everywhere.(2) Fixes ellipsis not being applied when it should and being applied when it shouldn't. Some issues occurred in all browsers, some were IE specific. See commit messages and code comments for details.
(3) Fixes an issue with overflowing controls on the right side of the bar when a resource title is very long:
References
Fixes #8678
Reviewer guidance
In all browsers
Please double-check in Internet Explorer. Note that some icons may not be visible all the time, e.g. the progress and completion icons become visible only after a resource has been started.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)