Jasonette / Jasonette/documentation
post offline
- Dominant language
- No language data
- Stars
- 120
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
Use case: post a message to chat when the user is offline
Intended UX:
- user posts a message
- message appears in the view immediately with a "..." or spinner indicator
- when the server acknowledges the message, the indicator changes to check mark (or simply disappears)
- server can explicitly reject the request (403 etc) or it might expire after a specified timeout
Implementation options:
1. "virtual" network.request (backend has to make sure repeated requests are ignored), with return options like "success","failure" (500 etc), "offline" and exponential backoff (so app wont spam the server in case of error); but the problem is that user should also see its message together with server-sent ones (with a spinner indicator or something)
2. could be currently awkwardly worked around with $global but really there should be some API support.
3. another option is some kind of an object synchronized with server
I could help with drafting the API for this.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing network.request and $global APIs, then compare them with the offline posting flow described in the issue. Define how pending messages, server acknowledgment, rejection, expiration, retries, and duplicate requests should be represented; done means the API design covers each stated outcome and lets messages appear alongside server-sent ones.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100