Skip to content

feat(ui): Savanna API reference navigation and endpoint page layout - #56

Merged
Tushar-TG-14 merged 20 commits into
tigergraph:mainfrom
ngarakapati:docs/savanna-rest-api
Sep 24, 2026
Merged

Tushar-TG-14 merged 20 commits into
tigergraph:mainfrom
ngarakapati:docs/savanna-rest-api

Conversation

@ngarakapati

Copy link
Copy Markdown
Contributor

Summary

Cloud theme updates to support the new Savanna REST API reference in cloud-docs: navigation for large endpoint catalogs, dedicated endpoint page chrome, and small reading UX fixes.

Navigation

  • Platform / API reference / Changelog section tabs (nav-sections) in the toolbar on cloud-themed docs.
  • REST API sidebar: HTTP method badges, always-expanded endpoint groups, long-label wrapping without layout shift on selection (per-label bold width measurement).
  • Session-persisted nav scroll and scroll-to-reveal when the current endpoint is off-screen after in-content navigation.

API reference pages

  • api-reference.css + 11-api-reference.js — two-column layout (main + examples), request/response UI, language picker icons.
  • Response tab indicator uses accessible brand orange accent.

Page chrome & code blocks

  • Optional Run in Postman button when page-postman-url is set (page-actions partial).
  • Cloud theme card-style code blocks with icon copy controls; copy support for unhighlighted listing blocks.

Other

  • On-this-page TOC tracking tuned for long API pages (cloud theme).
  • Breadcrumb version label omits default display version where appropriate.

Companion change: pair with the cloud-docs PR that generates endpoint .adoc pages using the data-api-reference markup this UI expects.

Test plan

  • npx gulp bundle passes; use the produced ui-bundle.zip with local Savanna preview.
  • On cloud docs: section tabs switch between Platform, API reference, and Changelog.
  • API reference nav shows grouped endpoints with GET/POST/… badges; scroll position stable across endpoint pages.
  • Open several endpoint pages: layout, samples tabs, response tabs, and copy buttons work.
  • REST API overview shows Run in Postman when page-postman-url is set.
  • Non–API-reference Savanna pages still use breadcrumbs (no tabs) and unchanged behavior where cloud scoping applies.

Split navigation into Platform, API reference, and Changelog tabs; render
endpoint groups with HTTP method badges and always-expanded section titles.
Store nav menu scroll offset in sessionStorage keyed by menu identity so
API reference browsing does not jump the sidebar on each endpoint page.
Use a viewport-based reading line instead of special-casing the page bottom
so the TOC tracks the section you are reading on long API pages.
Split method badge and endpoint title so multi-line names wrap cleanly and
reserve width for bold current-page styling.
Measure per-endpoint bold width ratios after fonts load and scroll the menu
only when the current entry would be hidden after a cross-page navigation.
Style the two-column reference layout, language picker, and sample tabs, and
align section tab indicators with in-page tab styling.
The API reference work changed the left menu's scroll behaviour, the
on-this-page activation point, the breadcrumb version suffix, and the
nav label markup for every component the bundle serves, not just the
cloud ones. Gate each on the cloud theme so other components keep
Antora's behaviour.
Render Postman's hosted button beside page actions when the page attribute
is set.
Restyle listing and literal blocks with card borders, icon copy buttons, and
copy support for unhighlighted pre blocks in the cloud theme.
Replace tip-green response tab accent with a darkened brand orange for
contrast on small selected labels.
Center and scale language SVGs on a 24x24 canvas and enlarge masked icons
so every sample tab aligns consistently.
@Tushar-TG-14

Copy link
Copy Markdown
Collaborator

@ngarakapati

  1. Can we test this UI bundle with the companion cloud-docs PR end-to-end before merging? Especially the API navigation, endpoint pages, language/response tabs, copy buttons, and Postman button.
  2. I noticed the code block font size is changing from 14px to 13px for the Cloud theme. Is this change required for the new API reference, or will it affect existing Savanna/Cloud Classic pages too?
  3. The HTTP method detection currently supports only GET, POST, PUT, PATCH, and DELETE. Is that enough for all Savanna API endpoints?
  4. Have we tested the new API reference controls with keyboard navigation/accessibility on an actual endpoint page?

Rebuild ui-bundle.zip so it includes the SEO metadata from main plus this PR's API reference UI.
@ngarakapati

Copy link
Copy Markdown
Contributor Author

Thanks @Tushar-TG-14 .

  1. Sure, we have to merge this PR, so that bundle gets updated and the cloud-docs could cosume the recent bundle for testing.

  2. Yeah, that’s intentional. Cloud pre blocks are 13px now, API reference and the rest of Savanna / Cloud Classic.

  3. The Savanna API only has GET, POST, PUT, and DELETE. That’s what the nav is matching.

  4. Yes, I tested couple of endpoints

@Tushar-TG-14
Tushar-TG-14 merged commit f182d1a into tigergraph:main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants