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

[Experimental] Utilize WP generated class names to style interactivity stock filter block. #44073

Merged
merged 2 commits into from Jan 26, 2024

Conversation

samueljseay
Copy link
Contributor

Changes proposed in this Pull Request:

@dinhtungdu and I agreed that we don't need to create our own unique class names or use bem style syntax, its overly verbose and doesn't add anything.

Instead we scope all styles to the class name generated for the block by WP, and also remove the BEM style prefix from any scoped class names. (To keep PR's small and testable I'm addressing one block at a time.)

Additionally, I noticed a lot of copy pasted styles from the old block that we don't use or need.

This is part of #43167

How to test the changes in this Pull Request:

  1. Much like in [Experimental] Utilize WP generated class names when styling new active filters block. #44069, edit the product catalog or a page and alongside product collection add stock status filter.
  2. Also in editor try different modes like dropdown/multiple etc
  3. Check that styling looks good in editor and frontend.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

[Experimental] Unify class naming in new interactivity stock filter block.

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jan 25, 2024
@woocommercebot woocommercebot requested review from a team and Aljullu and removed request for a team January 25, 2024 10:10
@samueljseay samueljseay changed the title [Experimental] Unify class naming in new interactivity stock filter block. [Experimental] Utilize WP generated class names to style interactivity stock filter block. Jan 25, 2024
@samueljseay samueljseay removed the request for review from Aljullu January 25, 2024 10:11
@woocommerce woocommerce deleted a comment from github-actions bot Jan 25, 2024
Copy link
Contributor

github-actions bot commented Jan 25, 2024

Test Results Summary

Commit SHA: cad2980

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests271002502966m 29s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@samueljseay samueljseay reopened this Jan 26, 2024
Copy link
Member

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

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

Another great simplification! Tested on JN and the stock filter block works well as before.

image

Note that the difference between the count data is expected because we're using StoreAPI in the editor. We may want to remove it to replace with preview data later.

@samueljseay samueljseay merged commit 067cdef into trunk Jan 26, 2024
54 checks passed
@samueljseay samueljseay deleted the dev/unify-class-naming-stock-filter branch January 26, 2024 06:29
@github-actions github-actions bot added this to the 8.7.0 milestone Jan 26, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jan 26, 2024
@veljkho veljkho added status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants