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: Add zen mode to preferences, remove shortcut #2003

Merged
merged 5 commits into from
Apr 23, 2023

Conversation

manuq
Copy link
Contributor

@manuq manuq commented Apr 22, 2023

Fixes #1883

@stackblitz
Copy link

stackblitz bot commented Apr 22, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Apr 22, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit ae6057e
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/6444d04d88dc1b0008ac459d

@netlify
Copy link

netlify bot commented Apr 22, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit ae6057e
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/6444d04df6e9f90008035764
😎 Deploy Preview https://deploy-preview-2003--elk-zone.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 settings.

@manuq manuq marked this pull request as draft April 22, 2023 18:12
@manuq manuq changed the title Zen setting fix: Add zen mode to preferences, remove shortcut Apr 22, 2023
@manuq manuq marked this pull request as ready for review April 22, 2023 18:35
@patak-dev
Copy link
Member

Thanks @manuq! It works nicely!

There is only one issue I found while testing. Before you press the Zen Mode button or setting for the first time (so its value is still undefined in the settings), if you reload the page you'll notice the sidebars start in zen mode true, and they fade in. If you go into Zen Mode, then toggle back (so the setting is now zenMode: false), this doesn't happen.

@manuq
Copy link
Contributor Author

manuq commented Apr 22, 2023

Good catch @patak-dev ! It turns out that all preferences started as undefined, and then the storage was in charge of setting them. Thus the fade-in effect that happened right away. I have appended a commit to fix it.

@patak-dev
Copy link
Member

The flash was reduced but it is still there. You can compare reloading against elk.zone to see it.

@userquin
Copy link
Member

userquin commented Apr 23, 2023

@manuq starting dev server from scratch using your branch using zen mode by default (ni && nr dev)

EDIT: using the preview in Windows FF and Chrome working...

@userquin
Copy link
Member

The flash was reduced but it is still there. You can compare reloading against elk.zone to see it.

On my local there is no flash (also using PR preview), maybe missing transition? I see a fade-out transition when activating zen mode while deactivating, it is almost instant.

@patak-dev
Copy link
Member

Ok, I can't reproduce locally. Let's try it out, and we fix it if not later one

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.

Make the "zen mode" button minimally findable
3 participants