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

Fixed zoom out mode in edit template #65565

Closed

Conversation

PARTHVATALIYA
Copy link
Contributor

What?

Part of - #65505

Why?

Solve - #65505

Testing Instructions

  1. Open the site editor
  2. Go to Pages > any page to edit a page within the site editor
  3. Click the Zoom out button in the top bar
  4. Double click the post title block
  5. Notice that you will edit the post title by double clicking on it.

Screenshots or screencast

Pages.Template.gutenberg.Editor.WordPress.webm

Copy link

github-actions bot commented Sep 23, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @parthVataliya16.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: parthVataliya16.

Co-authored-by: draganescu <[email protected]>
Co-authored-by: PARTHVATALIYA <[email protected]>
Co-authored-by: colorful-tones <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: getdave <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 23, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @PARTHVATALIYA! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@colorful-tones
Copy link
Member

colorful-tones commented Sep 26, 2024

Thanks for the contribution @PARTHVATALIYA !

I tested this out and the fix works. I can not speak to the code, but it addresses the issue.

@colorful-tones colorful-tones added [Feature] Zoom Out [Type] Bug An existing feature does not function as intended labels Sep 26, 2024
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. I find it strange that the notification component knows all this. Can we find a way to never have the notification if we're in zoom out mode?

@PARTHVATALIYA
Copy link
Contributor Author

Thanks for working on this. I find it strange that the notification component knows all this. Can we find a way to never have the notification if we're in zoom out mode?

Thanks @draganescu for reviewing the PR. I am new to gutenberg can you please explain me more. So I can resolve this.

@draganescu
Copy link
Contributor

The EditTemplateBlocksNotification component should only show a notification, not also set editor modes and this PR adds too much to it.

What I mean is that instead of editing the EditTemplateBlocksNotification component to not render if zoom out and to also set the editor mode, we need to find where the EditTemplateBlocksNotification component is rendered and render it there conditionally depending on editor mode. Also I suspect we won't have to reintercept double click since thre is something else already setting editor mode on double click, the bug to solve is to not show this notification.

Not sure if I conveyed it right, is it any clearer? 😀

@PARTHVATALIYA
Copy link
Contributor Author

Thank you for explanation! Issue resolved.

@andrewserong
Copy link
Contributor

Thank you for working on this @PARTHVATALIYA! Apologies, I missed the ping earlier on this change and I submitted a very similar PR over in #65963. Are you keen to continue working on this one? If not, I'm happy to either jump in here, or continue on with the similar PR over in #65963.

It seems the main next step is to look into the feedback from @draganescu regarding where we place this check, as arguably it'd be better if we didn't include the logic within the EditTemplateBlocksNotification component itself. Perhaps we could look into skipping using that notification component if zoom out mode is engaged, and add a double click handler somewhere else for checking whether to switch off zoom out mode (as suggested in #65565 (comment)).

What do you think?

@getdave
Copy link
Contributor

getdave commented Oct 9, 2024

Could we close this one out and then include @PARTHVATALIYA in props on your PR @andrewserong?

@PARTHVATALIYA
Copy link
Contributor Author

@andrewserong you can continue with the PR #65963.

@andrewserong
Copy link
Contributor

Thanks for confirming @PARTHVATALIYA, and thanks for your work here, I'll be sure to include props for you over in #65963 when it lands!

@getdave
Copy link
Contributor

getdave commented Oct 10, 2024

Closing in favour of #65963.

@getdave getdave closed this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants