Skip to content

[experimental] TOC notice component #2497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 139 additions & 1 deletion docusaurus/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,151 @@ const sidebars = {
collapsible: false,
className: 'category-cms-configurations',
items: [
// Generic notice
{
type: 'html',
value: "This is a general information notice",
customProps: {
noticeType: 'default',
noticeIcon: 'info',
}
},
// Migration notice (original case)
{
type: 'html',
value: "Admin panel configuration has been moved to",
customProps: {
noticeType: 'moved',
noticeIcon: 'arrow-bend-up-right',
noticeLink: "/cms/customization/admin-panel",
noticeLinkText: "customization",
}
},
// Information notice without link
{
type: 'html',
value: "This section is being updated",
customProps: {
noticeType: 'info',
noticeIcon: 'info',
}
},
// Warning notice with link
{
type: 'html',
value: "This API is deprecated",
customProps: {
noticeType: 'warning',
noticeIcon: 'warning',
noticeLink: "/cms/api/new-api",
noticeLinkText: "See the new API",
}
},
// Success notice
{
type: 'html',
value: "New feature available!",
customProps: {
noticeType: 'success',
noticeIcon: 'check-circle',
noticeLink: "/cms/features/new-feature",
noticeLinkText: "Learn more",
}
},
// Error notice
{
type: 'html',
value: "This page contains known issues",
customProps: {
noticeType: 'error',
noticeIcon: 'warning-circle',
}
},
{
type: 'doc',
label: 'Configurations introduction',
id: 'cms/configurations',
},
'cms/configurations/admin-panel',
'cms/configurations/api',
{
type: 'doc',
label: 'Admin Panel',
id: 'cms/configurations/admin-panel',
customProps: {
noticeType: 'moved',
noticeIcon: 'arrow-bend-up-right',
noticeText: "Admin panel configuration has been moved to",
noticeLink: "/cms/customization/admin-panel",
noticeLinkText: "customization"
}
},

// {
// type: 'doc',
// label: 'Admin Panel',
// id: 'cms/configurations/admin-panel',
// customProps: {
// noticeType: 'moved',
// noticeIcon: 'arrow-bend-up-right',
// noticeLink: "/cms/customization/admin-panel",
// noticeText: "Admin panel configuration has been moved to",
// noticeLinkText: "customization",
// }
// },
// {
// type: 'doc',
// label: 'Admin Panel',
// id: 'cms/configurations/admin-panel',
// customProps: {
// noticeType: 'info',
// noticeIcon: 'info',
// noticeText: "This section is being updated",
// }
// },
// {
// type: 'doc',
// label: 'Admin Panel',
// id: 'cms/configurations/admin-panel',
// customProps: {
// noticeType: 'warning',
// noticeIcon: 'warning',
// noticeLink: "/cms/api/new-api",
// noticeLinkText: "See the new API",
// noticeText: "This API is deprecated",
// }
// },
// {
// type: 'doc',
// label: 'Admin Panel',
// id: 'cms/configurations/admin-panel',
// customProps: {
// noticeType: 'success',
// noticeIcon: 'check-circle',
// noticeLink: "/cms/features/new-feature",
// noticeLinkText: "Learn more",
// noticeText: "New feature available!",
// }
// },
// {
// type: 'doc',
// label: 'Admin Panel',
// id: 'cms/configurations/admin-panel',
// customProps: {
// noticeType: 'error',
// noticeText: "This page contains known issues",
// noticeIcon: 'warning-circle',
// }
// },
{
type: 'doc',
label: 'API',
id: 'cms/configurations/api',
customProps: {
noticeType: 'default',
noticeIcon: 'info',
noticeText: "This is a general information notice",
}
},
'cms/configurations/cron',
'cms/configurations/database',
'cms/configurations/environment',
Expand Down
Loading