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

Zoom out mode conflicts Write/Design mode #65901

Closed
2 tasks done
t-hamano opened this issue Oct 7, 2024 · 13 comments · Fixed by #65975
Closed
2 tasks done

Zoom out mode conflicts Write/Design mode #65901

t-hamano opened this issue Oct 7, 2024 · 13 comments · Fixed by #65975
Assignees
Labels
[Feature] Zoom Out Needs Design Feedback Needs general design feedback. [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 Oct 7, 2024

Description

When the zoom out mode is enabled, what I should expect is the following:

  • Only the root level blocks are selectable.
  • Above and below the selected block, inserter buttons will appear to insert patterns.

However, switching modes from the Tools menu while the zoom out mode is active will result in unintended behavior.

Step-by-step reproduction instructions

  • The default mode is "Design".
  • Click the Zoom Out button.
  • The canvas zooms out. Only root-level blocks are selectable, and inserter buttons appear above and below selected blocks.
  • ❌ Change the mode to "Write". Non-root-level blocks can be selected unintentionally.
  • ❌ Change the mode back to "Design". No inserter buttons appear above or below selected root-level blocks.

Screenshots, screen recording, code snippet

e7846d9fae901fd2b09d1ced6f760045.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
@t-hamano t-hamano added [Feature] Zoom Out [Type] Bug An existing feature does not function as intended labels Oct 7, 2024
@draganescu
Copy link
Contributor

I think we should somehow not allow - yet - switching modes. 😄 as in if modes are engaged the view is exited.

@t-hamano
Copy link
Contributor Author

t-hamano commented Oct 7, 2024

I noticed that when I switch to Zoom Out mode in Write mode, it automatically switches to Design mode. Perhaps zoom out mode can be considered a variation or extension of Design mode?

Maybe it would be ok to disable the Write mode button when Zoom Out mode is active:

Image

@draganescu
Copy link
Contributor

Or exit zoom out when mode is changed?

@t-hamano
Copy link
Contributor Author

t-hamano commented Oct 7, 2024

Or exit zoom out when mode is changed?

This might be the best. This approach is similar to #65652 and #65444.

@annezazu
Copy link
Contributor

annezazu commented Oct 7, 2024

Noting the proposal to better combine these different options: #65736

@afercia
Copy link
Contributor

afercia commented Oct 8, 2024

I noticed that when I switch to Zoom Out mode in Write mode, it automatically switches to Design mode.

The naming and workings of these modes are a little confusing. Select and edit mode have been renamed in the UI but the code implementation still refers to their original names:

  • Design mode: code name is edit mode.
  • Write mode: code name is navigation mode.

On top of that, the ToolSelector uses a condition that only takes into consideragion navigation and edit modes. So that, when it's not navigation, the UI will indicate it's edit mode, even though the avtual value is zoom-out mode. That condition should be updated.

However, what the Tool Selector should indicate as selected mode when Zoom Out is enabled?

To me, Zoom Out is conceptually and technically an actual 'mode' and should be treated as such. In #65856 I'm proposing to expand the concept of 'modes' in the editor and make them more prominent. Also, by moving Zoom Out mode to the ToolSelector, the UI would present them as a single choice UI thus avoiding any confusion.

@getdave getdave moved this from 📥 Todo to 🗣️ In Discussion / Needs Decision in WordPress 6.7 Editor Tasks Oct 8, 2024
@getdave getdave added the Needs Design Feedback Needs general design feedback. label Oct 8, 2024
@getdave
Copy link
Contributor

getdave commented Oct 8, 2024

I don't see a way forward here until we're aligned on whether or not we want to expose "Zoom Out" as a "mode".

We have two viewpoints:

  1. Zoom Out is a mode and should be exposed in the tool selector.
  2. Zoom Out is an affordance and may be merged into other modes in the future so should not be exposed in that specific UI location.

I would put this under "Needs Decision".

@t-hamano
Copy link
Contributor Author

t-hamano commented Oct 8, 2024

Zoom Out is an affordance and may be merged into other modes in the future so should not be exposed.

Does this mean that zoom out mode will be removed from WordPress 6.7?

@getdave
Copy link
Contributor

getdave commented Oct 8, 2024

No. Zoom Out as a feature will remain in 6.7.

More discussion #65856. We should probably continue there to avoid splintering the discussion.

@draganescu
Copy link
Contributor

The way forward is to implement this comment

Or exit zoom out when mode is changed?

This might be the best. This approach is similar to #65652 and #65444.

This fixes the bug. The conceptual refining can come later without this getting int he way.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 9, 2024
@ndiego
Copy link
Member

ndiego commented Oct 9, 2024

Since the Write/Design modes are not included in WordPress 6.7, I am going to remove this issue from the 6.7 project board. If anyone objects, feel free to comment here and add back.

@draganescu
Copy link
Contributor

@ndiego I think this should be for 6.7? It fixes a bug where one is in a mixed zoom out navigation mode state.

@ndiego
Copy link
Member

ndiego commented Oct 10, 2024

Thanks for the clarification @draganescu, I added it back.

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

Successfully merging a pull request may close this issue.

6 participants