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

[FE-17481] Preven table sorting option from being hidden #669

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

Conversation

cmatzenbach
Copy link
Contributor

@cmatzenbach cmatzenbach commented May 17, 2024

💬 Description

Fixes issue where if table chart was resized to a small size, the column alignment buttons would float over the column name and sort button. Now the alignment buttons will move as close as they can to the column title before getting cut off. Moved these buttons to their own wrapper, with a flexbox layout and less padding so the buttons can get closer to the column title before being cut off.

📄 Jira Issue

Closes FE-17481

🔍 Verification Steps

  1. Follow repro steps in corresponding jira ticket
  2. Ensure the alignment buttons no longer overlay over the sort button and you can still sort a column when the table is resized to be very small.

📸 Screenshot

FE-17481.mp4

height: 24px;
position: absolute;
min-width: 18px;
min-height: 24px;
right: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need these positioning properties top/right if using flex to position

scss/chart.scss Outdated
height: 24px;
position: absolute;
min-width: 18px;
min-height: 24px;
right: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

whoops i mean here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed

@mapd-bot-os
Copy link

build succeeded

@mapd-bot-os
Copy link

build succeeded

@johallar
Copy link
Contributor

I noticed the text alignment controls can overflow and be hidden, we should probably make sure the min column width accommodates the sorting and the alignment controls:

Screen Shot 2024-05-20 at 8 48 35 AM

@mapd-bot-os
Copy link

build succeeded

@cmatzenbach
Copy link
Contributor Author

I noticed the text alignment controls can overflow and be hidden, we should probably make sure the min column width accommodates the sorting and the alignment controls:
Screen Shot 2024-05-20 at 8 48 35 AM

@johallar Ok, after spending hours playing around with this, unfortunately we can't do it with CSS. D3 is manually setting the size of the header and table cells on the elements when you re-size, and it has a set min-width it will only go to. By setting a min-width on the header, the header becomes mis-aligned with the table columns. We also can't decide on a standard min-width since the column names for the header vary in size. I tried to make it respect the elements present in that container (i.e. the sort buttons, column names, and alignment buttons) but the only way I could get it close was a lot of hacky manual resizing with d3 code, nothing worked with css. I'll open an UI improvement ticket that can be worked on later, as this at least solves the bug and offers an improvement over current UX.

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.

None yet

3 participants