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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix widgets overwrites from short to long-hand props #4935

Merged

Conversation

LukasMasuch
Copy link
Collaborator

@LukasMasuch LukasMasuch commented Jul 7, 2022

馃摎 Context

The PR #4861 applied some changes to border and padding via short-hand properties (padding, borderWidth) in the baseweb overwrites. Apparently, this leads to weird bugs and warnings:

Mixing shorthand and longhand properties within the same style object is unsupported with atomic rendering.

We need to use the long-hand properties instead (borderLeftWidth, borderRightWidth, borderTopWidth, borderBottomWidth).

  • What kind of change does this PR introduce?

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

馃 Description of Changes

  • Replace all short-hand properties in baseweb overwrites with long-hand versions.

馃И Testing Done

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

Contribution License Agreement

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

@LukasMasuch LukasMasuch marked this pull request as ready for review July 7, 2022 16:05
@LukasMasuch LukasMasuch requested a review from a team July 7, 2022 16:05
Input: {
style: {
padding: ".5rem",
borderWidth: "1px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

No border here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as the other comment

},
},

InputContainer: {
style: {
borderWidth: "1px",
Copy link
Collaborator

Choose a reason for hiding this comment

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

No border here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, I removed that intentionally since it did not seem to actually do anything. Having borderWidth in Root is the only place that has an impact.

@LukasMasuch LukasMasuch merged commit ad4547f into streamlit:develop Jul 7, 2022
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.

None yet

2 participants