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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom themes to override embed options query parameter #8021

Merged
merged 4 commits into from Mar 12, 2024

Conversation

kmcgrady
Copy link
Collaborator

@kmcgrady kmcgrady commented Jan 26, 2024

Describe your changes

We set the theme based on the query param each time the script run is finished. This can break other theme settings, so we want to respect the query parameters only on initial load (in determining the default theme.

GitHub Issue Link (if applicable)

Closes #7118

Testing Plan

  • Updated JS Unit Tests for the default theme. There were no tests for the script finished action, so I did not include tests for the removal.

Contribution License Agreement

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

Copy link

stale bot commented Feb 10, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 10, 2024
@kmcgrady kmcgrady removed the stale label Feb 16, 2024
Copy link

stale bot commented Mar 2, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't explain how this changed, but the tests fail consistently. It's possible the dark theme was being set at the end of script run which was creating some very subtle change. In that case, updating the screenshot makes sense.

Copy link
Collaborator

@LukasMasuch LukasMasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kmcgrady kmcgrady merged commit cadcba4 into develop Mar 12, 2024
35 of 36 checks passed
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
…lit#8021)

## Describe your changes

We set the theme based on the query param each time the script run is
finished. This can break other theme settings, so we want to respect the
query parameters only on initial load (in determining the default theme.

## GitHub Issue Link (if applicable)
Closes streamlit#7118 

## Testing Plan

- Updated JS Unit Tests for the default theme. There were no tests for
the script finished action, so I did not include tests for the removal.

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theme setting priority between embed_options and the config file
2 participants