-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Use raw number for number column overlay and copy #8708
Conversation
Could you please add a screenshot of before and after to make it really easy to spot the difference in the dataframe (the demo only shows the new behavior)? |
There isn't any change in the table rendering. But there is a small visible change in the overlay editor for which we don't have any e2e tests yet. I'm currently attempting to build something to e2e test this, but not sure how much effort it is. |
…n-thousand-separator
….com/streamlit/streamlit into fix/number-column-thousand-separator
@raethlein I added additional e2e tests to test the visuals in the overlay editor within the + migrated the expect written text method to |
from playwright.sync_api import Locator, expect | ||
|
||
|
||
def expect_prefixed_markdown( |
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.
thanks for extracting the utils functions. I hoped that it could also be used for the expect_written_text
function in the st_altair_chart_basic_select
function here, so I believe it would make sense to offer it directly in a way where it'd be compatible. But can also be done in a future PR
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.
Updated st_altair_chart_basic_select to use the utils method 👍
""" | ||
# This is currently the best way to get the cell overlay | ||
# We should eventually add a stable test ID to the cell overlay | ||
# within GDG to better target it. |
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.
nit: "GDG" -> glide data grid. I expect no one very familiar with the matter to know the abbreviation
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.
Renamed
) | ||
|
||
cell_overlay_test_column_config = { | ||
# the e2e test requires all cells to medium width |
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.
nit: could you add a short comment why the e2e test requires this, please?
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.
Added 👍
@raethlein Ready for another round |
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, thank you!
Describe your changes
This PR enforces that the raw number value is used in the cell overlay and as copy value without any formatting applied. This was always supposed to be the case, but wasn't fully enforced in the number column yet.
Demo
GitHub Issue Link (if applicable)
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.