Skip to content

Document unified addSettingsLink and related deprecations in admin nav docs#3204

Open
unrevised6419 wants to merge 4 commits into
strapi:mainfrom
unrevised6419:cms/admin-navigation-settings-update
Open

Document unified addSettingsLink and related deprecations in admin nav docs#3204
unrevised6419 wants to merge 4 commits into
strapi:mainfrom
unrevised6419:cms/admin-navigation-settings-update

Conversation

@unrevised6419

Copy link
Copy Markdown
Contributor

Description

Updates docs/cms/plugins-development/admin-navigation-settings.md to match the current StrapiApp / Router source in strapi/strapi.

Unified addSettingsLink API

  • Promote addSettingsLink(sectionId | section, link | links) as the single recommended method. It now accepts either a section id string (extend existing section) or a section object { id, intlLabel } (create a new section), and either a single link or an array of links as the second argument.
  • Update Tldr, "Creating a new settings section" example, and "Adding links to existing settings sections" example accordingly.

Document deprecated methods

  • Add a dedicated ## Deprecated methods section with ❌/✅ migration snippets for:
    • createSettingSection(section, links) — replace with addSettingsLink(section, links).
    • addSettingsLinks(sectionId, links) — replace with singular addSettingsLink(sectionId, links).
  • Add inline :::caution admonitions next to each primary example pointing at the deprecated counterpart.
  • Clarify that addSettingsLinks is still exposed on the plugin bootstrap argument bag, while createSettingSection is only reachable from register(app).

Fix parameter-table drift (required column + types)
Reconciled against packages/core/admin/admin/src/core/apis/router.tsx (MenuItem, UnloadedSettingsLink):

  • permissions is required by the type contract (pass [] for no restrictions) — was previously marked optional.
  • Component is optional (omitting registers no route, label-only entry) — was previously marked required.
  • icon type corrected from React.Component to React.ElementType.
  • Added missing optional params: target, notificationsCount, exact (menu link); position, exact (settings link).

Misc

  • Updated the "Path conventions for to" table to label rows by the unified API (with section object / with section id) rather than the deprecated createSettingSection.

Related issue(s)/PR(s)

Source of truth for the API surface documented here: strapi/strapi#26433.

- Promote unified `addSettingsLink(sectionId | section, link | links)` as primary API.
- Mark `createSettingSection()` and `addSettingsLinks()` as deprecated; add dedicated "Deprecated methods" section with migration examples.
- Fix required-column drift against StrapiApp/Router source: `permissions` is required (pass `[]` for none); `Component` is optional (omitting registers no route). Correct `icon` type to `React.ElementType`.
- Add missing optional params: `target`, `notificationsCount`, `exact` for menu links; `position`, `exact` for settings links.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Jun 1, 2026 2:05pm

Request Review

Comment thread docusaurus/docs/cms/plugins-development/admin-navigation-settings.md Outdated
Comment thread docusaurus/docs/cms/plugins-development/admin-navigation-settings.md Outdated
@pwizla pwizla changed the title docs(cms): update admin nav & settings for unified addSettingsLink + deprecations Document unified addSettingsLink and related deprecations in admin nav docs Jun 1, 2026
@pwizla

pwizla commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Thank you very much, @unrevised6419!
LGTM from a docs POV. I edited some content for formatting compliance, incl. the PR title.
Now waiting for the corresponding strapi/strapi PR to be merged, so I'm applying the flag: merge pending releaselabel.

@pwizla pwizla self-assigned this Jun 1, 2026
@pwizla pwizla added pr: updated content PRs updating existing documentation content flag: merge pending release Pending Strapi Release source: CMS contribution PRs that are part of the Documentation Contribution Program labels Jun 1, 2026
@pwizla pwizla self-requested a review June 1, 2026 14:15
@unrevised6419

Copy link
Copy Markdown
Contributor Author

To be noted, that PR only fixes the TypeScript definition, the runtime actually behaves exactly how is in this PR

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

Labels

contribution PRs that are part of the Documentation Contribution Program flag: merge pending release Pending Strapi Release pr: updated content PRs updating existing documentation content source: CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants