Thanks to visit codestin.com
Credit goes to github.com

Skip to content

light/dark toggle: fire window resize event #12625

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 1 commit into from
May 1, 2025

Conversation

gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Apr 25, 2025

This is a backport PR for v1.7

The light/dark toggle is now hiding and showing all of the plots and tables via .light-content, .dark-content. Some of these plots and tables may be widgets which need to check their size.

Technique found in ShinyResizeObserver: fire a resize event on the window.

This fixes sizing issues in plotly-python1 and heatmaply, and it fixes leaflet not displaying when toggling between light and dark modes.

Footnotes

  1. plotly-python jitters on first toggle

@gordonwoodhull gordonwoodhull added this to the v1.8 milestone Apr 25, 2025
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Apr 25, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@gordonwoodhull gordonwoodhull modified the milestones: v1.8, Hot-fix Apr 25, 2025
@gordonwoodhull gordonwoodhull added the themes Related to HTML theming or any other style related issue (like highlight-style) label Apr 25, 2025
@gordonwoodhull gordonwoodhull force-pushed the bugfix/light-dark-toggle-resize branch from 4915616 to a468852 Compare April 30, 2025 23:07
@gordonwoodhull gordonwoodhull changed the base branch from main to v1.7 April 30, 2025 23:43
fixes sizing issues in plotly-python and heatmaply
fixes non-displaying leaflet
@gordonwoodhull gordonwoodhull force-pushed the bugfix/light-dark-toggle-resize branch from a468852 to f71e06f Compare April 30, 2025 23:50
@gordonwoodhull gordonwoodhull merged commit 95b4ac3 into v1.7 May 1, 2025
44 checks passed
@gordonwoodhull gordonwoodhull deleted the bugfix/light-dark-toggle-resize branch May 1, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport themes Related to HTML theming or any other style related issue (like highlight-style)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants