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 218
Update product category controls to use typescript #11909
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
mikejolley
added
status: needs review
type: refactor
The issue/PR is related to refactoring.
type: task
The issue is an internally driven task (e.g. from another A8c team).
labels
Nov 22, 2023
woocommercebot
requested review from
a team and
senadir
and removed request for
a team
November 22, 2023 18:06
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
assets/js/editor-components/product-category-control/index.tsx
assets/js/hocs/test/with-searched-categories.jsx |
Size Change: +577 B (0%) Total Size: 1.61 MB
ℹ️ View Unchanged
|
senadir
approved these changes
Dec 7, 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.
Testing fine and the code is looking good.
Thank you for the tests!
Comment on lines
+23
to
+38
describe( 'withSearchedCategories Component', () => { | ||
afterEach( () => { | ||
mockUtils.getCategories.mockClear(); | ||
} ); | ||
const TestComponent = withSearchedCategories( | ||
( { selected, categories, isLoading, onSearch } ) => { | ||
return ( | ||
<div | ||
data-categories={ categories } | ||
data-selected={ selected } | ||
data-isLoading={ isLoading } | ||
data-onSearch={ onSearch } | ||
/> | ||
); | ||
} | ||
); |
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.
Thank you for the test Mike!!
senadir
force-pushed
the
update/product-control-typescript
branch
from
December 7, 2023 14:05
abc990f
to
9cd6f7a
Compare
senadir
force-pushed
the
update/product-control-typescript
branch
from
December 7, 2023 15:03
9cd6f7a
to
b96612b
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
type: refactor
The issue/PR is related to refactoring.
type: task
The issue is an internally driven task (e.g. from another A8c team).
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
ProductControl
is using TypeScript already so I've removed the todo.ProductCategoryControl
was not using TypeScript, so I've converted it based on the above.Fixes #6488
Fixes #6487
Why
Refactoring/general improvements.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Featured Category
,Reviews by category
,Products by category
.WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog