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

Site Hub: Fixed navigation redirect on mobile devices for classic themes #66867

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Nov 8, 2024

Resolves: #66844

What?

The PR addresses a UI bug that doesn't let the users get redirected to the dashboard from mobile devices on classic themes.

Why?

  1. The user would otherwise need to double-click on the site logo from mobile devices to navigate to the dashboard page.
  2. The PR retains the functionality to open the Design panel on the new theme and retains the functionality to navigate to the dashboard from mobile devices in classic themes.

How?

I've used the dashboard link and a condition to determine if the block theme is activated or not and based on that am rendering onClick and href attributes of the button which can then redirect the user to the Dashboard if using the classic theme or can open the Design panel when using the Block Theme.

Testing Instructions

  1. Open WordPress 6.6+ on a mobile device, OR on desktop, shrink the viewport to 728px width or less.
  2. Activate a classic theme, such as twentytwenty.
  3. Navigate to Appearance > Patterns.
  4. Inspect the site icon (typically the WordPress "W") in the upper left, and observe that it is the "Go to Site Editor" button (via aria-label attribute).
  5. Click the site icon and observe that the left site editor panel opens.
Screen.Recording.2024-11-08.at.4.32.46.PM.mov

Copy link

github-actions bot commented Nov 8, 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.

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

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ironprogrammer <ironprogrammer@git.wordpress.org>

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 Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @yogeshbhutkar! 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.

@t-hamano t-hamano added the [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") label Nov 8, 2024
Copy link
Contributor

@t-hamano t-hamano 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 the PR! I think this PR is working fine.

packages/edit-site/src/components/site-hub/index.js Outdated Show resolved Hide resolved
@t-hamano t-hamano added the [Type] Bug An existing feature does not function as intended label Nov 8, 2024
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix 👍

@t-hamano t-hamano merged commit aba08da into WordPress:trunk Nov 13, 2024
63 checks passed
@github-actions github-actions bot added this to the Gutenberg 19.7 milestone Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") 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.

On Patterns screen for classic theme, site icon does not return to admin dashboard on mobile
2 participants