docs(cms): update admin nav & settings for unified addSettingsLink + deprecations#3204
Open
unrevised6419 wants to merge 1 commit into
Open
docs(cms): update admin nav & settings for unified addSettingsLink + deprecations#3204unrevised6419 wants to merge 1 commit into
unrevised6419 wants to merge 1 commit into
Conversation
- 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Description
Updates
docs/cms/plugins-development/admin-navigation-settings.mdto match the currentStrapiApp/Routersource instrapi/strapi.Unified
addSettingsLinkAPIaddSettingsLink(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.Document deprecated methods
## Deprecated methodssection with ❌/✅ migration snippets for:createSettingSection(section, links)— replace withaddSettingsLink(section, links).addSettingsLinks(sectionId, links)— replace with singularaddSettingsLink(sectionId, links).:::cautionadmonitions next to each primary example pointing at the deprecated counterpart.addSettingsLinksis still exposed on the pluginbootstrapargument bag, whilecreateSettingSectionis only reachable fromregister(app).Fix parameter-table drift (required column + types)
Reconciled against
packages/core/admin/admin/src/core/apis/router.tsx(MenuItem,UnloadedSettingsLink):permissionsis required by the type contract (pass[]for no restrictions) — was previously marked optional.Componentis optional (omitting registers no route, label-only entry) — was previously marked required.icontype corrected fromReact.ComponenttoReact.ElementType.target,notificationsCount,exact(menu link);position,exact(settings link).Misc
to" table to label rows by the unified API (with section object / with section id) rather than the deprecatedcreateSettingSection.Related issue(s)/PR(s)
Source of truth for the API surface documented here: strapi/strapi#26433.