Shopify / Shopify/discount-app-components
[FEATURE] Support rendering inline errors in `MethodCard`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 87
- Forks
- 27
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
Feature request summary
Currently duplicate title errors can only be rendered in a banner, as MethodCard has no inline error rendering capability - a potential solution would be to add an errors prop to the component.
Rationale
Without this feature, apps are unable to follow the app design alert guidelines.
Also
Where is the best place to report bugs? The discountAutomaticAppUpdate mutation currently returns doubles of the title must be unique error :D
{
"data": {
"discountAutomaticAppUpdate": {
"userErrors": [
{
"field": [
"automaticAppDiscount",
"title"
],
"message": "must be unique",
"__typename": "DiscountUserError"
},
{
"field": [
"automaticAppDiscount",
"title"
],
"message": "must be unique",
"__typename": "DiscountUserError"
}
],
"__typename": "DiscountAutomaticAppUpdatePayload"
}
},
...
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MethodCard component and reviewing how it currently renders banner errors. Trace the existing error data flow, including the proposed errors prop, and check the component's tests if present. Done means duplicate title errors can be rendered inline in MethodCard in a way that supports Shopify's inline error guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100