Commit Graph

59 Commits

Author SHA1 Message Date
a486b317d4 Fetch account and relationship with entity store 2023-04-04 08:11:03 -04:00
a530ec0202 EntityStore: switch all hooks to use a callback function 2023-03-23 19:22:26 -05:00
9d12173b87 Add useLoading hook 2023-03-23 18:44:44 -05:00
aa7e2f6965 Refactor hooks with useEntityRequest 2023-03-23 16:22:15 -05:00
45c12e9b65 Make EntityCallbacks a generic function 2023-03-23 16:09:04 -05:00
7248331742 Add useEntityRequest hook 2023-03-23 16:04:42 -05:00
ac9718e6ed Return isLoading from useCreateEntity and useDeleteEntity 2023-03-23 15:30:45 -05:00
1b569b6c82 useEntity: accept an EntityRequest object 2023-03-23 15:15:04 -05:00
b4c3248791 useEntityActions: fix isLoading 2023-03-23 15:09:00 -05:00
1c5a6d8b41 useDeleteEntity: refactor with EntityRequest 2023-03-23 15:05:34 -05:00
50f65bc7c9 useCreateEntity: pass an EntityRequest, refactor 2023-03-23 14:52:38 -05:00
ad3f8acbe5 EntityStore: allow passing an EntityRequest object to useEntities 2023-03-23 14:14:53 -05:00
4783a41b78 useDeleteEntity: support onSuccess callback 2023-03-23 10:45:49 -05:00
1949651b9a Merge remote-tracking branch 'origin/develop' into group-requests 2023-03-23 10:23:06 -05:00
75b0262f9a Move pendingCount logic to useEntities 2023-03-22 21:28:48 -05:00
6929975aaa useIncrementEntity: fix optimistic counter 2023-03-22 19:58:40 -05:00
402daec9c3 Add useIncrementEntity hook 2023-03-22 19:45:34 -05:00
c4d0dd568e EntityStore: let totalCount be undefined, don't try to set it from the local count 2023-03-22 19:11:11 -05:00
cb8363d179 EntityStore: make fetching the first page override the old list 2023-03-22 18:47:10 -05:00
e2510489c5 EntityStore: support query invalidation 2023-03-22 18:17:28 -05:00
a256665aad EntityStore: add support for X-Total-Count from the API 2023-03-22 17:39:58 -05:00
61fb434a54 Improve API of parseEntitiesPath 2023-03-22 16:12:05 -05:00
8f67d2c76f EntityStore: consolidate types, fix type of "path" 2023-03-22 16:06:10 -05:00
d2fd9e0387 Export new entity hooks 2023-03-22 15:32:56 -05:00
b127025167 Move useCreateEntity into its own hook as well, because why not 2023-03-22 15:31:58 -05:00
b76559f24a Add useDismissEntity hook, update useDeleteEntity to match 2023-03-22 14:40:18 -05:00
3d72e6305f EntityStory: add dismissEntities action for deleting ids from a list 2023-03-22 14:34:10 -05:00
4049de50aa Add separate useDeleteEntity hook accepting a callback 2023-03-22 14:08:08 -05:00
ad98bf45cc Add hook to delete Group 2023-03-22 11:20:03 -04:00
d08178f5fc Groups: use entity store for pending requests 2023-03-20 15:54:06 -05:00
e42e0577f4 Move Group mutations to entities 2023-03-20 15:41:18 -04:00
89bdc9b4a1 Move Promote/Demote admin into entity store 2023-03-20 15:41:12 -04:00
bc457b61d1 Merge branch 'edit-group' into 'develop'
Edit group

See merge request soapbox-pub/soapbox!2357
2023-03-20 18:41:52 +00:00
e6621a802b Make popular and suggested groups share the Group store 2023-03-16 13:18:36 -05:00
1ab9b1d75c EntityStore: optimistic deletion 2023-03-15 16:52:09 -05:00
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
74ebd560e6 Revert useEntity array changes, do that in the schema parser 2023-03-15 14:19:13 -05:00
602a670b2e useEntityActions: ensure the delete gets dispatched 2023-03-15 14:04:29 -05:00
20ccd26a6e Update Entity Store with bug fixes 2023-03-15 14:55:43 -04:00
463dcd2c1e Merge remote-tracking branch 'origin/develop' into create-group-hook 2023-03-14 14:56:46 -05:00
ac76af41b2 Add preliminary useEntityActions hook 2023-03-14 14:24:11 -05:00
1b542c3ed7 Use Entities enum 2023-03-14 15:16:01 -04:00
7be8218f0c Convert popular/suggested Groups to use Entities 2023-03-14 15:16:01 -04:00
50dadeb1b8 useEntities: support multiple list keys 2023-03-14 15:16:01 -04:00
8a36561ec8 Use entities with Group Members 2023-03-14 15:15:26 -04:00
11d06e6b6e useEntities: support multiple list keys 2023-03-14 15:15:26 -04:00
8f8807eb76 EntityStore: allow deleting entities 2023-03-14 14:14:48 -05:00
9df2bb4a86 EntityStore: add tests for reducer, improve types, ensure error gets added to state 2023-03-13 18:42:46 -05:00
b93a299009 useEntities(): refactor into smaller performant selectors and hooks 2023-03-13 17:53:54 -05:00
a19b1e83a9 EntityStore: parse entities after fetch, not during render (performance) 2023-03-13 16:39:23 -05:00