MuckRock / documentcloud-frontend

DocumentCloud's front end source code - Please report bugs, issues and feature requests to info@documentcloud.org
https://www.documentcloud.org
GNU Affero General Public License v3.0
18 stars 5 forks source link

`Process` component to consolidate all in-progress activity #723

Closed allanlasser closed 1 month ago

allanlasser commented 1 month ago

Consolidated solution to #543, #629, #637, #646, #652

We need a store and a component that is entirely client side. The component should mount into the AppLayout, similar to the Toaster. It should provide handlers to update its store as it's mounted. The store tracks pending documents and running add-ons.

Running processes—both pending documents and running add-ons—should be "cancellable". Pending documents can afford a "reprocess" action in case the document gets stuck, or something.

When a document's processing state changes, we should invalidate the document's page and the search results.

When an add-on run finishes, we should show an ageless Toast with a message that links to the add-on's History page.

References

allanlasser commented 1 month ago

https://www.figma.com/design/KVRuo8Ss3TvzreCmT6HQke/DC-SvelteKit?node-id=4979-6207&m=dev

Screenshot 2024-09-26 at 11 40 06 AM
allanlasser commented 1 month ago

Here's where I'm imagining placing this in the UI:

It appears in the bottom right as just the header summary: image

On mouseenter/tap, it slides up to reveal the processing details. On mouseexit/tap, it slides back down to show the summary.

image

If all statuses are success, it hides after a timeout (10s?).

allanlasser commented 1 month ago

Alternatively, it could be a Nav item and dropdown menu.