bharbron / hexbook-semantic

An Electron-React-Redux-Semantic-UI application for automatically generating a hexcrawl campaign notebook from random tables.
5 stars 3 forks source link

Improve consistency of selector names #36

Open bharbron opened 6 years ago

bharbron commented 6 years ago

Our selector names are currently all over the place. Decide on a naming scheme and update selector names to match.

Suggest the following:

getByIdTables => returns a lookup object for all tables in the store. can lookup by ID. all tables are "full" -- all refefences-by-id are followed and details filled in.

Use this instead of getTablesById, which leads to confusion over whether its returning a lookup object or returning a single table for a provided ID

If we need a selector for querying a single object, use this naming schema:

getTableById => returns state.entities.tables.byId[given ID]. return object is "full" -- all references-by-id are followed and details filled in.

We should be able to remove any Full from the names, as the assumption should be that all selectors return a "full" object, i.e. one whose references-by-id have been followed and the details filled in.