Skip to content
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

Enhance 404 message styling #69234

Merged
merged 6 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions packages/edit-site/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {

.edit-site-layout__area__404 {
margin: $canvas-padding;
color: $gray-800;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After PR #69226 gets merged. This line won't be necessary.

}

.edit-site .components-editor-notices__snackbar {
Expand Down
25 changes: 21 additions & 4 deletions packages/edit-site/src/components/site-editor-routes/notfound.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { Notice } from '@wordpress/components';
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';

export const notFoundRoute = {
Expand All @@ -15,13 +16,29 @@ export const notFoundRoute = {
sidebar: <SidebarNavigationScreenMain />,
mobile: (
<SidebarNavigationScreenMain
customDescription={ __( '404 (Not Found)' ) }
customDescription={
<Notice
status="error"
isDismissible={ false }
className="edit-site-layout__area__404"
>
{ __(
'The requested page could not be found. Please check the URL.'
) }
</Notice>
}
/>
),
content: (
<p className="edit-site-layout__area__404">
{ __( '404 (Not Found)' ) }
</p>
<Notice
status="error"
isDismissible={ false }
className="edit-site-layout__area__404"
>
{ __(
'The requested page could not be found. Please check the URL.'
) }
</Notice>
),
},
};
Loading