Add Feature catalog registry for Explore pages

What does this MR do and why?

Stacked MRs (1 of 3). Blocks !261973 (merged) and !261974 (merged), which target this branch.

Adds a CE registry describing the features in the Feature catalog. The Feature catalog modal currently uses the sidebar nav as the source of truth for its features list. The modal is evolving to describe all features, not only the ones the user is entitled to, so the catalog needs its own data source: the nav keeps deciding entitlement, and the catalog describes what's available. The catalog lives in CE so it can show features available on upgrade, and a drift spec keeps it in sync with the nav.

  • Catalog::NavItem and Catalog::Capability describe catalog entries. GroupPanel and ProjectPanel hold the content, filled in by the stacked MRs.
  • Catalog.explore_pages builds both tier pages: each page lists its own highlights, credit-based capabilities appear on both pages, the Ultimate page also lists Premium items, items a capability replaces are dropped, and enhancements record which tier their text describes.
  • A drift spec in EE keeps the catalog in step with the sidebar: each entry's tier, title, description, icon and category must match the nav, and every nav item gated by a licensed feature must have an entry. The coverage check is pending for each panel until its content MR merges.
  • Strings are stored as N_() msgids and translated with s_() on read, reusing the nav's own msgids.
  • Maps the catalog files and the group and project sidebars to the drift spec in tests.yml, so predictive tests select it when either side changes.
  • Adds the catalog paths to the Growth section in CODEOWNERS.

No user-facing change: the endpoint (#632721) and UI (#632722) use the registry.

Data model

Catalog.explore_pages(panel:, deployment:) returns one ExplorePage per tier page:

{
  premium:  ExplorePage(highlights: [Capability], credits: [Capability], new_items: [NavItem], enhanced_items: [Enhancement]),
  ultimate: ExplorePage(...)
}
Object Fields Notes
NavItem item_id, panel, category, tier, licensed_features, title, description, icon, docs_path, shown_on_deployments, enhancements One per sidebar nav item, keyed by panel + item_id. tier is :free, :premium, :ultimate or :add_on. enhancements is only set on Free items, for example { premium: N_('…') }.
Capability id, panel, tier, title, description, icon, docs_path, shown_on_deployments, supersedes_nav_items A card that isn't a single nav item. :premium/:ultimate capabilities are highlights; :add_on ones are credits. supersedes_nav_items drops the nav items it covers from the same page.
Enhancement nav_item, tier, text tier is the plan the text describes: :premium when the Ultimate page inherits Premium text.
ExplorePage highlights, credits, new_items, enhanced_items Content for one page, before filtering for the viewer.

title, description and enhancement text are stored as msgids; read them with translated_title, translated_description and Enhancement#text, which is already translated.

Example, using the group content from !261973 (merged) (self-managed, Premium page):

page = Catalog.explore_pages(panel: :group, deployment: :self_managed)[:premium]

page.highlights.map(&:id)          # => [:merge_controls]
page.credits.map(&:id)             # => [:duo_agent_platform, :secrets_manager]
page.new_items.map(&:item_id)      # => [:epic_boards, :roadmap, :iterations, ...]
page.enhanced_items.first
# => #<data Enhancement nav_item=#<data NavItem item_id=:labels ...>, tier=:premium,
#      text="Use scoped labels so only one value in a set applies at a time">

References

  • #632720
  • #631003
  • Follow-ups: #632721 (endpoint), #632722 (UI)

Screenshots or screen recordings

Not applicable: no UI change.

How to set up and validate locally

  1. In the Rails console, check both pages build and are empty until the content MRs merge:

    pages = Onboarding::FeatureLibrary::Catalog.explore_pages(panel: :group, deployment: :self_managed)
    pages.keys # => [:premium, :ultimate]
    pages[:premium] # => #<data ExplorePage highlights=[], credits=[], new_items=[], enhanced_items=[]>

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kiesha Herman

Merge request reports

Loading
Loading