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

fix: theme switching when document.startViewTransition is undefined #9

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

kirklin
Copy link
Owner

@kirklin kirklin commented Jul 26, 2023

Issue: Resolves the problem of the theme not switching correctly when the function is undefined.document.startViewTransition

Proposed changes

Updated theme-switching code to handle scenarios where is not available in the browser environment.document.startViewTransition
Implemented a fallback mechanism to ensure theme changes work consistently across different browsers and environments.
Improved code robustness and compatibility with various platforms.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Linked Issues

Link #8

Further comments

How to Test:

Verify the existence of the function in the browser environment.document.startViewTransition
Attempt to switch between different themes and observe the behavior.
Check if the theme changes smoothly without any errors in the browser console.
Test the application on different browsers to ensure compatibility.

@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for vite-boot ready!

Name Link
🔨 Latest commit 341330f
🔍 Latest deploy log https://app.netlify.com/sites/vite-boot/deploys/64c1458ef2edb800087626a2
😎 Deploy Preview https://deploy-preview-9--vite-boot.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kirklin kirklin merged commit 8f53218 into master Jul 26, 2023
6 checks passed
@kirklin kirklin deleted the fix_theme_switch branch February 6, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant