Closed aaemnnosttv closed 10 months ago
IB ✅
Thanks for all of the context in the IB here, @techanvil 👍🏻
@techanvil @tofumatt E2E seems to be consistently failing with these now, it might only be from the upgrade to Puppeteer but I'm not sure – I don't see how the change to the tooltip we made would have broken these. Please take another look and let's open a follow-up issue for this so long as the AC is still met here.
Thanks for spotting that @aaemnnosttv. It's a bit of an odd one, as these tests weren't failing for Latest/Nightly on the E2E test run for the PR. But, in my testing, with the tests failing locally, reverting to the previously used version of Puppeteer does fix them. I've created https://github.com/google/site-kit-wp/issues/7862 to address this.
@techanvil the tooltip is now appearing on mobile. I wonder if I am too picky, though 😄 The tooltip feels a few pixels lower than the 'Settings' menu option. I have included screenshots below and wondered what you think. It's possible it was always like this, and I haven't noticed before.
Hi @wpdarren, that is indeed how it's always been - here it is on 1.111.0
. The tooltip is pointing to the Settings menu item element with its default spacing, it's just the menu item has a bit of padding on it, resulting in the tooltip position being slightly further out than might be expected.
We can probably improve the position of the tooltip - please feel free to create a separate issue for this, but it's out of scope for the current one.
Verified:
Bug Description
As recently raised by a failing E2E test in WP nightly, the admin menu tooltip we show in various places (usually when a user dismisses a CTA) to highlight Site Kit's settings page in the admin menu no longer appears.
Steps to reproduce
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
This is easily fixable for recent versions of the evergreen browsers that we support (I did some pretty thorough cross-browser testing while investigating this IB, and we should also ensure that all of our supported browsers are given a good test during QA). There is a complication when it comes to our test stack though, as the menu won't show as expected in the version of Chromium (
97.0.4691.0
) that our current Puppeteer version uses. For some reason, the click events that are dispatched during the test are handled in a different order on this version of Chromium compared to recent browser versions.Seeing as we have no requirement to support this old version of Chromium, we should apply the fix, and update Puppeteer to a version which provides a more recent Chromium version where it does work.
Within
assets/js/components/AdminMenuTooltip/useShowTooltip.js
:adminMenuToggle.click()
to instead invoke the click onadminMenuToggle.firstChild
.event.target
will match the#wp-admin-bar-menu-toggle contains
check.adminMenuToggle.firstChild
should be a backward-compatible change across all supported WP versions, so it shouldn't need to be conditional.focusout
handler in 6.4.Update Puppeteer version:
13.1.0
or above. This is the earliest version with a working Chromium version and was tested during the IB investigation with a PoC to verify it works with our CI workflows, however a higher version could be installed if it works OK. The Chromium version that comes with this version of Puppeteer is98.0.4758.0
.Within
tests/e2e/specs/modules/adsense/show-admin-menu-tooltip.test.js
:There is a PoC PR which may be continued.
Test Coverage
QA Brief
This is just one example of the tooltip which is used in a few places such as Key Metrics CTA, ABR CTA, and Enhanced Measurement notification CTAs.
Changelog entry