Skip to content

Conversation

kvendrik
Copy link
Member

@kvendrik kvendrik commented Nov 1, 2018

WHY are these changes introduced?

fixes https://github.com/Shopify/polaris-react-deprecated/issues/2463.
moved from https://github.com/Shopify/polaris-react-deprecated/pull/2487.

WHAT is this pull request doing?

Replaces the wildcard action selector with an actual selector that points to secondary actions in the page header.

How to 🎩

  1. Add a Page with both actionGroups and secondaryActions to the Playground.
  2. Make sure the selector works by inspecting the first and last action.

🎩 checklist

@ghost
Copy link

ghost commented Nov 1, 2018

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines. You can also join #polaris on the Shopify Partners Slack.

@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 1, 2018 15:20 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 1, 2018 15:20 Inactive
@danrosenthal
Copy link

@kvendrik is this still a change you'd like to see merged? I'd recommend rebasing and re-pinging for review if so. Otherwise it should be closed.

@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 13, 2018 16:36 Inactive
@kvendrik kvendrik requested review from solonaarmstrong-zz and removed request for solonaarmstrong-zz November 13, 2018 16:36
onClose={this.handleActionGroupClose}
active={title === openActionGroup}
/>
<div className={styles.IndividualAction} key={title}>
Copy link
Member

Choose a reason for hiding this comment

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

Should this have a more unique key similar to the one given to secondary actions on line 270?

Suggested change
<div className={styles.IndividualAction} key={title}>
<div
className={styles.IndividualAction}
key={`ActionGroup-${title}-${index}`}
>

@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 14, 2018 15:44 Inactive
details={details}
onOpen={this.handleActionGroupOpen}
onClose={this.handleActionGroupClose}
active={title === openActionGroup}

Choose a reason for hiding this comment

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

Should this logic be in a variable?

Copy link
Member Author

@kvendrik kvendrik Nov 15, 2018

Choose a reason for hiding this comment

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

I would say yes although I think in this specific case its okay to leave it as is considering storing this in a variable would involve changing this into a block which would arguably make it harder to read.

@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 15, 2018 16:17 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-523 November 15, 2018 17:59 Inactive
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.

5 participants