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 button height #6738

Merged
merged 14 commits into from Jun 9, 2023
Merged

Fix button height #6738

merged 14 commits into from Jun 9, 2023

Conversation

sfc-gh-jgarcia
Copy link
Contributor

@sfc-gh-jgarcia sfc-gh-jgarcia commented May 23, 2023

📚 Context

This PR fixes an issue reported by @sfc-gh-tteixeira where st.button are not as tall as the rest of our widgets.

The design team will have a more broad discussion to determine the best course of action for fixing this mid-term (potentially making widgets and buttons smaller, or taller but with a more standard height value), but in the meantime, we wanted to send a quick fix to make the buttons match the rest of the widgets.

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

🧠 Description of Changes

  • Updated the minHeight value in <BaseButton>;

    • This is a breaking API change
    • This is a visible (user-facing) change

Revised:

Screenshot 2023-05-23 at 2 12 13 PM

Screenshot 2023-05-23 at 2 12 00 PM

Current:

Screenshot 2023-05-23 at 2 57 40 PM

Screenshot 2023-05-23 at 2 58 01 PM

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

🌐 References

Does this depend on other work, documents, or tickets?


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-jgarcia sfc-gh-jgarcia marked this pull request as ready for review May 24, 2023 18:59
@@ -80,6 +80,7 @@ export const StyledBaseButton = styled.button<RequiredBaseButtonProps>(
justifyContent: "center",
fontWeight: theme.fontWeights.normal,
padding: `${theme.spacing.xs} ${theme.spacing.md}`,
minHeight: "38.4px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Understandable as a short term solution, but this is a definitely a strange value 🙃

@stale
Copy link

stale bot commented Jun 9, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 9, 2023
@stale stale bot removed the stale label Jun 9, 2023
@stale stale bot removed the stale label Jun 9, 2023
@sfc-gh-jgarcia sfc-gh-jgarcia added type:bug Something isn't working change:bugfix and removed type:bug Something isn't working labels Jun 9, 2023
@sfc-gh-lmasuch sfc-gh-lmasuch merged commit 10653ec into develop Jun 9, 2023
65 of 73 checks passed
@vdonato vdonato deleted the fix-button-height branch June 14, 2023 02:12
tconkling added a commit to tconkling/streamlit that referenced this pull request Jun 14, 2023
* develop:
  Bump dependencies of component-lib (streamlit#6830)
  Make `streamlit config show` honor newlines (streamlit#6758)
  Update comments on magic.py (streamlit#6833)
  Add tests for component-lib (streamlit#6580)
  Fix button height (streamlit#6738)
  Add `to_pandas` method to convert inputs to pandas DataFrames (streamlit#6668)
  hash_funcs for st.cache_data and st.cache_resource (streamlit#6502)
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
* Update button height

* Update unit test

* Remove snapshots to regenerate them

* Add regenerated snapshots

* Remove unrelated snapshots with small diff failures

* Remove light snapshots as well

* Remove most of label_markdown snapshots, since they still have really small differences

* Remove some snapshots, add others

* Other snapshots deleted, new ones added

* Add date_input snapshots, remove map ones

* Add back map specs
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
* Update button height

* Update unit test

* Remove snapshots to regenerate them

* Add regenerated snapshots

* Remove unrelated snapshots with small diff failures

* Remove light snapshots as well

* Remove most of label_markdown snapshots, since they still have really small differences

* Remove some snapshots, add others

* Other snapshots deleted, new ones added

* Add date_input snapshots, remove map ones

* Add back map specs
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
* Update button height

* Update unit test

* Remove snapshots to regenerate them

* Add regenerated snapshots

* Remove unrelated snapshots with small diff failures

* Remove light snapshots as well

* Remove most of label_markdown snapshots, since they still have really small differences

* Remove some snapshots, add others

* Other snapshots deleted, new ones added

* Add date_input snapshots, remove map ones

* Add back map specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants