Skip to content

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented Sep 1, 2021

Description of the Change

In #750, we added support for Gutenberg's full screen mode and in the process of that, changed up how the overlay on the distribution menu is used. Main goal there was to be able to capture clicks on the overlay and use that to close the overlay (as well as retain the hover in/out showing and hiding).

After thinking about it a bit more, I thought of a few ways this could be simplified and the results of that are this PR.

This overlay div is now added right after the distributor menu item, so we can use just CSS to show and hide that. This means the overlay should never show unless it's needed, while the current approach can result in the overlay showing if you hover over/out really quickly on the menu item. This also means a lot of code can be removed as it is no longer needed.

We still have one use of hoverintent that I would love to get rid of but I couldn't come up with a better approach there. Basically we need to know when someone hovers out of the menu so we can hide the admin bar if in fullscreen mode. Open to thoughts on that piece.

Alternate Designs

None

Benefits

Simpler logic around the showing and hiding of the overlay

Possible Drawbacks

None

Verification Process

Same process as described on #750

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

Fix - simplify how we show and hide the Distributor overlay when the Distributor menu is shown

…his closer together with the menu, so we can more easily show/hide that as needed. Remove all code that is no longer needed
@jeffpaul jeffpaul added this to the 1.6.6 milestone Sep 1, 2021
@jeffpaul jeffpaul added the type:enhancement New feature or request. label Sep 1, 2021
@jeffpaul jeffpaul requested review from dinhtungdu and helen September 1, 2021 20:53
Copy link
Contributor

@helen helen left a comment

Choose a reason for hiding this comment

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

Makes sense! Going to throw this into 1.6.5 since I saw this before merging to trunk anyway :)

@helen helen modified the milestones: 1.6.6, 1.6.5 Sep 1, 2021
@helen helen merged commit 51153ba into develop Sep 1, 2021
@helen helen deleted the fix/gutenberg-fullscreen-support branch September 1, 2021 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants