-
Notifications
You must be signed in to change notification settings - Fork 4k
🔥 Fully remove format param from st.image
#2637
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
Spec from Thiago: Without going so far as completely rethinking how we do sizes, the least we could do is change `use_column_width` to accept three values: - `'auto'` : sets the image to its natural size, unless its width is greater than the column width. In which case it scales the image to fit the column width. - `True` or `'always'`: sets the image size to fit the column width. - `False` or `'never'`: sets the image to its natural size. Then we'd make `'auto'` the default. (The current default is `False`)
format in st.imageformat in st.image
format in st.imageformat param from st.image
|
|
||
| [deprecation] | ||
|
|
||
| # Set to false to disable the deprecation warning for the image format parameter. |
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.
Can you also modify the last updated timestamp earlier in this code snippet, to recognize you've changed 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.
Oh wow, didn't know about that at all. Thanks for the reminder!
(I'm now curious if we can automate this by eg pulling the time of the last Git commit into wherever in the docs this is getting surfaced, or something... maybe a project for when someone has too much time on their hands :P)
randyzwitch
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.
See comment, otherwise LGTM
karriebear
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.
This works so approving but there is a product question for how to actually remove. Either way super small change. Happy to review again if needed
| default_val="True", | ||
| scriptable="True", | ||
| type_=bool, | ||
| ) |
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.
We actually have an expiration param we can put on this so that if someone uses the config option it doesn't cry too hard for them and gives them some message about config removed I think. We should probably use that instead of deleting but ultimately up to product. cc @asaini
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.
We've had the deprecation warning for a while so I think it's safe to simply remove it (Our docs also reflect the the new param option)
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 wasn't clear what the resulting behavior from removing the config entirely and after testing, we'd like to instead deprecate the config option instead. @akrolsmir do you have time to address before Sunday 10:30pm PT so we can get this into the next release?
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'll get it in right now.
|
LGTM 👍 |
* develop: (29 commits) Update bug_report.md Refactor CodeBlock.tsx (#2814) Remove copy button for empty codeblocks (#2808) Add image format deprecation config with expiration (#2865) Remove unneeded "use_column_width=True" from our doc examples (#2692) Extend our st.cache MagicMock handling logic to Mock (#2846) save work (#2862) Remove .stale-element class (#2848) Release 0.77 (#2849) Fix watchdog import failure (#2856) 🔥 Fully remove `format` param from st.image (#2637) Don't memoize config._server_headless (#2858) hide empty columns on mobile (#2756) st.beta_secrets (#2757) `watch_file` utility function (#2851) Align st.beta_columns (#2811) Update "showErrorDetails" config description and docs (#2841) Pause Dependabot updates for non-security-related issues (#2840) client.showTracebacks -> showErrorDetails (per product) (#2837) Color picker - show value (#2817) ...
Fixes #2627
(Wait for #2635 before merging in)