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

Fixes showing of tooltip on AI buttons #21437

Merged

Conversation

Jordi-PV
Copy link
Contributor

@Jordi-PV Jordi-PV commented Jun 11, 2024

Context

  • We want the Tooltip of the AI assessment buttons to be visible on hover over the buttons and to update the text to be: Optimize with AI

Summary

This PR can be summarized in the following changelog entry:

  • Fixes an unreleased bug where the tooltip on the AI assessment buttons would not be visible.

Relevant technical choices:

  • We have agreed on using a uniform color for the border of the AI assessment buttons.

  • I've refactored the logic that makes the tooltip to be shown by adding or removing the utility classes when the mouse hovers over the buttons. This logic is different than the logic for the other assessment buttons.

  • We have decided to remove the time that delayed the tooltip from being shown.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Have Yoast SEO and Yoast SEO Premium activated.
  • Open or create a new post. Make sure to have enough content and also add a focus keyphrase.
  • Use the block editor.
  • Ensure that the keyphrase is not included in the first paragraph/introduction and that it isn't used more than once in the content.
  • Open the Premium SEO analysis tab in the Yoast Premium SEO > SEO or in the Yoast SEO sidebar.
  • Check that the Keyphrase in the introduction and Keyphrase density and Keyphrase distribution assessments aren't green and show the sparkle button of the AI assessments fixes project.
  • Verify that the button has a sparkle icon with a gradient effect from purple to blue, and the border of the button has a uniform indigo-300 (#a5b4fc) color and has rounded corners.
  • Check that the button has a gray shadow at the bottom.
  • Verify that when hovering over the button with the mouse, the cursor changes to a pointer.
  • Verify that the tooltip with the "Optimize with AI" text is shown without delay.
  • Check that the button's background also changes to a slightly darker gradient effect.
  • Verify that the gray shadow at the bottom of the button is still present.
  • Check that when the button is pressed:
  1. the tooltip disappears.
  2. the background changes to a darker gradient effect from purple to blue and the sparkle icon turns white.
  3. the button should also have a dark-pink shadow at the bottom.

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 https://github.com/Yoast/plugins-automated-testing/issues/1620

Copy link

@Jordi-PV Please be aware that following packages have been abandoned and are not actively maintained anymore:

Package name Path
@yoast/babel-preset packages/babel-preset
@yoast/components packages/components
@yoast/e2e-tests packages/e2e-tests
@yoast/helpers packages/helpers
@yoast/jest-preset packages/jest-preset
@yoast/style-guide packages/style-guide

Please consider using the other packages instead.

@Jordi-PV Jordi-PV added the UI change PRs that result in a change in the UI label Jun 12, 2024
@Jordi-PV Jordi-PV marked this pull request as ready for review June 12, 2024 12:17
@coveralls
Copy link

coveralls commented Jun 12, 2024

Pull Request Test Coverage Report for Build efb72240d0cccc9e0dc9c0f53f07e0763cd74f3e

Details

  • 5 of 8 (62.5%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.006%) to 48.413%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/ai-assessment-fixes/components/ai-assessment-fixes-button.js 4 7 57.14%
Totals Coverage Status
Change from base Build 16b134c696b5ffde414d7a98eb827ea05d5a3f09: -0.006%
Covered Lines: 25086
Relevant Lines: 53680

💛 - Coveralls

@mhkuu mhkuu added this to the feature/fix-assessments milestone Jun 12, 2024
@mhkuu mhkuu added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jun 12, 2024
Copy link
Contributor

@mhkuu mhkuu left a comment

Choose a reason for hiding this comment

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

CR: Nice work! 🥇 Just a suggestion to consider adding default props.

packages/components/src/IconAIFixesButton.js Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 12, 2024

Pull Request Test Coverage Report for Build 4f072cf658661e4c05b86f9fe7500866107ac07d

Details

  • 5 of 8 (62.5%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.006%) to 48.413%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/ai-assessment-fixes/components/ai-assessment-fixes-button.js 4 7 57.14%
Totals Coverage Status
Change from base Build 16b134c696b5ffde414d7a98eb827ea05d5a3f09: -0.006%
Covered Lines: 25086
Relevant Lines: 53680

💛 - Coveralls

@mhkuu
Copy link
Contributor

mhkuu commented Jun 13, 2024

ACC: checked in Chrome and Firefox, looks great! ✨

I won't merge it yet -- maybe there are some final requests from UX regarding this 😅

@mhkuu
Copy link
Contributor

mhkuu commented Jun 13, 2024

We have a 👍 from UX so merging! 🚀

@mhkuu mhkuu merged commit e123e78 into feature/fix-assessments Jun 13, 2024
17 checks passed
@mhkuu mhkuu deleted the tooltip-on-ai-assessment-buttons-doesnt-show branch June 13, 2024 07:56
@mhkuu mhkuu changed the title Tooltip on ai assessment buttons doesnt show Fixes showing of tooltip on AI buttons Jul 16, 2024
@mhkuu mhkuu modified the milestones: feature/fix-assessments, 23.2 Jul 16, 2024
@mhkuu mhkuu added the innovation Innovative issue. Relating to performance, memory or data-flow. label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog innovation Innovative issue. Relating to performance, memory or data-flow. UI change PRs that result in a change in the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants