Skip to content

feat: point navbar dropdown to API, SDK, and CLI landing pages - #2765

Closed
TC-MO wants to merge 1 commit into
masterfrom
feat/api-sdk-cli-dropdown-landing-pages
Closed

feat: point navbar dropdown to API, SDK, and CLI landing pages#2765
TC-MO wants to merge 1 commit into
masterfrom
feat/api-sdk-cli-dropdown-landing-pages

Conversation

@TC-MO

@TC-MO TC-MO commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Replace the eleven items in the "APIs, SDKs & CLI" dropdown with three links to the section landing pages (/api, /sdk, /cli); the detailed links now live on those pages. Extend activeBaseRegex with (/|$) so the dropdown also highlights as active on the bare landing-page URLs, not only their sub-pages.

@barjin this will supersede #2761

Replace the eleven items in the "APIs, SDKs & CLI" dropdown with three
links to the section landing pages (/api, /sdk, /cli); the detailed
links now live on those pages. Extend activeBaseRegex with (/|$) so the
dropdown also highlights as active on the bare landing-page URLs, not
only their sub-pages.
@TC-MO TC-MO self-assigned this Jul 13, 2026
@TC-MO TC-MO added the t-docs Issues owned by technical writing team. label Jul 13, 2026
@apify-service-account

apify-service-account commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🗑️ Preview for this PR was deleted.

@TC-MO
TC-MO requested a review from barjin July 13, 2026 12:37
@TC-MO
TC-MO marked this pull request as ready for review July 14, 2026 08:12

@barjin barjin 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.

Thank you @TC-MO !

I'll be honest - I don't really love the UI 😅

Image]

The navbar also worked as a language switcher between JS / Python SDKs or Clients. Now, if I accidentally land on a JS SDK page (when looking for Python), I'll have to make a loop through the landing page, which adds friction.

Anyway, the code looks fine (aside from the comment), I'll leave the UI to you guys. Approving.

label: 'APIs, SDKs & CLI',
type: 'dropdown',
activeBaseRegex: '^/(api|sdk|cli)/',
activeBaseRegex: '^/(api|sdk|cli)(/|$)',

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.

This doesn't seem to work. See workarounds under facebook/docusaurus#5954 (setting activeClassName: 'navbar__link--active', not sure if it still works).

@TC-MO

TC-MO commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for comments @barjin. Good points, I think we are now trying to work within constraints of current UI, and we will definitely be making bigger redesigns and account for language switching.

@TC-MO

TC-MO commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

BTW @barjin is there a way then where we could preserve the highlight on the dropdown if on /sdk /cli or /api ?

@barjin

barjin commented Jul 27, 2026

Copy link
Copy Markdown
Member

is there a way then where we could preserve the highlight

I believe that's what I mentioned here, no?

#2765 (comment)

I'm not sure the ways described there do still work, but the thread seems authoritative enough.

Lmk if that doesn't work, we can definitely try hacking it somehow

@TC-MO

TC-MO commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

oh right 🤦 my bad still hazy after catching up after a hiatus :D will try this, if it doesn't work I'll let you know

@TC-MO TC-MO closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-docs Issues owned by technical writing team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants