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

Info/Information Notice Styling is absent #33853

Closed
3 tasks done
MadtownLems opened this issue Aug 3, 2021 · 3 comments
Closed
3 tasks done

Info/Information Notice Styling is absent #33853

MadtownLems opened this issue Aug 3, 2021 · 3 comments
Labels
[Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback.

Comments

@MadtownLems
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Have you tried deactivating all plugins except Gutenberg?

  • I have tested with all plugins deactivated.

Have you tried replicating the bug using a default theme e.g. Twenty Twenty?

  • I have tested with a default theme.

Description

Per the Notice component documentation in the Block Editor developer's handbook (https://developer.wordpress.org/block-editor/reference-guides/components/notice/), 'info' should be a supported notice type alongside 'warning', 'error', and 'success'.

It should have a light blue background, but there doesn't appear to actually be any styling for this.

'error', 'success', 'warning' all work as expected and result in the appropriately colored notices. Using 'info' just gives you a white background.

Analyzing load-styles.php shows that the following all style rules that set background colors:
.components-notice.is-error
.components-notice.is-warning
.components-notice.is-success

but there is no rule for
.components-notice.is-info

Step-by-step reproduction instructions

Generate a notice of type 'info'

Expected Behavior

A notice appears with a light blue background

Current Behavior

A notice appears with a white background

Screenshots or screen recording (optional)

No response

Code snippet (optional)

wp.data.dispatch( 'core/notices' ).createNotice(
'info', // Can be one of: success, info, warning, error.
'This is a sample info notice.', // Text string to display.
{
isDismissible: true, // Whether the user can dismiss the notice
}
);

WordPress Information

5.8

Gutenberg Information

not installed

What browsers are you seeing the problem on?

Chrome

Device Information

Desktop

Operating System Information

Windows 10

@talldan
Copy link
Contributor

talldan commented Aug 4, 2021

Well spotted. Looks like it was something that was never added. This is the PR that added the original styles - #8856

Here's a screenshot of an info notice. It looks ok, the blue border on the left is from the admin theme color. Maybe info notices should always be a blue instead of being admin theme dependent:
Screenshot 2021-08-04 at 2 10 40 pm

The docs have this:
Screenshot 2021-08-04 at 2 11 37 pm

@talldan talldan added [Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback. labels Aug 4, 2021
@MadtownLems
Copy link
Author

My suggestion is to get the code sync'd up with the documents. I think there's a lot of merit to an Informational notice (we're obviously trying to use one), and the white background notice is incredibly easy to gloss over without realizing it's there at all.

@jordesign
Copy link
Contributor

Closing this issue as it will be addressed in #34901

@jordesign jordesign closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

No branches or pull requests

3 participants