Renames the somewhat ambiguous "members" property into "contacts", to
more clearly indicate the source/nature of the data within. (Avoid
confusion with "members of a group", which is contained in groups
instead.)
Also refactors the retrieving of appropriately-defaulted contact values
into a utility function.
We were passing in a contacts object, which may not always contain all
group members. We now pass in a groups object (set of ships) instead,
and derive contributor count from that.
Image should retain its own width if it's smaller than the bound, but
not go beyond them.
Height bounding wasn't being inherited properly through the "100%", so
we're moving the max-height into the embed itself instead.
(Making its container div always contain it rather than overflow also
prevents bleeding the preview down the page in case of sizing error.)
The only thing we care about is whether or not we have (any & all) data
about the submission. Using URL here is confusing because it conflates
with the prop, and checking the prop in the first place always gives the
same result.
Previously, receiving new items could "locally create" pages,
half-filled with whatever items were pushed down into them. Frontend
would see the existence of the page and assume all was well. However,
the page may have contained more items (on the backend) than just what
we pushed down.
This adds a per-page flag, "local", to indicate such pages. When display
logic sees it's set, it will send a request for the full page,
regardless of currently available data, loading in the canonical full
page as a result.
The Number() usage is sane, but should be scoped around the variable by
itself. Previously a string of "3" would lead to a Number("31") call,
which is not the intended behavior here.
Also stops passing a {} in if the actual number is unknown.
On the frontend, updates the route path to include the (base64-encoded)
url. Uses that and the load-single functionality to support loading
directly into a submission page, which fetches just the requested
submission.
Also ensures we don't open duplicate comment subscriptions.
Replaces .json requests with channel.js subscriptions. Rewrites reducers
to match, now being more careful about paginated data, and storing
comments in their own structure, at [group][url] indices, rather than
the non-static [page][index] ones used previously.
Note that this requires some changes to the frontend UI code also.
See next commit.