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

fix: Dropdown of filterable columns not always visible #2400 #2414

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

dbranley
Copy link
Contributor

@dbranley dbranley commented Oct 2, 2024

The PR fulfills these requirements: (check all the apply)

  • It's submitted to the main branch.
  • When resolving a specific issue, it's referenced in the PR's title (e.g. feat: Add a button #xxx, where "xxx" is the issue number).
  • When resolving a specific issue, the PR description includes Closes #xxx, where "xxx" is the issue number.
  • If changes were made to ui folder, unit tests (make test) still pass.
  • New/updated tests are included

Closes #2400

I have fixed this bug, which was a regression that I introduced in PR #2371.

This was resolved by adding wrapping the column name in a span and adding styling to hide overflow text and replace with an ellipsis. The code looks like this:

      <span style={{ textOverflow: 'ellipsis', overflow: 'hidden' }}>{props.column.name}</span>

I made local changes to the table.py example to have some really long names and made sure the text is properly clipped and that sorting icon and filtering stuff still works fine. Here's a screen shot:

Issue2400_ui_test

And here's a short video:

Issue2400_ui_test.mov

I tried creating a new unit test, but that didn't work as I initially expected. No matter how long the column name was, the document always had the entire content. I guess that makes sense since the rendering of the ellipses will occur in the browser. If I'm overlooking something and there is a way to write a unit test for this, please advise.

I did re-run all the existing unit tests and they worked fine:

Issue2400_unit_tests

Let me know if you have any questions or would like me to make any changes. Thanks!

Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @dbranley!

@mturoci mturoci merged commit 7bd8845 into h2oai:main Oct 3, 2024
@dbranley dbranley deleted the fix/issue-2400 branch October 3, 2024 14:48
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.

Dropdown of filterable columns not always visible and missing hinting dots for long column names
2 participants