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

Feat/position notification #5926

Merged

Conversation

britt6612
Copy link
Collaborator

@britt6612 britt6612 commented Feb 1, 2022

What does this PR do?

This PR adds a position object that can be passed in with toast
This is for when a user is using a Toast it allows them to have the Toast in the top or top-right

Where should the reviewer start?

notification.js

What testing has been done on this PR?

storybook

How should this be manually tested?

Do Jest tests follow these best practices?

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

Any background context you want to provide?

In Design-System site we have a placement guidance
This states Place Toast either top-center or top-right of the screen.
In order for a user to be able to put in the top-right we need to provide a prop.

What are the relevant issues?

Needed for Design system

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

@@ -1,12 +1,27 @@
import * as React from 'react';

export type StatusType = 'critical' | 'warning' | 'normal' | 'unknown';
export type PositionType =
Copy link
Member

Choose a reason for hiding this comment

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

Can we just import LayerPositionType and re-use it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes good call

@ericsoderberghp ericsoderberghp merged commit 824e013 into grommet:master Feb 1, 2022
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.

None yet

2 participants