This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Move Label
component to components package
#11275
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
woocommercebot
requested review from
a team and
alexflorisca
and removed request for
a team
October 16, 2023 17:08
opr
added
status: needs review
type: enhancement
The issue is a request for an enhancement.
category: extensibility
Work involving adding or updating extensibility. Useful to combine with other scopes impacted.
focus: components
Work that introduces new or updates existing components.
labels
Oct 16, 2023
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
assets/js/base/components/index.ts
packages/components/label/test/index.js |
Size Change: -4.04 kB (0%) Total Size: 1.53 MB
ℹ️ View Unchanged
|
alexflorisca
approved these changes
Oct 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one dude, looks great and great work on the testing instructions, real neat. The bullet point list lost its formatting so I edited it just to fix that and a couple of typos
opr
force-pushed
the
update/label-component
branch
from
October 17, 2023 10:48
f5b904d
to
1f85ee1
Compare
This is because importing from the package also loads the data stores. This is in itself not an issue in the real world, but it does mean several unit tests would require a re-write to mock the data correctly.
opr
force-pushed
the
update/label-component
branch
from
October 19, 2023 11:42
d837a0f
to
ff813f3
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
category: extensibility
Work involving adding or updating extensibility. Useful to combine with other scopes impacted.
focus: components
Work that introduces new or updates existing components.
type: enhancement
The issue is a request for an enhancement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR is based on #11214 (update/checkbox-component)
Move
Label
component to components package and update the places it is imported:product-sale-badge
OrderSummaryItem
ShippingRatesControlPackage
FilterElementLabel
FilterResetButton
FilterSubmitButton
LoadMoreButton
Pagination
SortSelect
active-filters
PaymentMethods
Why
As more developers integrate their extensions with WooCommerce Blocks, the case for reusing components grows. This starts the ball rolling by creating a new package. Rather than recreating components developers can access
wc.blocksComponents
and get the ones we need.Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Prerequisites
Testing steps
Products (Beta)
block to a page on your site. In the page editor, ensure theSale
badge is showing up correctly on the on sale products.Active Filters
,Filter by Attribute
, andProducts (Beta)
blocks to a page. On theFilter by Attribute
block, enable theDisplay product count
option. Enable theShow 'Apply filters' button
too.Filter by Attribute
block.Filter by Attribute
block.Filter by Attribute
block, and ensure theActive Filters
block works and has a "Clear all" button.Reviews by Product
block to a page. Set theSTARTING NUMBER OF REVIEWS
option to 1.Load more
button appears.Load more
button appears. Click it and ensure the second review loads.All Products
block to a page. Using a screen reader, focus the pagination element at the bottom of the block. Ensure it reads "Navigate to another page"Screenshots or screencast
N/A
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog