-
Notifications
You must be signed in to change notification settings - Fork 4k
Combined feature branch for tooltips + theming #2959
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
Merged
Merged
Conversation
This file contains hidden or 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 help keyword/field to protobufs and api * fix pylint stuff * fix tests * move help to last kwarg
* add help keyword/field to protobufs and api * add tooltip to TextInput * remove unnecessary code * fix pylint * fix pylint stuff * fix tests * remove unnecessary change * add e2e test * remove unnecessary change * see if this fixes some cypress tests * make requested changes * make other requested change * fix failing test
* add help keyword/field to protobufs and api * add tooltip to TextInput * remove unnecessary code * fix pylint * fix pylint stuff * fix tests * remove unnecessary change * add e2e test * remove unnecessary change * save work * get tooltip working with button * remove unnecessary change * see if this fixes some cypress tests * make requested changes * fix merge * fix imports * update st_tooltips.spec.js * destructure
* add help keyword/field to protobufs and api * add tooltip to TextInput * remove unnecessary code * fix pylint * fix pylint stuff * fix tests * remove unnecessary change * add e2e test * remove unnecessary change * add tooltips for st.checkbox, st.radio, st.number_input * fix import order * see if this fixes some cypress tests * make requested changes * fix * fix test * add tests and fix tooltip positioning
* add tooltips to visual elements * fix newline
…into feat/tooltips
* add missing help keywords and protos * fix test * add missing function/proto * fix newline
* add tooltips to visual elements * fix newline * add missing help keywords and protos * add new tests * add remaining tooltips * add style change * move changes to a different branch * add newline
* Add selector + themes * Default theme + cleanup
* Reorder imports in config.py to be alphabetical * Allow capital letters in config sections We don't currently have any two-word config sections but want to add a `customTheme` section and need it to be camelCase for consistency with how individual config options are named. * Add config options for custom themes * Have customTheme.font default to "sans serif"
* Convert themes to config and add baseweb dark mode * PR comments - rename + typo
* Add CustomThemeConfig proto message type * Pull some NewReport msg construction into helper functions Also wrote a test. * Read customTheme config and include it in Initialize msg * Promote custom_theme to be a child of the Initialize proto * Add config.get_options_by_section * Use config.get_options_by_section to marshal custom_theme protos * Fix grammatical error in comment * Rename get_options_by_section -> get_options_for_section * Add types to new functions in report_session.py * Reorder imports in report_session.py
* Set theme + reorg theme to use ThemeConfig * PR feedback
* Create custom theme * Tests + fixes from tests * Fix linting * Fix light + dark theme colors * Fix sidebar theme + styling
Apparently a constructor signature changed on `develop`, causing a newly added test in `report_session_test` to fail.
* wip * Update styling variables * Remove started global styles
* Set up globalStyles * copy and start updating theme.scss -> emotion * copy and convert reboot.scss -> emotion * convert copied sass -> emotion theme * Update comment
* Apply theme to VegaLite Charts * Substitute theme.colors.bodyText -> textColor and update snapshots
* Relax theme validation to just print warnings instead of raising Raising exceptions here now seems like a bad user experience since it's very likely that the user will get annoyed by things exploding when they're live-editing config files to see changes get applied. * Add more _validate_theme tests Also fixed some existing ones that no longer tested what we needed them to when we changed the function to warn instead of raise.
* Do snapshots in both light + dark? * Add snapshots
* Move show_config to the new config_util.py config.py is the longest .py file we have, and I was about to add more stuff to it, so I thought it was about time to try to split it up. It's actually pretty hard to move things out of this file given all its dependencies, but at the very least one of the longest functions was easily movable, and the new stuff I'm about to add can go into config_util. * Just grab lock instead of having a nearly paragraph-long comment
* save work * change tooltipicon * fix js test * fix bugs * fix lint
* Drop the ConfigOptions type alias I've been thinking this alias wasn't really useful given how close it is to ConfigOption (singular), then I made a mistake because I misread it for the other :( * Warn if the user edits a [server] config option We can't always automatically apply these without a full server restart, so we should bug the user to reboot streamlit. Note that warning for all server config options is overly broad, but it's certainly better to over-warn users than under-warn them in this case. * Use parameterized in tests * Removed unused import
) * Don't overwrite config options set via flag on config.toml reload This was a known issue when we released Theming v0.4, but we decided that it was minor enough that fixing it could be pushed back until after that beta was released (presumably it should be rare for a user to set config options both via flag as well as config.toml file). * Add clarifying comment * Rework tests to work with both python 3.6 and 3.8 * Make names in dict comprehension more consistent
* Remove the theme.name option This is a task from the product launch review. Instead of letting developers name their themes, we'll just give any custom theme the name "Custom Theme" in the theme selector menu. * Hard code the string "Custom Theme" less Also rename AUTO_THEME -> AUTO_THEME_NAME
* style scrollbars * Fix header gradient color * Style menu and dialogs * Style everything else! * Fix small text in dialog * Make button border use fadedText10, like other borders. * Fix slider active color. * Improve "made with streamlit" text * Remove remaining usage of secondaryColor * Update enzyme snapshots for SettingsDialog and ThemeCreator * Get rid of StyledThemeColorPicker We can just use the ColorPicker directly now that we don't have any styles to override for it. * Fix (non-snapshot) js unit tests * Don't use primary color for background when no radio options * Don't use primary color for border when checkbox disabled * Update a TON of snapshots * Use fadedText colors more where equivalent * Move derived color computation into a helper and other misc cleanup * Use shorthand style props for borders where possible * Remove unnoticed reference to theme.name This one managed to sneak by since it has no effect on anything in the case where theme.name is never set. * Address PR comments * Get rid of an unnecessary import Co-authored-by: Thiago Teixeira <[email protected]>
The changes in this commit aren't used yet, but they will be very soon as tooltips are needed for the theme creator dialog. Aside from pulling in some code that lives in the tooltips feature branch a bit early, in this commit we also tweak tooltip colors so that they adjust along with the active theme.
…2938) This slipped by when the design pass PR was merged as I guess I never had a browser console open at the right time 😢 I happened to notice a ton of warn logs being spammed to the browser console whenever a checkbox was rendered. Unfortunately, this seems to be due to the incompatibility of the short/long-hand versions of these names and the fact that baseweb uses the long versions for some components, so we don't have much of a choice other than to be very, very verbose as well.
* Pick a reasonable ReactJson theme depending on background color * Brighten up markdown links a bit on dark backgrounds * Add a bunch of st_markdown snapshots
* Don't reload theme on every app rerun Currently, the theme reloads on app rerun when a user changes the value of a widget, which is because we're applying the theme in the config file without taking into account whether that theme has actually changed. This doesn't work well if a user was playing around with colors in the theme creator dialog, so we should instead only make custom-theme related changes if a theme config option was actually modified. * Use join instead of reduce and add a clarifying comment
* Rework Theme Creator UI * Moves the help text into tooltips * Has the theme creator be its own dialog instead of being an expandable part of the Settings dialog * Changes the layout of the Theme Creator to have two columns * Style all dialogs. * Update snapshots and fix other tests * Get rid of some now-empty styled components * Address PR feedback Co-authored-by: Thiago Teixeira <[email protected]>
* save work * fix padding * use linkText * just remove link style
vdonato
approved these changes
Mar 15, 2021
Closed
tconkling
added a commit
to tconkling/streamlit
that referenced
this pull request
Mar 16, 2021
* develop: Combined feature branch for tooltips + theming (streamlit#2959)
tconkling
added a commit
that referenced
this pull request
Mar 16, 2021
* develop: Combined feature branch for tooltips + theming (#2959) Make favicon smaller
tconkling
added a commit
to tconkling/streamlit
that referenced
this pull request
Mar 16, 2021
* st_form: Combined feature branch for tooltips + theming (streamlit#2959) Make favicon smaller
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.