-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ResourceList] Add external prop to ResourceList #2408
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. |
💦 Potential splash zone of changes introduced to
DetailsAll files potentially affected (total: 1)📄
|
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.
Looking good, thank you @stephbaker. Minor comments.
65f6ec0
to
cc8a7d7
Compare
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.
🎩and code LGTM. One thing I noticed is that it might be weird if the resource item goes to a new tab, but the shortcut action button does not. The shortcut actions can take their own external
prop since the button is just generated from the properties provided. This might be something to look out for.
Lines 66 to 79 in c6f5b8f
export interface BaseAction { | |
/** A unique identifier for the action */ | |
id?: string; | |
/** Content the action displays */ | |
content?: string; | |
/** Visually hidden text for screen readers */ | |
accessibilityLabel?: string; | |
/** A destination to link to, rendered in the action */ | |
url?: string; | |
/** Forces url to open in a new tab */ | |
external?: boolean; | |
/** Callback when an action takes place */ | |
onAction?(): void; | |
} |
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.
🚀
b3805f4
to
dab1bea
Compare
🎉 Thanks for your contribution to Polaris React! |
WHY are these changes introduced?
This change was introduced since when it comes to launching an app in the app list, certain apps should be opened in the embedded setting (i.e. same tab) or externally (i.e. another tab). The external prop identifies which apps should be opened externally.
WHAT is this pull request doing?
This PR doesn't make any design changes.
When external is true:

When external is false/undefined:

How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
In playground copy and paste:
Shopify/polaris-react/src/components/ResourceItem/README.md
external
(in resourceList props)🎩 checklist
README.md
with documentation changes