-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #589 from gadget-inc/mill/throwErrorForAutoFormAct…
…ionsWithNoTriggers Added error for using actions without the API trigger in autoforms
- Loading branch information
Showing
26 changed files
with
3,249 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/react/cypress/component/auto/form/PolarisAutoBelongsToInput.cy.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/react/spec/auto/form/PolarisAutoFormErrors.stories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { AppProvider, Card, Page } from "@shopify/polaris"; | ||
import translations from "@shopify/polaris/locales/en.json"; | ||
import React from "react"; | ||
import { FormProvider, useForm } from "react-hook-form"; | ||
import { Provider } from "../../../src/GadgetProvider.tsx"; | ||
import { PolarisAutoForm } from "../../../src/auto/polaris/PolarisAutoForm.tsx"; | ||
import { testApi as api } from "../../apis.ts"; | ||
|
||
export default { | ||
title: "Polaris/AutoForm/Errors", | ||
component: PolarisAutoForm, | ||
decorators: [ | ||
(Story) => { | ||
return ( | ||
<Provider api={api}> | ||
<AppProvider i18n={translations}> | ||
<FormProvider {...useForm()}> | ||
<Page> | ||
<Card> | ||
<Story /> | ||
</Card> | ||
</Page> | ||
</FormProvider> | ||
</AppProvider> | ||
</Provider> | ||
); | ||
}, | ||
], | ||
}; | ||
|
||
export const FieldNameCustomParamCollisionError = { | ||
args: { | ||
findBy: "1", | ||
action: api.autoTableTest.updateWithCustomParams, | ||
}, | ||
}; | ||
|
||
export const ModelActionWithoutApiTrigger = { | ||
args: { | ||
findBy: "70", | ||
action: api.autoTableTest.noTriggerAction, | ||
}, | ||
}; | ||
|
||
export const GlobalActionWithoutApiTrigger = { | ||
args: { | ||
action: api.noTriggerGlobalAction, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const apiTriggerOnly = [{ specID: "gadget/trigger/graphql_api", __typename: "GadgetTrigger" }]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.