-
Notifications
You must be signed in to change notification settings - Fork 4k
Add autosize option to dataframe column menu #10476
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
Conversation
sfc-gh-lwilby
left a comment
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.
LGTM
| open_column_menu(df, 0, "small") | ||
| app.get_by_test_id("stDataFrameColumnMenu").get_by_text("Autosize").click() | ||
| unfocus_dataframe(app) | ||
| # Use the same screenshots as above since we expect the same |
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.
Which screenshot as above? I did not find any screenshot with the same name
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.
Oh, sorry... the comment is wrong here :(
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.
I added a small improvement to the test to ensure that the new dataframe is smaller than the old one
| }) | ||
| }) | ||
|
|
||
| describe("autosize functionality", () => { |
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.
would it somehow be possible to test that autosizing actually works? Maybe by manually setting the width of a column to a certain value, then click on the Autosize button and then compare the widths? Could also be done in an e2e test
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.
It would be very hard to do that in RTL tests, but I added an e2e test already that shows that auto-sizing works. I can improve the e2e tests a bit more.
raethlein
left a comment
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.
LGTM! Just left two minor comments about tests
Describe your changes
Add a new option to the dataframe column menu to auto-size a given column based on its content:
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.