31 Commits

Author SHA1 Message Date
a3578e35ba Remove bloomer from packages/client 2019-11-03 12:34:26 -04:00
a8d603dd59 Refactor store to accept state as part of params
The old code was returning a fn because TypeScript could not figure out
generic type parameters when params was an object like:

    interface Params<State> {
      a: Reducer<State>
      b: Partial<State>
    }

    function test<State>(params: Params<State>) {
      // ...
    }
2019-09-26 23:52:46 +07:00
73c27aec6a Fix packages/comments-common 2019-09-16 11:39:36 +07:00
92912af839 Fix packages/client 2019-09-16 00:44:21 +07:00
eebe26f706 Extract redux, http-types, http-client and test-utils 2019-09-10 17:56:25 +07:00
dffad844ad Rename scope @rondo to @rondo.dev 2019-08-25 11:33:06 +07:00
65f1703089 Add ability to load user votes on frontend 2019-04-08 13:34:19 +08:00
582d36de02 Add Link to Stories from Sites 2019-04-06 14:11:55 +08:00
e18fa89b26 Add /teams/:teamId/sites/:siteId/stories client-side 2019-04-06 14:01:16 +08:00
00dd9326ba Use Heading instead of Label in forms
I realize <label> tags should be used instead, but this looks nicer and
I don't have the time to style it.
2019-04-04 11:43:06 +08:00
b3924fa8d3 Fix CRUDForm not updating text 2019-04-04 00:00:43 +08:00
ce68048f9e Display CRUD form even when item is undefined 2019-04-03 23:54:32 +08:00
363b84699f Fix CRUDReducer bug when retrieving item that already exists 2019-04-03 23:51:38 +08:00
bc64a9bfa7 Load site on edit 2019-04-03 19:42:48 +08:00
b68a0c0380 Make item optional 2019-04-03 19:27:02 +08:00
6b3b1ef7d0 Make array readonly 2019-04-03 19:07:40 +08:00
b5c5ea81a9 Add Site to Application.tsx (untested) 2019-04-03 19:01:33 +08:00
91f47653bf Fix SiteForm properties 2019-04-03 17:50:27 +08:00
0b1cd203c3 Add sync actions to CRUDActions 2019-04-03 11:41:54 +08:00
0f0ba81795 Add CRUDList.tsx 2019-04-02 17:24:04 +08:00
264f5aba60 Add T prefix for all type defs 2019-04-02 16:22:38 +08:00
0630260628 Add space-within-parens rule 2019-04-02 15:09:47 +08:00
b8ff27128b Make query optional 2019-04-02 14:38:11 +08:00
2f17418753 Simplify CRUDReducer methods 2019-04-02 12:03:38 +08:00
580fb368e6 Simplify types for CRUDActions & CRUDReducer 2019-04-02 11:44:34 +08:00
8b6f90235e Use default action type and add status to async actions
Since TypeScript can infer types based on string types, it has became
easier to define a single constant of an action that returns a promise,
and then dispatch actions with different statuses: pending, resolved,
and/or rejected. This seems like more typing at first, but in the long
run it will become easier to write generic reducer methods, and the
names of reduced types will not have to be repeated every time.

For example, previously we had to write:

    type MyActionTypes =
      IAsyncAction<IUser, 'LOGIN_PENDING', 'LOGIN_RESOLVED', 'LOGIN_REJECTED'>
      | ...

And now we can write:

    type MyActionTypes =
      IAsyncAction<IUser, 'LOGIN'>
      | ...
2019-04-01 15:20:42 +08:00
31bb2aa5ee Make CRUDActions method bound 2019-04-01 13:11:43 +08:00
73be64a900 Add packages/client/src/crud 2019-04-01 12:56:31 +08:00
eed79f35f2 Add start of test for crud 2019-03-28 19:35:09 +08:00
d6113b2fc4 Add CRUDActions 2019-03-28 00:16:14 +08:00
32b527d92f Add CRUDReducer 2019-03-27 19:10:35 +08:00