-
Notifications
You must be signed in to change notification settings - Fork 39
refactor(atomic): declare/instantiate atomic-color-facet validation schema as private static readonly class member #6788
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
refactor(atomic): declare/instantiate atomic-color-facet validation schema as private static readonly class member #6788
Conversation
Co-authored-by: fbeaudoincoveo <[email protected]>
packages/atomic/src/components/search/atomic-color-facet/atomic-color-facet.ts
Show resolved
Hide resolved
Co-authored-by: fbeaudoincoveo <[email protected]>
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
The Bueno validation schema in
AtomicColorFacetwas instantiated in the constructor on every component creation. This refactors it to aprivate static readonlyclass member, following the pattern established inatomic-result-timespan.Additionally, the
headingLevelproperty documentation has been clarified to accurately reflect that a value of 0 is valid and renders a div instead of a heading element.Changes
private static readonly propsSchemaclass memberValidatePropsControllerto referenceAtomicColorFacet.propsSchemaheadingLevelproperty documentation to clarify that 0 is a valid value that renders a div instead of a heading elementBefore:
After:
✅ Checklist
.mdxfileindex.tsandlazy-index.tsfiles.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.