sillsdev / sillsdev/languageforge-lexbox

change API for delete prompt to includen async callback

Open
#1,642 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💻 FW Lite Code Debt Svelte
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

right now our delete dialog api looks like:

(title: string) => Promise<bool>

this means when the user clicks 'delete' the dialog closes and promise returns and then delete runs. However if the delete takes some time we should instead show a loading state and if there's an error display it and keep the dialog open.

The new API should look like this:

(title: string, onDelete: () => Promise<void>) => Promise<bool>

the dialog will call the callback when the user clicks delete, there should be an indeterminate progress indicator and the buttons should be disabled. If there's an error then it should be displayed in the dialog and the user should be able to retry. If the delete succeeds then the api will return true and the dialog can close.

Contributor guide

No contributing guide indexed for this repository

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 delete dialog API and its callers, then inspect the current delete flow and any existing dialog tests. Done means the callback-based API shows loading progress, disables the buttons while deleting, displays errors without closing, allows retry, and returns true only after success.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.