Skip to content

Create stub React submission upload component flow#3964

Merged
aduth merged 3 commits intomasterfrom
aduth-upload-endpoint
Jul 23, 2020
Merged

Create stub React submission upload component flow#3964
aduth merged 3 commits intomasterfrom
aduth-upload-endpoint

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 21, 2020

Relates to: LG-3023

Why: While the API endpoint for submitting the document upload form values does not yet exist, it can be abstracted as a function which receives a payload object and returns a Promise resolving or rejecting by the result of an attempt to upload.

This implements Suspense-based asynchronous component handling, and introduces an optional upload context used in tests to replace the submission handler with a mock value.

Screen recording:

upload-suspense mov

Resources:

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

aduth added 2 commits July 23, 2020 15:32
**Why**: These restrictions are useful for runtime components, but unnecessary overhead for written tests.
**Why**: While the API endpoints for submitting the document upload form values does not yet exist, it can be abstracted as a function which receives a payload object and returns a Promise resolving or rejecting by the result of an attempt to upload.

This implements Suspense-based asynchronous component handling, and introduces an optional upload context used in tests to replace the submission handler with a mock value.
@aduth aduth force-pushed the aduth-upload-endpoint branch from 2c1c197 to 7b829f1 Compare July 23, 2020 19:34
**Why**: So the React component renders in the page

See: #3929 (comment)
@aduth
Copy link
Contributor Author

aduth commented Jul 23, 2020

In e370137, I sneak in a quick fix to an issue present in master, explained in #3929 (comment) . Not directly related to the changes here, but necessary to verify the behavior in the browser.

@aduth aduth merged commit c6e9a95 into master Jul 23, 2020
@aduth aduth deleted the aduth-upload-endpoint branch July 23, 2020 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants