DOCS-3187 Add shared top-level navigation header#331
Open
dimitrystd wants to merge 2 commits into
Open
Conversation
Injects the graphql-docs-hub's shared site-chrome header/switcher into web/index.html so api-reference.smartling.com gets the same top nav as graphql-reference.smartling.com. Removes the OpenAPI spec's x-logo (and now-unused web/smartling_logo.png), which was rendering a duplicate Smartling logo in ReDoc's own sidebar.
ReDoc's own sidebar (.menu-content, including its search box) is position: sticky; top: 0, which collides with the shared site-chrome header at the same offset once the page is scrolled, hiding the sidebar's top edge behind the header. Push the sidebar down by the header's actual measured height (owned by the graphql-docs-hub repo, so not hardcoded here) instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://api-reference.smartling.com/preview/pr-331. Tested scroll, looks good now.
Summary
web/index.htmlsoapi-reference.smartling.comgets the same top nav asgraphql-reference.smartling.com. Removes the OpenAPI spec'sx-logo(and now-unusedweb/smartling_logo.png), which was rendering a duplicate Smartling logo in ReDoc's own sidebar..menu-content, including its search box) isposition: sticky; top: 0, which collided with the new header at the same offset once the page was scrolled, hiding the sidebar's top edge (and search box) behind the header. The sidebar is now pushed down by the header's actual measured height (owned by the separategraphql-docs-hubrepo, so not hardcoded here).Test plan
npm start, confirmed header renders at the top of the REST reference page with the REST/GraphQL switcher🤖 Generated with Claude Code