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
LukasMasuch
merged 23 commits into
streamlit:develop
from
LukasMasuch:issue/fix-widgets-overrides
Jul 7, 2022
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
79ef953
Merge remote-tracking branch 'remote/develop' into develop
LukasMasuch 5bf6c41
Merge branch 'streamlit:develop' into develop
LukasMasuch 5f179c5
Merge branch 'streamlit:develop' into develop
LukasMasuch e31d7cb
Merge branch 'streamlit:develop' into develop
LukasMasuch 444a3ab
Merge branch 'streamlit:develop' into develop
LukasMasuch 73504ac
Merge branch 'streamlit:develop' into develop
LukasMasuch a4865c6
Merge branch 'streamlit:develop' into develop
LukasMasuch 7df7f14
Merge branch 'streamlit:develop' into develop
LukasMasuch 2e8fded
Merge branch 'streamlit:develop' into develop
LukasMasuch 11d7a6b
Merge branch 'streamlit:develop' into develop
LukasMasuch 64c3652
Merge branch 'streamlit:develop' into develop
LukasMasuch bfacd3c
Merge branch 'streamlit:develop' into develop
LukasMasuch ba95c51
Merge branch 'streamlit:develop' into develop
LukasMasuch a42681a
Merge branch 'streamlit:develop' into develop
LukasMasuch be9efce
Merge branch 'streamlit:develop' into develop
LukasMasuch f4f7fe1
Merge branch 'streamlit:develop' into develop
LukasMasuch 9415903
Merge remote-tracking branch 'remote/develop' into develop
LukasMasuch 6bac312
Merge remote-tracking branch 'remote/develop' into develop
LukasMasuch 18299f5
Merge remote-tracking branch 'remote/develop' into develop
LukasMasuch d69f0b0
Merge remote-tracking branch 'remote/develop' into develop
LukasMasuch 4798eb1
Change short-hand props to long-hand
LukasMasuch 8b0b80b
Remove text input snapshots
LukasMasuch f3765ce
Add snapshots
LukasMasuch File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -278,19 +278,21 @@ class DateInput extends React.PureComponent<Props, State> { | |
overrides: { | ||
Root: { | ||
style: { | ||
borderWidth: "1px", | ||
// Baseweb requires long-hand props, short-hand leads to weird bugs & warnings. | ||
borderLeftWidth: "1px", | ||
borderRightWidth: "1px", | ||
borderTopWidth: "1px", | ||
borderBottomWidth: "1px", | ||
}, | ||
}, | ||
|
||
InputContainer: { | ||
style: { | ||
borderWidth: "1px", | ||
}, | ||
}, | ||
Input: { | ||
style: { | ||
padding: ".5rem", | ||
borderWidth: "1px", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No border here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as the other comment |
||
// Baseweb requires long-hand props, short-hand leads to weird bugs & warnings. | ||
paddingRight: ".5rem", | ||
paddingLeft: ".5rem", | ||
paddingBottom: ".5rem", | ||
paddingTop: ".5rem", | ||
}, | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
frontend/src/components/widgets/TextArea/styled-components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
/** | ||
* @license | ||
* Copyright 2018-2022 Streamlit Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import styled from "@emotion/styled" | ||
|
||
export const StyledTextAreaContainer = styled.div({ | ||
div: { | ||
// TODO: move this to the TextArea overwrites once Root is supported: | ||
// https://github.com/uber/baseweb/issues/4264 | ||
borderWidth: "1px", | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
frontend/src/components/widgets/TextInput/styled-components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No border 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.
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.