-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added helpText to ActionList items #777
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
Conversation
👋 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add an example to the ActionList README for this? That way we can show the example but we will also get visual regression testing on it as well.
I think something like what we have in the rails version would work.
## Action list with help text
Use help text when the normal Verb noun syntax for the actions does not provide sufficient context for the merchant.
```jsx
<Card>
<ActionList
items={[
{
content: 'Blog posts',
onAction: () => {
console.log('Blog posts clicked');
},
helpText: 'Manage your blog articles',
},
{
content: 'Blogs',
onAction: () => {
console.log('Blogs clicked');
},
helpText: 'Manage blogs published to your Online Store',
},
]}
/>
</Card>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Thanks for adding this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick on the changelog entry, otherwise code and 🎩 looks good – thanks for adding this!
Co-Authored-By: BlazingBBQ <simon.cousineau99@gmail.com>
🎉 Thanks for your contribution to Polaris React! |
WHY are these changes introduced?
Rails version of Polaris Action List had a
helpText
prop.WHAT is this pull request doing?
These changes add the
helpText
prop to theActionList.Item
component.Before:

After:

How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist