Skip to content

Build the dashboard header pill (AddFeaturesButton) #13358

Closed

Description

@techanvil

Feature Description

The dashboard is where users spend their time in Site Kit, so it's where the way into the hub belongs: an Add features button in the dashboard header, sitting with the date range selector and the sharing controls, offering the hub at the moment a user is already thinking about their site.

This issue adds that button, on both the main dashboard and the entity dashboard. It carries a small red dot whenever the user has new features they haven't seen. What decides whether the dot is there is the same new-feature count behind the wp-admin menu badge and the What's new? list (#13246). Once the user has been to What's new? (#13321) the dot is gone, and the button remains as a permanent, quiet way back in.

The overlay that draws attention to this button when it first appears is a separate issue (#13360).

For reference, see the Entry points & new-feature indicators section in the design doc, and the header button design in Figma.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • An Add features button is added to the Site Kit header on both the main dashboard and the entity dashboard, alongside the date range selector and the dashboard sharing button, positioned as the design shows.
  • Clicking it navigates to the hub.
  • It carries a small red dot when the user has features that are new and that they haven't seen yet (Implement the newness model & derived selectors #13246), and no dot when they don't.
  • The dot follows that count: once the user has visited What's new? (Build the "What's new?" tab #13321), or dismissed the features listed there (Add the dismiss-with-feedback menu #13357), the dot is gone the next time a dashboard is loaded.
  • It's styled as a colour pill, standing out from the neighbouring header controls, per the Figma design — including how it appears at the viewport sizes the dashboard header supports.
  • It's shown only to authenticated users, and only when the featureDiscoveryHub feature flag is enabled.
  • Its label and its dot are conveyed to screen readers, so a user who can't see the dot is still told there's something new.

Implementation Brief

  • Create assets/svg/icons/plus-heavy.svg
    • Extract icon from Figma as an SVG. The icon should be edge-to-edge of the canvas.
  • Create assets/js/components/feature-discovery/AddFeaturesButton.tsx:
    • Import assets/svg/icons/plus-heavy.svg as PlusHeavy.
    • Render nothing if ! select( CORE_USER ).hasCapability( PERMISSION_MANAGE_OPTIONS ) or ! useFeature( 'featureDiscoveryHub' ).
    • Generate an ID for a descriptive element, ariaDescribedBy with useInstanceId().
    • Define hasNewFeatures as MODULES_READER_REVENUE_MANAGER.getNewFeatureCount() > 0 (Implement the newness model & derived selectors #13246).
    • Render an <a /> with:
      • getAdminURL( 'googlesitekit-features' ) as href.
      • googlesitekit-add-features-button as className.
      • <Icon icon={PlusHeavy} size={13} />.
      • Add features text in <Typography type={TYPE_LABEL} size={SIZE_SMALL} />.
      • aria-describedby as ariaDescribedBy if hasNewFeatures.
    • Outside of the link, if hasNewFeatures, render a <span> with:
      • id as ariaDescribedBy.
      • New features available text in <VisuallyHidden />.
    • Render a wrapper <div /> around the link and span.
  • In assets/js/components/DashboardMainApp.js
    • Render <AddFeaturesButton /> inside <Header />.
  • In assets/js/components/DashboardEntityApp.js
    • Render <AddFeaturesButton /> inside <Header />.
  • Create assets/sass/components/global/_googlesitekit-add-features-button.scss
    • Style the button according to the Figma design.
    • Style the span as the red dot, positioned over the link, using the wrapper for relative positioning. The text should be visually hidden.
    • Below $bp-wpAdminBarTablet visually hide the Add features text and display the button as a 36x36 circle in line with the other icons.

Test Coverage

  • Add unit test coverage for AddFeaturesButton, verifying its conditional visibility and the rendering of the badge when there are new features.
  • Add VRT stories for AddFeaturesButton with and without the badge.
  • Update VRT references for existing stories that show the dashboard header.

QA Brief

  • Set up Site Kit with the featureDiscoveryHub feature flag enabled.
  • Confirm that the Add features button appears in the header as per the AC.
  • Additionally:
    • Check that the button's interactive states match those on the Figma design system.
    • Confirm the button appears in the features menu shown in mobile and tablet viewports, as per Figma, which is also now shown on the entity dashboard.
  • The button will initially appear with the red dot present. To simulate visiting the "What's new?" tab which will clear the newness state for all new features, run the following snippet in the dev console:
items = googlesitekit.data
	.select( 'core/feature-discovery' )
	.getFeatures()
	.reduce(
		( items, { slug } ) => [
			...items,
			{ slug: `feature-discovery-new-${ slug }`, expiresInSeconds: 1 },
		],
		[]
	);

googlesitekit.data.dispatch( 'core/user' ).setExpirableItemTimers( items );

Changelog entry

  • Add an Add features button to the dashboard header with a badge for new features.

Activity

  1. added
    P0
    Team M
    Type: Enhancement
    and removed on Aug 18, 2026
  2. added
    Next Up
    on Aug 26, 2026
  3. assigned and unassigned on Aug 30, 2026
  4. techanvil commented on Sep 1, 2026

    @techanvil
    CollaboratorAuthor

    Hi @JakePT, please complete the Test Coverage section. The IB is otherwise looking good.

  5. 14 remaining items

  6. self-assigned this
    on Sep 28, 2026
  7. kelvinballoo commented on Sep 29, 2026

    @kelvinballoo
    Collaborator

    QA Update ⚠️

    Tested this and I have feedback on the Screen reader:

    For the screen reader,

    • With the red dot, it will say "link, Add Feature..."
      Why is there 'Link'?

      Details Image
    • Without the red dot it will say "visited, link, Add Feature"
      Why is there "visited, Link" ?

      Details Image

  8. techanvil commented on Sep 29, 2026

    @techanvil
    CollaboratorAuthor

    Hi @kelvinballoo, I'm guessing you clicked on the "Add features" button to navigate to the FDH screen, and then when you returned to the dashboard the screen reader is reading the "visited" state of the link.

    That would explain this, but if you find otherwise please let me know.

  9. removed their assignment
    on Sep 29, 2026
  10. kelvinballoo commented on Sep 29, 2026

    @kelvinballoo
    Collaborator

    Hi @techanvil , I reloaded the dashboard, clicked on the URL search bar first and then tab my way to the 'Add Features' button.

    Details
    visited.link.mov
  11. JakePT commented on Sep 29, 2026

    @JakePT
    Collaborator

    @kelvinballoo @techanvil The button is a link to the URL for the Add Features page, so I believe Link is expected, unless I'm misunderstanding the issue? I think link/visited link is a coincidence related to the sequence of testing and not actually related to the dot. "Visited link" would be expected if the button had been used before.

  12. techanvil commented on Sep 29, 2026

    @techanvil
    CollaboratorAuthor

    Thanks @JakePT, yes, that's what I meant to suggest earlier.

    @kelvinballoo if you've already clicked on the link it will be in the "visited" state, which the screen reader then lists.

    If you're seeing this before you've ever clicked on the link then it would be unexpected.

  13. kelvinballoo commented on Sep 29, 2026

    @kelvinballoo
    Collaborator

    QA Update ✅

    Thanks for clarifying both.

    Tested in incognito and there was not 'Visited' on the first round.

    Details Image

    Moving to approval as other items were verified good:

    • Button matches AC and appears on main and entity dashboard. It matches Figma.

      Details Image Image
    • Button doesn't appear on view-only dashboard.

      Details Image
    • Clicking button navigates to the FDH.

      Details
      13358.-.03.-.Navigates.to.Add.features.mov
    • When feature flag is off, button doesn't appear.

      Details
      13358.-.04.-.Feature.flag.off.add.features.doesn.t.appear.ok.mov
    • There are no mobile and tablet designs but verifying it on those looks good across breakpoints.

      Details Image Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Team MType: Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions