Skip to content

API catalog: show the product mark on spec landing pages - #4069

Open
reakaleek wants to merge 3 commits into
mainfrom
feat/api-landing-logo
Open

reakaleek wants to merge 3 commits into
mainfrom
feat/api-landing-logo

Conversation

@reakaleek

@reakaleek reakaleek commented Sep 10, 2026

Copy link
Copy Markdown
Member

API product landing pages now show the same product mark as the catalog card, next to the spec title.

Affects: API reference, Site UI

Prompt summary: Show the product logo and spec name on API spec pages, starting with the product landing page only. Keep the heading like a hub page. Do not add the mark to operations, tags, or types yet.

Why

Catalog cards already show a product mark. The spec landing page is still a bare title, so a click from the catalog loses that identity.

What

Landing heading

The product landing page puts the mark and spec title in one row. The mark comes from ProductIcons using the product id, then the API key. A missing mark leaves the title alone. No initials fallback.

Heading size

The landing h1 uses the same type as the catalog header. The mark is 40px tall so it sits with that title.

Out of scope

Operation, tag, and type pages are unchanged.

Verify

dotnet test tests/Elastic.ApiExplorer.Tests/
# GenerateProducts_LandingHeading_ShowsSpecTitleAndProductMark

Open a catalog card, then confirm the landing heading shows the mark beside the spec title.

A catalog click is a full page load. Shared view-transition names let the mark and title move to the heading.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4069/

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

The morphing names and @view-transition on API layouts added snapshot cost for a transition we do not want. The landing heading still shows the product mark.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the new landing-heading test currently uses a generic <svg assertion that can pass even when the product mark is absent; please make the assertion landing-specific.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

.ReadAllTextAsync(Path.Join(outputRoot, "api", "doc", "elasticsearch", "index.html"), TestContext.Current.CancellationToken);
html.Should().Contain("api-landing-heading");
html.Should().Contain("<h1>Elasticsearch main</h1>");
html.Should().Contain("<svg");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion is too broad for the behavior under test. The page layout always contains an inline <svg> sprite (_GlobalLayout.cshtml), so this check can pass even if the landing product mark is missing. Please assert against landing-scoped markup instead (for example api-landing-icon, or that the icon span contains the expected product icon SVG).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9db80c2 — the test now asserts api-landing-icon and the Elasticsearch product mark viewBox, not a bare <svg.

The layout sprite always includes an svg, so a bare tag check can pass without the product mark.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — no actionable issues found.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the API landing update and tests. The product mark now comes from the shared icon registry, the fallback remains safe when no icon exists, and CI is green.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants