-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor frontend styles, class names and test-ids - Part 3 (#9315)
## Describe your changes Applies a couple of small styling refactorings and adds/unifies classnames & data-testid's for: - [x] widgets/TimeInput - [x] widgets/TextInput - [x] widgets/TextArea - [x] widget/Slider - [x] widgets/Selectbox - [x] widgets/Radio - [x] widgets/NumberInput - [x] widgets/Multiselect - [x] widgets/Form - [x] widgets/FileUploader - [x] widgets/DownloadButton - [x] widgets/DateInput - [x] widgets/DataFrame - [x] widgets/CustomComponent - [x] widgets/ColorPicker - [x] widgets/Checkbox - [x] widgets/ChatInput - [x] widgets/CameraInput - [x] widgets/ButtonGroup - [x] widgets/Button - [x] widgets/BaseWidget - [x] shared/Toolbar - [x] shared/StreamlitMarkdown - [x] shared/Radio - [x] shared/ProgressBar - [x] ArrowVegaLiteChart - [x] DeckGlJsonChart - [x] shared/BaseButton With this project, I'm going through all react components in multiple chunks to: 1. Replace hard-coded styling attributes with theming variables (focused on simple, non-risky changes) -> This is an initial step for the advanced theming project. 2. Add stable class names to the root of all standalone elements to provide slightly more stability and simplicity for CSS hacks. Class names should follow the naming structure for consistency and to ensure uniqueness of class names. This also includes a couple of changes to existing class names, but we will keep old, non-aligned class names around in addition to the new class names if there is an indication of significant usage for existing CSS hacks. 3. Clean up test IDs to follow the same naming structure (most already do). This isn't too important; consistency is nice and hopefully will encourage others to follow the pattern. And it might prevent some potential overlaps in test-id naming. Naming structure for class names & test-ids: class names should be camel case, prefixed with `st`, and contain a descriptive term that refers to the element (e.g. the command name). In addition to these goals, the PR also cleans up our e2e tests to use test-ids wherever possible and to use utility methods in `app_utils` for some interactions. ## Testing Plan - No logical changes -> no tests required. - Added e2e tests to all elements to check that it has a top-level className. --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
- Loading branch information
1 parent
42af833
commit e91bea8
Showing
177 changed files
with
919 additions
and
495 deletions.
There are no files selected for viewing
Binary file modified
BIN
-2 Bytes
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-faces[dark_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
.../__snapshots__/linux/st_feedback_test/st_feedback-faces[dark_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
...t/__snapshots__/linux/st_feedback_test/st_feedback-faces[dark_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
..._snapshots__/linux/st_feedback_test/st_feedback-faces[light_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-faces[light_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
.../__snapshots__/linux/st_feedback_test/st_feedback-faces[light_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-stars[dark_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
.../__snapshots__/linux/st_feedback_test/st_feedback-stars[dark_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
...t/__snapshots__/linux/st_feedback_test/st_feedback-stars[dark_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
..._snapshots__/linux/st_feedback_test/st_feedback-stars[light_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-stars[light_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4 Bytes
(100%)
.../__snapshots__/linux/st_feedback_test/st_feedback-stars[light_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
..._snapshots__/linux/st_feedback_test/st_feedback-thumbs[dark_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-thumbs[dark_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
.../__snapshots__/linux/st_feedback_test/st_feedback-thumbs[dark_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
...snapshots__/linux/st_feedback_test/st_feedback-thumbs[light_theme-chromium].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
..._snapshots__/linux/st_feedback_test/st_feedback-thumbs[light_theme-firefox].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
...__snapshots__/linux/st_feedback_test/st_feedback-thumbs[light_theme-webkit].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Oops, something went wrong.