Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Mini Cart: selecting the Mini Cart Contents block shows the toolbar at the bottom of the screen #5581

Closed
Aljullu opened this issue Jan 17, 2022 · 6 comments
Assignees
Labels
block: mini-cart Issues related to the Mini-Cart block. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Jan 17, 2022

Low priority, but reporting it in any case: when selecting the Mini Cart Contents block, the Gutenberg toolbar appears at the bottom of the editor.

To reproduce

  1. Go to Appearance > Site Editor > Template Parts > Mini Cart.
  2. Select the Mini Cart Contents block.
  3. Notice the toolbar appears at the bottom.

Expected behavior

The toolbar usually appears on top of the blocks.

Screenshots

imatge

@Aljullu Aljullu added type: bug The issue/PR concerns a confirmed bug. block: mini-cart Issues related to the Mini-Cart block. labels Jan 17, 2022
@dinhtungdu dinhtungdu assigned dinhtungdu and unassigned dinhtungdu Jan 28, 2022
@dinhtungdu
Copy link
Member

Moving this to Backlog and remove myself from Assignees so other folk can chimp in. I'm on PTO next week so I don't want to block this issue. Here is my finding on this issue:

The reason for the block toolbar to dhow at the bottom of the Mini Cart Contents block (not screen) is: there is no spacing between the top of the Mini Cart Contents block and the editor area. The tool bar will show at the top of the block if the distance between the editor area and the top edge of the block is at least 35px.

I haven't figured a good solution for that, adding margin to .editor-styles-wrapper .wp-block-woocommerce-mini-cart-contents fixes the toolbar position but the top margin can make users confused.

@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 31, 2022

By what you say, @dinhtungdu, I wonder if that's an issue in Gutenberg instead of something that we should fix downstream. What do you think?

@gigitux gigitux self-assigned this Jan 31, 2022
@gigitux
Copy link
Contributor

gigitux commented Jan 31, 2022

After some investigation, I discovered that our current implementation it is a handled-case by Gutenberg.

Potentially, we have the possibility to change this behavior, but what should be the desired result?

If I comment that code, this is the result:
image

Obviously, this result is not an acceptable result.

The best option that we, potentially, have is this:

image

But I guess this result is not acceptable from the current Gutenberg UX/UI. All the components that I checked have the toolbar above the borders.

What do you think?

@Aljullu
Copy link
Contributor Author

Aljullu commented Feb 1, 2022

Thanks for investigating this further @gigitux. Actually, it looks like the same issue happens in any other block, for example, when editing the Header template part:

imatge

imatge

I'm leaning towards opening an issue in Gutenberg's repo and closing this one. IMO, the toolbar should be displayed outside of template part canvas instead of overlapping it, but that should be fixed upstream instead of tweaking its behavior downstream. How does that sound @gigitux?

@gigitux
Copy link
Contributor

gigitux commented Feb 1, 2022

All the components that I checked have the toolbar above the borders.

@Aljullu, sorry, this sentence was not clear. I intended to say that all the blocks that don't have this "problem", have the toolbar always on top of the border. So our proposal could be not matched with the UI/UX of Gutenberg because if you see this comment is very specific about this behavior.

As you said, the best thing to do is open an issue on Gutenberg repo and get feedback about our proposal and maybe help them to implement it 👍

@gigitux
Copy link
Contributor

gigitux commented Feb 1, 2022

Opened the issue on the Gutenberg repo WordPress/gutenberg#38409

I'm closing this.

@gigitux gigitux closed this as completed Feb 1, 2022
gigitux added a commit that referenced this issue Jul 19, 2022


Mini Cart Block: additional class are visible on the frontend page
gigitux added a commit that referenced this issue Jul 19, 2022


Mini Cart Block: additional class are visible on the frontend page
gigitux added a commit that referenced this issue Jul 20, 2022
 (#6716)

Mini Cart Block: additional class are visible on the frontend page
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: mini-cart Issues related to the Mini-Cart block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants