forked from streamlit/streamlit
-
Notifications
You must be signed in to change notification settings - Fork 0
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 4 (streamli…
…t#9320) ## Describe your changes Applies a couple of small styling refactorings and adds/unifies classnames & data-testid's for: - [x] app / AppView - [x] app / EventContainer - [x] app / Header - [x] app / MainMenu - [x] app / Sidebar - [x] app / ToolbarActions - [x] app / StatusWidget - [x] lib / Block 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. --------- Co-authored-by: Lukas Masuch <[email protected]>
- Loading branch information
1 parent
7450582
commit 621b802
Showing
36 changed files
with
212 additions
and
144 deletions.
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
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.