Skip to content

Conversation

britt6612
Copy link
Collaborator

What does this PR do?

This PR enhances Notification theme to be able to pass fill: true to the theme for when Paragraph is used.

Where should the reviewer start?

notification.js

What testing has been done on this PR?

locally

How should this be manually tested?

locally

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

In cases where Notification direction is "column" (so the message renders as a paragraph), the theme should have the ability to set paragraph fill={true}.

What are the relevant issues?

closes #7485

Screenshots (if appropriate)

Do the grommet docs need to be updated?

yes

Should this PR be mentioned in the release notes?

yes

Is this change backwards compatible or is it a breaking change?

backwards compatible

@britt6612 britt6612 requested review from taysea and jcfilben January 27, 2025 20:48
Comment on lines 178 to 182
fill={
Message === Paragraph
? theme.notification.message?.fill || false
: undefined
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm trying to think of a cleaner way to do this. It seems pretty awkward to first set Message to Paragraph or Text and then compare against Paragraph here. I think it would at least be better to set up props at the same time you define whether it's Paragraph or Text. It would probably be cleaner to actually pull this up into a separate Message component.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can take a stab at making this a bit cleaner

@britt6612 britt6612 requested a review from MikeKingdom January 29, 2025 14:36
britt6612 and others added 3 commits January 29, 2025 13:57
Co-authored-by: Mike Kingdom <michael.kingdom@hpe.com>
Co-authored-by: Mike Kingdom <michael.kingdom@hpe.com>
@britt6612 britt6612 requested a review from MikeKingdom January 29, 2025 21:34
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

Tiny comment but otherwise looks good!

Co-authored-by: Taylor Seamans <taylor.seamans@yahoo.com>
Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Looks good!

@jcfilben jcfilben merged commit 9f121fc into grommet:master Jan 30, 2025
13 of 14 checks passed
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.

Notification -- enhance theme to support notification.message.fill
4 participants