Skip to content

Conversation

MikeKingdom
Copy link
Collaborator

When you have a List with both action and onOrder specified the action and primary/secondary labels end up in a container that is column layout rather than the typical row layout you have with action when onOrder isn't used.

What does this PR do?

This change uses the same layout for the non onOrder-related elements as it would have used without onOrder. In the case of action, this puts the action next to the onOrder controls more like you'd expect.

Where should the reviewer start?

List.js

What testing has been done on this PR?

Manual, storybook and Jest

How should this be manually tested?

Manualy add an action to an onOrder example.

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?

What are the relevant issues?

Fixes #6341

Screenshots (if appropriate)

Before:
image

After:
image

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Yes

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

Backwards Compatible

Copy link
Collaborator

@halocline halocline left a comment

Choose a reason for hiding this comment

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

small test adjustment, otherwise looks good to go. Thanks for jumping on this.

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.

Other than the testing comment, everything else looks good!

@ericsoderberghp ericsoderberghp merged commit ed49da2 into master Sep 26, 2022
@ericsoderberghp ericsoderberghp deleted the list-onorder-actions branch September 26, 2022 17:17
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.

List "action" property doesn't work with "onOrder"
4 participants