Skip to content

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

Merged
pwizla merged 4 commits into
strapi:mainfrom
unrevised6419:cms/admin-navigation-settings-update
Jul 1, 2026
Merged

Document unified addSettingsLink and related deprecations in admin nav docs#3204
pwizla merged 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 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 Waiting for the related product PR to be merged before merging this documentation PR 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

@unrevised6419

Copy link
Copy Markdown
Contributor Author

@pwizla the linked PR was merged and released in https://github.com/strapi/strapi/releases/tag/v5.49.0. This can be merged

@pwizla pwizla removed the flag: merge pending release Waiting for the related product PR to be merged before merging this documentation PR label Jul 1, 2026
@pwizla
pwizla merged commit d6dbf4b into strapi:main Jul 1, 2026
21 of 25 checks passed
@pwizla pwizla added this to the 7.0.1 milestone Jul 1, 2026
@pwizla

pwizla commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the ping, @unrevised6419
The repo was on a soft freeze while I was QAing and deploying the new website version. I've just finished reviewing your PR, and improved it slightly. The PR is now approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release (7.0.1, probably today or tomorrow). Thanks again for your valuable contribution!

@unrevised6419
unrevised6419 deleted the cms/admin-navigation-settings-update branch July 1, 2026 12:52
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 pr: updated content PRs updating existing documentation content source: CMS

2 participants