Update the help menu’s list of items.
Feature Description
Update the help menu’s list of items.
See the Figma design, and the help menu section in the Design Doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The help menu is updated to contain the following items, and is updated to match the Figma design.
- Browse documentation
- This item links opens the URL https://sitekit.withgoogle.com/documentation/ in a new tab.
- Get free support
- Opens the URL https://wordpress.org/support/plugin/google-site-kit/ in a new tab.
- Start guided tour
- Inactive for now, this will trigger the dashboard tour (see #11820).
- Send feedback
- Opens the URL https://wordpress.org/support/plugin/google-site-kit/reviews/ in a new tab.
- Browse documentation
- The change is gated behind the
setupFlowRefreshfeature flag.
Implementation Brief
See the implementation guide in the Design Doc for guidelines on how to implement this issue.
- [ ] Download all the 4 icons from Figma in the
assets/svg/icons/folder - [ ] In
assets/js/components/help/HelpMenuLink.js- [ ] Accept an
onClickcallback in the props - [ ] Rename the existing
onClickcallback to something else and callonClickprop inside, before the GA tracking - [ ] Make the
hrefprop optional - [ ] Accept an
iconprop - [ ] Pass the
iconprop to theLinkcomponent'sleadingIconprop
- [ ] Accept an
- [ ] In
assets/js/components/help/HelpMenu.js, check ifsetupFlowRefreshis enabled. If so, add thegooglesitekit-help-menuclass to theMenucomponent to override some of its styles - [ ] Extract the existing menu items to an array.
- Each object in the array should have:
gaEventLabelhrefchildren
- The Adsense help item should remain conditional to
adSenseModuleActivebeing true
- Each object in the array should have:
- [ ] Create a similar array for the SFR menu items, which have slightly different copy and the addition of icons in the new
iconprop. The icons need to have theirwidthandheightprops set to24px- Browse documentation - https://sitekit.withgoogle.com/documentation/
- Get free support - https://wordpress.org/support/plugin/google-site-kit/
- Start guided tour - an empty
onClickcallback for now - Send feedback - https://wordpress.org/support/plugin/google-site-kit/reviews/
- [ ] Render the menu items array inside
Menudepending on whethersetupFlowRefreshis enabled - [ ] Rename the
assets/sass/components/global/_googlesitekit-help-menu-link.scssfile to_googlesitekit-help-menu.scssas we'll style the container as well. Update the import inassets/sass/admin.scssas well. - [ ] In
assets/sass/components/global/_googlesitekit-help-menu.scss, wrap all new styles in.googlesitekit-help-menu- [ ] Update the menu's shadow according to the Figma design
- [ ] Update the vertical padding of the inner list (
.mdc-list) to12px - [ ] Update the height of the menu items by targetting
.mdc-list-itemand setting height to44px- This combination of changing the menu's vertical padding and making the items shorter gets us as close as possible to the spacings on Figma
- [ ] Update the link's text typography (letter-spacing and line-height) according to the Figma design by targeting
.googlesitekit-cta-link - [ ] Override the existing
fill: currentColorstyle that's being applied to the icons inside the menu links by targeting.googlesitekit-cta-link svgand settingfill: none - [ ] Add more space between link's icon and text by targeting
.googlesitekit-cta-link .googlesitekit-icon-wrapperand settingmargin-rightto16px !important!importantis necessary here because the existing margin is set inline inassets/js/components/IconWrapper.js
- [ ] Update the horizontal spacing by targeting
.googlesitekit-help-menu-link .googlesitekit-cta-linkand setting padding to0 24px
Test Coverage
- Update failing snapshots/VRTs if any.
QA Brief
- Set up Site Kit with
setupFlowRefreshenabled - Ensure the help menu matches the Figma design
- Ensure the items in the menu work correctly (the tour is not implemented yet)
Changelog entry
- Update the help menu's list of items and add icons.
@techanvil I noticed that the help menu as an Adense specific item ("Get help with AdSense") that only appears when Adsense is active, but the Figma design does not have it. Are we going to omit it in SFR or was it just missed? If we're going to keep it, then we'll need an icon for it to stay consistent.
Thanks @abdelmalekkkkk, great spot - that has simply been missed. I've asked @sigal-teller about it on Figma. We can proceed with this issue as defined, and open a new one to add the SFR version of the AdSense menu item if we are indeed keeping it.
As to the IB - this is generally looking good. A few points:
- Re. the use of the
.googlesitekit-help-menu--setupFlowRefresh- I have been trying to avoid referencing SFR in our SCSS like this, preferring an approach where we don't need to rename anything when we strip out the feature flag, although I can see we do already have a similar class name for the Analytics setup module. In this case, I'd suggest simply using.googlesitekit-help-menufor the class name - when we strip out the feature flag it will be unconditionally applied, and will look fine without needing to rename it. - Having to use
!importantis unfortunate, but I think it's acceptable here - it would be good to remove thestyleprop fromIconWrapperin a future issue though, and remove this use of!importantalong with it. I've made a note to add an issue. - Please can you complete the Test Coverage section :)
Thanks for the review @techanvil.
I updated the IB to remove the SFR specific class and completed the Test Coverage section.
Thanks @abdelmalekkkkk! That LGTM.
IB ✅
QA Update ✅
- Tested on dev environment.
- Tested when
setupFlowRefreshenabled - Verified that updated help menu appears when
setupFlowRefreshis enabled. - Verified that help menu changes are behind
setupFlowRefreshfeature flag. - Verified that the help menu matches the Figma design.
- Verified that all links are navigating as per AC.
- Tested on desktop, mobile and tablet viewports.
- Note : The tour is not implemented yet.