Skip to content
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

#1740 - Improve Autocomplete disabled state #21321

Merged
merged 2 commits into from Apr 23, 2024

Conversation

konradyoast
Copy link
Contributor

@konradyoast konradyoast commented Apr 16, 2024

Context

Fixes: https://github.com/Yoast/shopify-seo/issues/1740

  • In disabled state Autocomplete cursor should be set to not-allowed for whole element, and border color should not change in hover state.

Summary

This PR can be summarized in the following changelog entry:

  • [@yoast/ui-library 0.1.0] Improves styling of Autocomplete disabled state.

Relevant technical choices:

  • Improved CSS styling.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • pull this PR
  • run Storybook
  • go to Autocomplete component
  • set state for component to Disabled = true
  • check if cursor on whole element is not-allowed
  • check if after clicking on element border stays gray, not change to primary

Test for Shopify:

  • check points from 3 to 6 but on our Overview page -> Category field

Regression test for Free:

  • Deactivate Premium
  • Go to Settings > Site representation and scroll down to the Additional organization info
  • Verify the Number of employees field is not any dimmer than the fields above

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 #

@konradyoast konradyoast self-assigned this Apr 16, 2024
@konradyoast konradyoast requested a review from a team as a code owner April 16, 2024 11:56
@coveralls
Copy link

coveralls commented Apr 16, 2024

Pull Request Test Coverage Report for Build 6ef6080c1494873081f77a72dce3fd2a9f95bf28

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.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 52.267%

Totals Coverage Status
Change from base Build e9ac8ff9a236e0ff1ad9a5c711d3617ceff44c62: 0.0%
Covered Lines: 28618
Relevant Lines: 55305

💛 - Coveralls

Copy link
Member

@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.

Thanks! 🙏

Minor issue detected with the double opacity.
I noticed this in Free without Premium, when visiting our Settings > Site representation and scroll down to the Additional organization info. The Number of employees field is an Autocomplete, and you can see it dimmer than the fields above.

Also, the border seems to widen a bit when I select the field still. I couldn't figure out why precisely, but it seems related to the shadow, which is very strange. I'm willing to overlook that 😅


.yst-autocomplete__button {
@apply
yst-opacity-50
Copy link
Member

Choose a reason for hiding this comment

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

Because the button is rendered inside the disabled class, the opacity is doubled. I think you can leave out this class

Suggested change
yst-opacity-50

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, removing.

@igorschoester igorschoester added the changelog: enhancement Needs to be included in the 'Enhancements' category in the changelog label Apr 18, 2024
Copy link
Member

@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 ✅

@igorschoester igorschoester added this to the 22.7 milestone Apr 23, 2024
@igorschoester igorschoester merged commit 651d403 into trunk Apr 23, 2024
17 checks passed
@igorschoester igorschoester deleted the 1740-autocomplete-disabled-state-fixes branch April 23, 2024 06:27
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.

None yet

3 participants