wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Adjusts the popover component

Open Jordi-PV opened this issue 7 months ago • 1 comments

Context

  • To apply improvements to the popover component previously added to the ui-library by this PR.

Summary

This PR can be summarized in the following changelog entry:

  • [@yoast/ui-library non-user-facing] Improves the popover component in the ui-library.

Relevant technical choices:

  • The wai-aria attributes have been removed and can be added by the user by means of the spread props.
  • The style rules to position the popover for RTL apply the mirroring layout behaviour, flipping the position of the popover (see the desing file).
  • The popover component is a state controlled component (meaning the parent component (ie button) owns the visibility state and decides when the popover should be shown.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Checkout to this branch in the wordpress-seo repo.
  • In your terminal run: yarn workspace @yoast/ui-library storybook to open the storybook on your local server.
  • Under the Components section on the left sidebar, look for the Popover component.
  • Click the Show code button at the bottom-right side of the 'Docs' page to see the React code for the component. image
  • Test the different position of the popover by changing the position in the select menu options.
  • Change the direction to RTL on the top menu.
  • Test the different position of the popover by changing the position in the select menu options.
  • Try adding a different text by filling in the Edit string... field in the children argument.
  • Toggle the hasBackdrop prop to see the popover with a backdrop.
  • Toggle the popover isVisible prop to hide and show the popover.
  • Check the Accessibility tab in all stories and confirm that there are not Violations or Incomplete results. image

Relevant test scenarios

  • [X] 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)
  • [X] Changes should be tested on different browsers
  • [ ] Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • [X] 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

  • [X] 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

  • [X] 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.
  • [X] I have written this PR in accordance with my team's definition of done.
  • [X] I have checked that the base branch is correctly set.

Innovation

  • [X] 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 #22260

Jordi-PV avatar Jun 02 '25 09:06 Jordi-PV

A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.

github-actions[bot] avatar Jun 05 '25 09:06 github-actions[bot]

Pull Request Test Coverage Report for Build 451d08bb87d917e1ade06595d6ef8c266f9e01f7

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.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.001%) to 53.882%

Files with Coverage Reduction New Missed Lines %
packages/js/src/components/SEMrushRelatedKeyphrasesModalContent.js 2 83.33%
<!-- Total: 2
Totals Coverage Status
Change from base Build e00300cb2c0b4316559f98b6f1f8dd5807c19fbf: 0.001%
Covered Lines: 30485
Relevant Lines: 57541

💛 - Coveralls

coveralls avatar Jun 24 '25 14:06 coveralls

AC 🚧 The position right and left, the arrow border is not clear. I'm not sure it has a border, seems like the shadow does that work, so lets fix it also here.

vraja-pro avatar Jul 09 '25 14:07 vraja-pro