a-type / biscuits

A suite of local-first apps, all on one unified account
https://biscuits.club
GNU Affero General Public License v3.0
9 stars 0 forks source link

Public wishlist buy flow #105

Open a-type opened 1 month ago

a-type commented 1 month ago

For items in the public wishlist, there needs to be a way to mark purchases.

Ideas

Click "Shop idea." A modal opens explaining this is just an idea the person had and shows various online shop search buttons with prefilled queries. Final action: set a quantity, click "Bought #"

Products

If there's an embedded buy link in the card, the card action should be "Bought this." The modal just has quantity set and "Bought #"

Vibes

Click "Shop vibe." A modal opens with the vibe description and a large format image/gallery. Shop search buttons again. No quantity needed, just "Bought" Not even sure a final action is relevant to this really.

a-type commented 3 weeks ago

Technical reqs for public buying:

a-type commented 3 weeks ago

Applying public purchases....

Main problem is syncing nom-live data to a live document without missing any or duplicates.

Two approaches....

Keep a running set of applied purchase IDs on the list and don't apply one twice. Downside: monotonically growing set.

Or, keep a "last applied date" and avoid applying purchases before that date. Downside: more complicated when a visibility cutoff date is in play.

Given the number of public purchases is not likely to exceed the hundreds, even unbounded set seems fine.

But we can also clean out the set whenever the req for purchases comes back empty.

Btw purchases should be confirmed. Confirmed purchases get a confirmed timestamp and don't come back in the request next time. You can still req them with a filter to view purchases history.