Commit Graph

30 Commits

Author SHA1 Message Date
ekzyis 93713b33df
Optimistic updates via pending sats in item context (#1229)
* Use context for pending sats

* Fix sats going negative on zap undo

We already handle undoing pending sats by wrapping the payment+mutation with try/finally.

* Remove unnecessary ItemContextProvider

* Rename to parentCtx

* Fix hierarchy of ItemContextProvider

If a comment was root and it was zapped, the pending sats contributed to the sats shown in <CommentsHeader>.

This was caused by <CommentsHeader> accessing the root item context for all comments, even for the root comment.

So even if the root comment was zapped, the pending sats contributed to the sats for the comment section.

This wasn't the case for posts since their item context was above the context used by <CommentsHeader>.

This was fixed by moving <ItemProviderContext> down into <Comments> and <Item> instead of declaring it at <ItemFull> which wraps the root item and all comments.

* Optimistic update for poll votes

* prevent twice optimistic zap

* enhance client notifications with skeleton and no redudant queries

* enlarge nwc amount limits

* Disable max amount and daily limit in NWC container

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-06-12 08:34:24 -05:00
ekzyis d237861ff5
Use module path aliases (#938)
* Use module path aliases

* fix broken refactor

* path mapping for svgs, style, and remaining places (bonus: lose babel dep)

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-03-19 19:37:31 -05:00
ekzyis d1ed72bb85
Allow territory founders to pin items (#767)
* Add pinning of items

* Fix empty section in context menu

* Pin comments

* Fix layout shift during comment pinning

* Add comments, rename, formatting

* Max 3 pins allowed

* Fix argument

* Fix missing position update for other items

* Improve error message

* only show saloon in home

* refine pinItem style and transaction usage

* pin styling enhancements

* simpler handling of excess pins

* fix pin positioning like mergePins

* give existing pins null subName

* prevent empty items on load

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-01-30 11:04:56 -06:00
keyan 7589295e8c fix url UX exposing state 2023-10-26 14:36:20 -05:00
SatsAllDay 6e05cd38f9
Singular/Plural "Sats" labels (#380)
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2023-08-08 16:04:06 -05:00
keyan b1b8f9de56 implement our own nprogress bar 2023-08-01 21:06:15 -05:00
keyan 8ab018af88 fix nested comment sorting 2023-07-25 19:45:35 -05:00
keyan 6407455def upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
keyan 59f7b6ff26 Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades""
This reverts commit 18910fa2ed.
2023-07-23 10:08:43 -05:00
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c.
2023-07-23 09:16:12 -05:00
keyan d0314ab73c shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades 2023-07-21 17:33:11 -05:00
keyan 369bd82a84 make freebie comments visible case by case 2023-06-03 20:01:50 -05:00
keyan e4a3095cb4 give pinned item recent sort by default 2023-03-19 10:43:33 -05:00
keyan a398784f26 improved top 2022-10-25 16:35:32 -05:00
keyan b468c033ca better handling of comment sort loading state 2022-09-06 09:48:37 -05:00
keyan 4be5cfa5c7 display earned sats in comments 2022-09-01 16:06:11 -05:00
keyan 70cbdd057a add table of contents 2022-07-18 16:24:28 -05:00
keyan cef8a33267 limit displayed comment depth 2022-05-17 17:09:15 -05:00
keyan b6a530f5c4 comment draft saving 2022-01-07 12:55:40 -06:00
keyan 0dfda596b0 comment sorting 2021-12-21 15:35:25 -06:00
keyan 07b9da353b smarter use of SSR and caching 2021-10-26 15:49:37 -05:00
keyan 91a2061342 cache magic - use cache and network except when a result of popstate 2021-09-06 17:36:08 -05:00
keyan 01922e4b88 notifications done 2021-06-24 18:56:01 -05:00
keyan d4d1169058 small ui stuff 2021-05-05 13:13:14 -05:00
keyan 2da1ee1a4b fix skeletons 2021-04-28 17:52:03 -05:00
keyan 6ea9ff7e11 a number of style updates 2021-04-28 14:30:14 -05:00
keyan c82c82bb7b mostly clientside render 2021-04-26 19:55:48 -05:00
keyan ec3f6b922d a bunch of new stuff 2021-04-22 17:14:32 -05:00
keyan 6792d1d5ff working comments with cache updates 2021-04-17 13:15:18 -05:00
keyan 95d6d789fa pre recursive comments 2021-04-15 14:41:02 -05:00