Skip to content

Adds support for optional label in the checkbox component#22372

Merged
igorschoester merged 3 commits intotrunkfrom
checkbox-field-label-not-required
Jun 25, 2025
Merged

Adds support for optional label in the checkbox component#22372
igorschoester merged 3 commits intotrunkfrom
checkbox-field-label-not-required

Conversation

@vraja-pro
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro commented Jun 23, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • [@yoast/ui-library 0.1.0] Adds support for optional label for checkbox components.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

For developers

  • Run the storybook
  • Smoke test the element "Checkbox"
  • Check you see another story for "Without label"
  • Check the documentation is clear.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

@vraja-pro vraja-pro added the changelog: other Needs to be included in the 'Other' category in the changelog label Jun 23, 2025
@vraja-pro vraja-pro requested a review from a team as a code owner June 23, 2025 08:46
@vraja-pro vraja-pro changed the title Remove required label and adds default Adds support for optional label in the checkbox component Jun 23, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 23, 2025

Pull Request Test Coverage Report for Build ae9695c6802ca06686f786cc62d1c2381fc99b70

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.008%) to 53.661%

Files with Coverage Reduction New Missed Lines %
packages/js/src/introductions/initialize.js 6 0.0%
packages/js/src/introductions/components/content.js 9 0.0%
Totals Coverage Status
Change from base Build 3010e3277d95433295cd9d14a28c13715abc6a66: -0.008%
Covered Lines: 30346
Relevant Lines: 57567

💛 - Coveralls

@enricobattocchi enricobattocchi added changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog and removed changelog: other Needs to be included in the 'Other' category in the changelog labels Jun 23, 2025
@vraja-pro vraja-pro self-assigned this Jun 23, 2025
Copy link
Copy Markdown
Contributor

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR && AT ✅

Can merge, but two remarks:

  1. A story where we mention adding aria-label instead of passing a label
  2. You fixed the default argument and JSDoc for className, but the disabled is also missing 😇

Good to merge regardless, so leaving whether you want to do anything about the above to you.

@vraja-pro vraja-pro force-pushed the checkbox-field-label-not-required branch from 8340951 to 25c610d Compare June 23, 2025 11:52
@vraja-pro vraja-pro removed their assignment Jun 23, 2025
@igorschoester igorschoester self-assigned this Jun 25, 2025
Copy link
Copy Markdown
Contributor

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR && AT ✅

I think the lint failure is on trunk

@igorschoester igorschoester added this to the 25.5 milestone Jun 25, 2025
@igorschoester igorschoester merged commit fac5f60 into trunk Jun 25, 2025
18 of 19 checks passed
@igorschoester igorschoester deleted the checkbox-field-label-not-required branch June 25, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants