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

Spotlight Mode does not work as expected in mobile viewports #67376

Closed
3 of 6 tasks
yogeshbhutkar opened this issue Nov 28, 2024 · 0 comments · Fixed by #67377
Closed
3 of 6 tasks

Spotlight Mode does not work as expected in mobile viewports #67376

yogeshbhutkar opened this issue Nov 28, 2024 · 0 comments · Fixed by #67377
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@yogeshbhutkar
Copy link
Contributor

yogeshbhutkar commented Nov 28, 2024

Description

In the mobile view, the Spotlight Mode (or Focus Mode) does not function as expected. While it successfully highlights one block at a time and reduces the opacity of surrounding blocks on desktop, this behavior is not replicated on mobile viewports.

I believe this issue qualifies as a bug for the following reasons:

  1. The Spotlight Mode toggle is visible in mobile view, but activating it has no effect, which can confuse users regarding its intended functionality.
  2. The desktop and mobile views should exhibit similar behavior for features that are enabled in both.

This was first introduced in this PR: #30130

Refactoring the code here should fix the problem:

'is-focus-mode': isFocusMode && isLargeViewport,

Proposed Solution:

We should either ensure that the Spotlight Mode Toggle on the mobile viewport functions as intended or hide the Toggle altogether from the mobile interface. Displaying the Toggle without the corresponding functionality may lead to a suboptimal user experience.

Step-by-step reproduction instructions

  1. Navigate to the Post Edit screen and enable Spotlight Mode.
  2. In a viewport size corresponding to a mobile device, observe that enabling Spotlight Mode has no visible effect.

Screenshots, screen recording, code snippet

bug-report.mov

Environment info

  • WordPress Version: 6.7.1
  • Gutenberg Plugin Version: 19.8.0-rc.1

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
@yogeshbhutkar yogeshbhutkar added the [Type] Bug An existing feature does not function as intended label Nov 28, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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.

1 participant