Commit graph

36 commits

Author SHA1 Message Date
Alex Gleason
61fb434a54
Improve API of parseEntitiesPath 2023-03-22 16:12:05 -05:00
Alex Gleason
8f67d2c76f
EntityStore: consolidate types, fix type of "path" 2023-03-22 16:06:10 -05:00
Alex Gleason
d2fd9e0387
Export new entity hooks 2023-03-22 15:32:56 -05:00
Alex Gleason
b127025167
Move useCreateEntity into its own hook as well, because why not 2023-03-22 15:31:58 -05:00
Alex Gleason
b76559f24a
Add useDismissEntity hook, update useDeleteEntity to match 2023-03-22 14:40:18 -05:00
Alex Gleason
3d72e6305f
EntityStory: add dismissEntities action for deleting ids from a list 2023-03-22 14:34:10 -05:00
Alex Gleason
4049de50aa
Add separate useDeleteEntity hook accepting a callback 2023-03-22 14:08:08 -05:00
Alex Gleason
d08178f5fc
Groups: use entity store for pending requests 2023-03-20 15:54:06 -05:00
Chewbacca
89bdc9b4a1 Move Promote/Demote admin into entity store 2023-03-20 15:41:12 -04:00
Alex Gleason
bc457b61d1 Merge branch 'edit-group' into 'develop'
Edit group

See merge request soapbox-pub/soapbox!2357
2023-03-20 18:41:52 +00:00
Alex Gleason
e6621a802b
Make popular and suggested groups share the Group store 2023-03-16 13:18:36 -05:00
Alex Gleason
1ab9b1d75c
EntityStore: optimistic deletion 2023-03-15 16:52:09 -05:00
Chewbacca
709edaefad Merge branch 'block-group-members' into 'develop'
Use Entity Hooks for Blocking Group members

See merge request soapbox-pub/soapbox!2353
2023-03-15 20:42:40 +00:00
Alex Gleason
74ebd560e6
Revert useEntity array changes, do that in the schema parser 2023-03-15 14:19:13 -05:00
Alex Gleason
602a670b2e
useEntityActions: ensure the delete gets dispatched 2023-03-15 14:04:29 -05:00
Chewbacca
20ccd26a6e Update Entity Store with bug fixes 2023-03-15 14:55:43 -04:00
Alex Gleason
463dcd2c1e
Merge remote-tracking branch 'origin/develop' into create-group-hook 2023-03-14 14:56:46 -05:00
Alex Gleason
ac76af41b2
Add preliminary useEntityActions hook 2023-03-14 14:24:11 -05:00
Chewbacca
1b542c3ed7 Use Entities enum 2023-03-14 15:16:01 -04:00
Chewbacca
7be8218f0c Convert popular/suggested Groups to use Entities 2023-03-14 15:16:01 -04:00
Alex Gleason
50dadeb1b8 useEntities: support multiple list keys 2023-03-14 15:16:01 -04:00
Chewbacca
8a36561ec8 Use entities with Group Members 2023-03-14 15:15:26 -04:00
Alex Gleason
11d06e6b6e useEntities: support multiple list keys 2023-03-14 15:15:26 -04:00
Alex Gleason
8f8807eb76
EntityStore: allow deleting entities 2023-03-14 14:14:48 -05:00
Alex Gleason
9df2bb4a86
EntityStore: add tests for reducer, improve types, ensure error gets added to state 2023-03-13 18:42:46 -05:00
Alex Gleason
b93a299009
useEntities(): refactor into smaller performant selectors and hooks 2023-03-13 17:53:54 -05:00
Alex Gleason
a19b1e83a9
EntityStore: parse entities after fetch, not during render (performance) 2023-03-13 16:39:23 -05:00
Alex Gleason
d0ceac9987
Pass zodSchema directly to entity hooks for safeParse validation 2023-03-13 16:23:11 -05:00
Alex Gleason
fa2884c11b
EntityStore: fetch with useEntity automatically, accept refetch opt 2023-03-09 15:05:27 -06:00
Alex Gleason
ad583c89f8
EntityStore: allow passing an undefined endpoint (to skip fetch), prevent race conditions in isFetching 2023-03-09 14:44:54 -06:00
Alex Gleason
a3b1f541bc
EntityStore: support staleTime option (automatically fetch) 2023-03-09 14:20:04 -06:00
Alex Gleason
250b009635
EntityStore: allow passing a parser function to parse the entities 2023-03-09 12:32:50 -06:00
Alex Gleason
27500193d8
EntityStore: incorporate Notifications, go back to using POJOs instead of Maps 2022-12-04 18:54:54 -06:00
Alex Gleason
f7bfc40b70
EntityStore: proper pagination support 2022-12-04 17:53:56 -06:00
Alex Gleason
52059f6f37
EntityStore: add request/success/fail actions 2022-12-04 17:26:28 -06:00
Alex Gleason
3b067c6fab
Scaffold entity store library 2022-12-04 17:05:01 -06:00