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

Explore how to inject the Mini Cart block into headers #42385

Open
Tracked by #42339
albarin opened this issue Apr 28, 2023 · 7 comments
Open
Tracked by #42339

Explore how to inject the Mini Cart block into headers #42385

albarin opened this issue Apr 28, 2023 · 7 comments
Assignees

Comments

@albarin
Copy link
Contributor

albarin commented Apr 28, 2023

Instead of creating our own WooCommerce Blocks header patterns, we would like to explore the possibility of injecting the Mini Cart block into existing Core and WP header patterns (more context here: p1682448941652889-slack-C02FL3X7KR6)

There are some explorations already around this, check:

@nefeline
Copy link
Member

nefeline commented May 11, 2023

We are waiting on WordPress/gutenberg#50103 to get started with this experiment and rely on auto-inserting blocks for injecting the Mini Cart block into headers. I have already reached out to Bernie on that PR to let us know when we are good to go.

@nefeline nefeline added the status: on hold The issue is currently not prioritized. label May 11, 2023
@nefeline
Copy link
Member

I'll be AFK for the next two weeks, so I'm unassigning myself from this issue in case anyone else wants to work on it while I'm away.

@nefeline nefeline removed their assignment May 31, 2023
@Marc-pi
Copy link

Marc-pi commented Jun 30, 2023

the issue's title is more generic than the description, the latest is more focus on core patterns.
Here i extend the need to other parts of WP Core

currently, the mini-cart block cannot be added within the WP Navigation.
cannot be found when making a search to add it

WP6.2.2 / Gutenberg 16.1.0 / Woo 7.8.1 / Woo Blocks 10.5.0
image

We can only add it outside the navigation component.
poke @nefeline / @albarin

@nefeline nefeline self-assigned this Jul 7, 2023
@nefeline
Copy link
Member

nefeline commented Jul 11, 2023

Hi there, @Marc-pi , thanks for reaching out to us! That's true; currently, inserting the mini-cart block within the navigation block is not possible. In this issue, we are exploring all possible venues for auto-inserting this block in the header (both inside and outside the navigation block): after verifying what's possible, new issues/PRs will be created to implement the enhancements.

@nefeline
Copy link
Member

Auto-inserting blocks exploration

@nefeline nefeline removed the status: on hold The issue is currently not prioritized. label Jul 11, 2023
@nefeline
Copy link
Member

PS: while working on this issue I noticed the mini-cart block wasn't still being registered via a metadata file so I went ahead and made the change: woocommerce/woocommerce-blocks#10168 . @Aljullu I hope you don't mind I tagged you for reviewing this one since you have a lot of experience with this block =)

@albarin albarin added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Jul 18, 2023
@nefeline nefeline removed the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Aug 17, 2023
@nerrad
Copy link
Contributor

nerrad commented Aug 28, 2023

Just noting a new tracking issue created for the Auto-Inserting Blocks API and what's being targeted for WordPress 6.4.

At WCUS 2023 Contributor Day, I also did a rough POC for the API so it respected the supports.multiple configuration in the auto-inserted block metadata. Something along this line would be needed to ensure the mini-cart block is only inserted in one location. There are still downsides to the current POC which has generated some discussion around what still needs addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants