Skip to content

Build the FeatureDiscoveryApp shell (hero, TabBar, HashRouter) #13248

Closed

Description

@techanvil

Feature Description

With the hub page standing, this issue builds the hub's shell: the page hero that introduces the hub, and the tab navigation the feature lists sit inside. It is modelled on the Settings app, which has the same shape — a page whose tabs are deep-linkable, so a link can point at one of them directly.

The tabs' contents are out of scope: each is built as its own issue — All services and features by #13328 and What's new? by #13321 — so this issue lands the tabs with placeholder content.

For reference, see the All services and features design in Figma, and the Where the hub lives and UI component architecture sections in the design doc.


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

Acceptance criteria

  • The hub page renders the standard Site Kit header, as the Settings page does.
  • The page then opens with a hero, comprising the heading Drive your site's success and the body copy "Discover features built to help your site succeed and take control of your site's growth. Turn on additional features and tools to uncover deeper insights about your audience, simplify your reporting, and reach your goals faster."
  • Below the hero, two tabs are shown, in this order: All services and features, then What's new?.
  • Selecting a tab shows that tab's content and updates the page URL, so that each tab can be linked to directly — #/all-services for All services and features, and #/whats-new for What's new?. Opening one of those URLs opens the hub on that tab.
  • The browser's back and forward buttons move between the tabs the user has visited.
  • Opening the hub with no tab in the URL lands the user on What's new?. Which tab a user lands on by default depends on whether they are new to Site Kit, which is covered by Route the default tab for new vs. returning users #13319.
  • Each tab renders placeholder content at this stage; the contents of both tabs are built by Build the "All services and features" tab + goal groups #13328 and Build the "What's new?" tab #13321.
  • The hero and the tab bar match the Figma design.

Implementation Brief

  • In assets/js/components/feature-discovery/FeatureDiscoveryApp.tsx:
    • Replace the blank app scaffold from Stand up the hub page: Screen, entrypoint & view context #13244 with the hub shell component. Refer the Settings app structure for the same.
    • Render the standard Site Kit page header Header component first, then the hub hero directly in this component rather than extracting a separate hero sub-component.
    • Render the hero copy from the acceptance criteria: heading Drive your site's success and the supporting descriptive paragraph from the issue/design.
    • Use existing layout primitives and TabBar / Tab from googlesitekit-components so the shell follows Site Kit page spacing and tab behavior instead of introducing custom navigation.
    • Keep the tab order fixed to All services and features first and What's new? second.
    • Derive the active tab from the current hash route, using the same Link-driven tab pattern as Settings so tab selection is URL-backed rather than local component state only.
    • Render FeatureDiscoveryContent below the tab bar; the detail panel, in-place setup panels, or catalog card UI will be added in separate issues.
  • In assets/js/components/feature-discovery/FeatureDiscoveryContent.tsx:
    • Add the hub's routed content switch for #/all-services and #/whats-new, keeping the routing responsibility separate from the shell.
    • Add placeholder tab surfaces only for this issue, ideally as all-services/AllServicesTab.tsx and whats-new/WhatsNewTab.tsx, so the component hierarchy is in place for follow-up issues without pulling catalog logic into this change.
    • Use Route / Switch from react-router-dom and a default redirect so opening ?page=googlesitekit-features with no hash lands on #/whats-new for now. Refer SettingsModules component.
    • Ensure route transitions push hash history entries so direct links, browser back, and browser forward all move across previously visited tabs correctly.
  • In the new feature discovery shell styling:
    • Add a feature-discovery Sass partial in assets/sass/components/feature-discovery for the page-specific shell styles.
    • Style only the shell pieces introduced here: the hero block, the tab-bar container, and placeholder tab content wrappers.
    • Use googlesitekit-* BEM naming pattern and shared layout/tab primitives so the shell matches the Figma direction.

Test Coverage

  • Add JS component tests for the shell routing behavior: tab order, tab selection updating location.hash, direct opening of #/all-services and #/whats-new, and the no-hash default redirect to #/whats-new.
  • Add navigation tests that verify browser history integration for the hash routes, so back/forward moves between tabs the user already visited.
  • Add render coverage for the shell and placeholder surfaces: standard Site Kit header present, hero heading/body copy rendered, and each route showing only its own placeholder content.

QA Brief

  1. Enable the featureDiscoveryHub feature flag.
  2. Add Features should appear in the admin menu, under Site Kit.
  3. Clicking the add features link should navigate to /wp-admin/admin.php?page=googlesitekit-features.
  4. At this stage you should be immediately redirected to /wp-admin/admin.php?page=googlesitekit-features#/whats-new.
  5. The What's new tab should be active and the "What’s new?" placeholder content should be shown.
  6. Clicking the back button should take you to wherever you were before clicking Add Features, not the URL without #/whats-new.
  7. Return the the discovery hub. Clicking between tabs should update the content to the appropriate placeholder and the URL in the browser's address bar. Clicking backwards and forwards should move backwards and forwards through the history in the expected sequence.
  8. Clicking the active tab multiple times and then pressing back should not treat each click as an additional navigation, and should return to the tab or page from before the active tab was clicked multiple times.
  9. Refreshing the page should load the same tab.
  10. The text size and spacing should adapt to smaller displays in a logical way. There is no design reference for mobile at this stage but the desktop should match Figma.

Changelog entry

  • Add the feature discovery hub page shell with hero, tab navigation, and deep-linkable routes.

Activity

  1. self-assigned this
    on Aug 3, 2026
  2. added
    P0
    Type: Enhancement
    Team M
    on Aug 3, 2026
  3. removed their assignment
    on Aug 3, 2026
  4. self-assigned this
    on Aug 14, 2026
  5. techanvil commented on Aug 18, 2026

    @techanvil
    CollaboratorAuthor

    IB ✅

  6. removed their assignment
    on Aug 18, 2026
  7. assigned and unassigned on Sep 7, 2026
  8. assigned and unassigned on Sep 9, 2026
  9. removed their assignment
    on Sep 9, 2026
  10. self-assigned this
    on Sep 14, 2026
  11. mohitwp commented on Sep 15, 2026

    @mohitwp
    Collaborator

    QA Update ✅

    Tested the Feature Discovery Hub shell with featureDiscoveryHub flag enabled.

    Verified:

    • Add Features menu item is displayed and navigates to the Feature Discovery Hub.
    • Hub loads with the default #/whats-new route and What's new tab selected.
    • Site Kit header and Hero section content/layout match the expected design.
    • Both tabs are displayed in the correct order:
      • All services and features
      • What's new?
    • Tab switching works correctly and updates the URL hash:
      • #/all-services
      • #/whats-new
    • Direct URL access to both routes loads the correct active tab.
    • Browser back/forward navigation works correctly between tab routes.
    • Refreshing the page preserves the current selected tab.
    • Correct placeholder content is displayed for each tab.
    • Verified responsive behaviour for the Feature Discovery Hub layout.
    • Verified Add Features menu item not display if featureDiscoveryHub flag disabled.
    • Verified design with Figma.
    Details
    Recording.3386.mp4
    Recording.3387.mp4
    Recording.3388.mp4
    Image Image
  12. removed their assignment
    on Sep 15, 2026
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