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

Product Collection: Add product spacing #43307

Open
3 of 5 tasks
bgardner opened this issue Jan 5, 2024 · 4 comments · May be fixed by #46255
Open
3 of 5 tasks

Product Collection: Add product spacing #43307

bgardner opened this issue Jan 5, 2024 · 4 comments · May be fixed by #46255
Assignees
Labels
block: product collection Issues related to the Product Collection block focus: FSE Issues related to Full Site Editing team: Kirigami & Origami WC Store Editing (FSE) type: community contribution type: enhancement The issue is a request for an enhancement.

Comments

@bgardner
Copy link

bgardner commented Jan 5, 2024

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

I was recently prompted to update to this block from the Query Post block. It would be great to include support for Block Spacing, so that folks can adjust the gap spacing in between their columns and rows in the same way Query Post block does. Otherwise, we’re forced into using the following opinionated css:

.wc-block-product-template.is-flex-container {
    flex-direction: row;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25em;
}

Expected behavior

Have access to Block Spacing in sidebar.

Actual behavior

No access to Block Spacing.

Steps to reproduce

  1. Go to Site Editor > Templates > Product Catalog and insert Product Collection block.
  2. See lack of option for Block Spacing.

WordPress Environment

WordPress 6.4.2, WooCommerce 8.5 RC1

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@bgardner bgardner changed the title Product Collection block: Add Block Spacing Product Collection/Template block: Add Block Spacing Jan 5, 2024
@lanej0 lanej0 added team: Kirigami & Origami WC Store Editing (FSE) focus: FSE Issues related to Full Site Editing labels Jan 9, 2024
@roykho roykho added type: enhancement The issue is a request for an enhancement. block: product collection Issues related to the Product Collection block labels Jan 11, 2024
@kmanijak
Copy link
Contributor

kmanijak commented Mar 6, 2024

Thanks for the feedback! I'm moving this to Product Collection backlog and we should tackle this in upcoming weeks!

@sunyatasattva
Copy link
Contributor

Related discussion: #47437

@kmanijak
Copy link
Contributor

Goals for this issue:

  • Layout controls include block spacing (or product spacing) control
  • Merchants can manually set fixed number of columns
  • Merchants can set number of columns to responsive mode. In that case:
    • they can set minimum column width
    • they can set maximum number of columns

@kmanijak kmanijak changed the title Product Collection/Template block: Add Block Spacing Product Collection: Add Block Spacing May 29, 2024
@kmanijak kmanijak changed the title Product Collection: Add Block Spacing Product Collection: Add product spacing May 29, 2024
@ObliviousHarmony
Copy link
Contributor

After the discussion I've started working on a compatibility layer so that we can implement an upstream change that adds support for defining a maximum column. This works by replacing the layout support style generation on the server and the client with one that runs custom code when using the collection block. It will then fall back to the current implementation available in WordPress (or Gutenberg, whichever has priority) for all other blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: product collection Issues related to the Product Collection block focus: FSE Issues related to Full Site Editing team: Kirigami & Origami WC Store Editing (FSE) type: community contribution type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants