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

Conflict between Zoom Out mode and Distraction free mode #67025

Closed
2 of 6 tasks
t-hamano opened this issue Nov 15, 2024 · 8 comments · Fixed by #67028
Closed
2 of 6 tasks

Conflict between Zoom Out mode and Distraction free mode #67025

t-hamano opened this issue Nov 15, 2024 · 8 comments · Fixed by #67028
Assignees
Labels
[Feature] Zoom Out [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Nov 15, 2024

Description

It is possible to have Zoom Out mode and Distraction free mode enabled at the same time via the zoom out toggle button or shortcuts.

Zoom out mode expects to insert patterns at the root level via the inserter, whereas Distraction free mode does not expect to insert blocks, resulting in a conflict.

Step-by-step reproduction instructions

  • Enable Distraction free mode.
  • Click the Zoom out toggle button.

Screenshots, screen recording, code snippet

a5e9a358ad7d326681fb591920a23a6e.mp4

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@t-hamano t-hamano added [Feature] Zoom Out [Type] Bug An existing feature does not function as intended labels Nov 15, 2024
@t-hamano t-hamano changed the title Disable zoom out mode in Distraction free mode Conflict between Zoom Out mode and Distraction free mode Nov 15, 2024
@yogeshbhutkar
Copy link
Contributor

Thanks, @t-hamano for the issue.

Can you please describe the ideal behavior in this case? Do we allow inserter access when distraction mode is enabled and the content is zoomed out?

@t-hamano
Copy link
Contributor Author

For now, I haven't come up with an ideal behavior. We also need to consider whether to allow both Zoom Out mode and Distraction free mode to be enabled.

@yogeshbhutkar
Copy link
Contributor

@t-hamano, I think the ideal behavior should be to allow zooming out, but when the Distraction Free mode is enabled, then, when zoomed out, the Inserter Mode Button should ideally be disabled or should be made hidden.

@t-hamano
Copy link
Contributor Author

I think the ideal behavior should be to allow zooming out, but when the Distraction Free mode is enabled, then, when zoomed out, the Inserter Mode Button should ideally be disabled or should be made hidden.

In this case, we can't do anything in Zoom Out mode, right? I think the main purpose of Zoom Out mode is to be able to insert patterns at the root level.

@yogeshbhutkar
Copy link
Contributor

yogeshbhutkar commented Nov 15, 2024

@t-hamano Agreed!!!

Probably the feature ( zoom out ) can be used to view the content at a glance as well. Seems like a basic feature to have even after eliminating its association with the inserter, this can independently be used.

These two features conflict for sure, but I think limiting the Inserter of Zoomed Out state is the most efficient way to tackle the problem instead of either keeping Zoom out in its entirety or removing it completely when distraction-free mode is enabled.

I've raised a PR, the preview is attached as a screencast on the PR itself, will modify based on the flow of discussion that happens here.

Thank You.

@Mamaduka
Copy link
Member

We should probably hide/disable the Zoom out toggle when in distraction-free mode. We do the same thing for Inserter, List View, Preview and others.

cc @richtabor, @draganescu

@yogeshbhutkar
Copy link
Contributor

@t-hamano @Mamaduka, I've updated the PR accordingly with the expected behavior.

Thanks for your suggestions.

@draganescu
Copy link
Contributor

I agree we should not show the zoom out control in DFM because the zoom out feature - for now at least - makes sense with the UI of the editor nearby to allow for quick building an iteration of high level content structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants