Skip to content

Add admin not found page #3870

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

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open

Conversation

manuelblum
Copy link
Collaborator

@manuelblum manuelblum commented May 19, 2025

Description

Previously, when navigating to a non-existent admin route or a page the user doesn’t have permission to access, the app would render a blank white screen. This PR improves the user experience by introducing a fallback route that displays a “Not Found” page instead.

Additionally, projects can now provide a custom “Not Found” page by setting the notFoundPage prop on the MasterMenuRoutes component.

Screenshots/screencasts

Before After
Screenshot 2025-05-19 at 14 57 35 Screenshot 2025-05-19 at 15 11 57

Further information

@johnnyomair
Copy link
Collaborator

@manuelblum I intend to change MasterMenuRoutes to always redirect to the first match if a route doesn't exist here. This would conflict with your implementation. Should I revert my change? Do we need a not found page?

@manuelblum
Copy link
Collaborator Author

@johnnyomair from an UX perspective, i would prefer having a Not Found page, instead of an redirect to a first route match.

I also thing we discussed this with UX already. Maybe should rediscuss the desired behaviour one more time with ux at least we have now both solutions implemented.

@@ -33,18 +34,24 @@ export function useRoutePropsFromMasterMenuData(items: MasterMenuData): RoutePro

export interface MasterMenuRoutesProps {
menu: MasterMenuData;
notFoundPage?: ReactNode;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using fallback instead? This could also be used to display an access denied page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean with fallback? Just renaming the prop?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is different see:

CometDxpLogo:
Screenshot 2025-06-04 at 08 36 34

CometDigitalExperienceLogo:
Screenshot 2025-06-04 at 08 36 39

Copy link
Collaborator

@johnnyomair johnnyomair Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuelblum could we change the existing CometDigitalExperience component so support both logos? I think it could be confusing if we have two components with a similar name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants