oxidecomputer / oxidecomputer/console

Don't `await` in side modal loaders

Open
#1,333 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

polish
Dominant language
TypeScript
Stars
228
Forks
22
Avg merge
19h 42m
Merged PRs (30d)
32

Description

Side modals live at their own routes with their own loaders, which is mostly a very good thing, but it has one unfortunate side effect — the loader runs before the side modal starts animating in. Ideally we'd be able to kick off the request and run the animation to eat up some time, and then if it's still not done, show a skeleton state in the modal. Fortunately, I think this is exactly what defer lets us do.

2023-01-23-side-modal-loader

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 side-modal routes and their loaders, then read how those loaders currently await requests. Use the mentioned defer approach so the animation can begin before data is ready; done means the modal shows a skeleton only when the request remains pending.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.