sillsdev / sillsdev/languageforge-lexbox
change API for delete prompt to includen async callback
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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