Migrating from v7 to v8
First, execute npx @comet/upgrade@latest v8 in the root of your project.
It automatically installs the new versions of all @comet libraries, runs an ESLint autofix and handles some of the necessary renames.
Changes handled by @comet/upgrade
- Upgrade MUI packages to v6
- Run MUI codemods
Admin
Stay on same page after changing scope
The Admin now stays on the same page per default when changing scopes. Perform the following changes:
Remove the
pathprop from thePagesPagecomponentadmin/src/common/MasterMenu.tsx<PagesPage
- path="/pages/pagetree/main-navigation"
allCategories={pageTreeCategories}
documentTypes={pageTreeDocumentTypes}
category="MainNavigation"
renderContentScopeIndicator={(scope) => <ContentScopeIndicator scope={scope} />}
/>Remove the
redirectPathAfterChangeprop from theRedirectsPagecomponentadmin/src/common/MasterMenu.tsx{
type: "route",
primary: <FormattedMessage id="menu.redirects" defaultMessage="Redirects" />,
route: {
path: "/system/redirects",
- render: () => <RedirectsPage redirectPathAfterChange="/system/redirects" />,
+ component: RedirectsPage
},
requiredPermission: "pageTree",
},Optional: Remove unnecessary usages of the
useContentScopeConfighookexport function ProductsPage() {
const intl = useIntl();
- useContentScopeConfig({ redirectPathAfterChange: "/structured-content/products" });
}