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

Made text on buttons in SectionTableBody not wrap #998

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dlacuata
Copy link

Summary

Made text on buttons in the SectionTableBody not wrap to prevent resizing

Test Plan

Made sure buttons didn't resize when they shrink under a certain min-width. Text will not wrap and the overflow will be hidden for long course names

image

Issues

Closes #729

@KevinWu098 KevinWu098 self-requested a review August 15, 2024 16:34
Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR (sorry for the slow review)! This styling problem has been bugging me for ages, so really appreciate the work here.

I've left some comments regarding styling/the specific CSS we're using. Also, make sure that the buttons end up scrolling when overflowing (like how the rows scroll rather than overflow their section)

Also, the original issue also mentions fixing the Department and School cards SchoolDeptCard. If you'd like, you can break that out into a separate PR (make sure to note that on the original issue), or to bring that into this PR as well!

>
{`${deptCode} ${courseNumber} | ${courseTitle}`}
<span
style={{ whiteSpace: 'nowrap', overflow: 'hidden', textAlign: 'left' }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
style={{ whiteSpace: 'nowrap', overflow: 'hidden', textAlign: 'left' }}
style={{ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', }}

No need to align text left, but we do want there to be visual indicator of overflow, which we can do with textOverflow: 'ellipsis'

@github-actions github-actions bot added the Stale label Sep 20, 2024
@KevinWu098
Copy link
Member

KevinWu098 commented Sep 26, 2024

Hey, just checking in on this PR! Is it ready for re-review or are you still working on it @dlacuata ?

@github-actions github-actions bot removed the Stale label Sep 26, 2024
@dlacuata
Copy link
Author

Hey, just checking in on this PR! Is it ready for re-review or are you still working on it @dlacuata ?

Oh yes I am still working on it, sorry for the delay, I was on vacation for a few weeks and wasn't able to work on it then. I will be on it ASAP though!

@github-actions github-actions bot added the Stale label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent Text-Wrap in SectionTableBody and the Department Card Component
2 participants