Skip to content
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

Unify package creation / update dialogs (add s3 file picker to package creation dialog) #2302

Merged
merged 16 commits into from
Aug 18, 2021
Merged
2 changes: 1 addition & 1 deletion catalog/app/components/JsonEditor/JsonEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ interface JsonEditorWrapperProps {
className?: string
disabled?: boolean
onChange: (value: JsonValue) => void
schema: JsonSchema
schema?: JsonSchema
value: JsonValue
}

Expand Down
2 changes: 1 addition & 1 deletion catalog/app/containers/Auth/urqlExchange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function useAuthExchange() {
const dispatch = redux.useDispatch()

const getTokens = React.useCallback(() => {
const { resolver, promise } = defer()
const { resolver, promise } = defer<AuthTokens>()
dispatch(actions.getTokens(resolver))
return promise
}, [dispatch])
Expand Down
57 changes: 25 additions & 32 deletions catalog/app/containers/Bucket/PackageCopyDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as RF from 'react-final-form'
import * as M from '@material-ui/core'

import * as Intercom from 'components/Intercom'
import AsyncResult from 'utils/AsyncResult'
import * as AWS from 'utils/AWS'
import * as Data from 'utils/Data'
import * as NamedRoutes from 'utils/NamedRoutes'
Expand Down Expand Up @@ -165,23 +164,20 @@ function DialogForm({
<RF.Form
onSubmit={onSubmitWrapped}
subscription={{
handleSubmit: true,
submitting: true,
submitFailed: true,
error: true,
submitError: true,
hasValidationErrors: true,
form: true,
submitError: true,
submitFailed: true,
submitting: true,
}}
>
{({
handleSubmit,
submitting,
submitFailed,
error,
submitError,
hasValidationErrors,
form,
submitError,
submitFailed,
submitting,
handleSubmit,
}) => (
<>
<DialogTitle bucket={successor.slug} />
Expand Down Expand Up @@ -422,27 +418,24 @@ export default function PackageCopyDialog({
workflowsConfig={workflowsConfig}
workflow={workflow}
>
{AsyncResult.case({
Ok: (schemaProps) => (
<DialogForm
{...schemaProps}
{...{
bucket,
close,
setSubmitting,
setSuccess,
setWorkflow,
workflowsConfig,

hash,
manifest,
name,
successor,
}}
/>
),
_: R.identity,
})}
{(schemaProps) => (
<DialogForm
{...schemaProps}
{...{
bucket,
close,
setSubmitting,
setSuccess,
setWorkflow,
workflowsConfig,

hash,
manifest,
name,
successor,
}}
/>
)}
</PD.SchemaFetcher>
),
Success: (props) =>
Expand Down
Loading