Shopify / Shopify/discount-app-components

[FEATURE] Support rendering inline errors in `MethodCard`

Open
#91 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.