RFC: no such thing as an xPub component
Problem
Currently we have some components in the pubsweet
monorepo and some in xpub
. The discriminating feature is that components that are only applicable to journal submission applications go into xpub
and components that are reusable across a wider range of publishing applications go into pubsweet
.
But with the upcoming Micropubs application (which shares a lot of functionality with xPub) the distinction becomes less clear. And it's hard to say what future applications may be created that find new uses for components we currently see as only applicable to one scenario.
Suggestion
Move all reusable components into pubsweet
.
Concretely this would mean breaking up existing dashboard
, manuscript
, review
and submit
into smaller (presentational) molecules and organisms which go into ui
. The other xpub-
packages mostly disappear with the move to Apollo and Styled Components. The container components for each app are moved into xpub-collabra
(since these the current thinking is that these would be too custom to be reusable).
Now all that's left in the xpub
repo is the app (with collabra styles removed). This becomes xpub-starter
and is forked to create new repos for xpub-collabra
, xpub-faraday
and xpub-elife
. (Alternatively xPub Collabra is just xpub-starter
with a Collabra theme.)
A similar process would see presentational components move from editoria
to pubsweet
.
Concerns
- Lots more components in
pubsweet
makes it harder to find things. We will need to find a good way to structure the repo and the style guide. - Lots more people contributing to a single repo potentially leads to chaos. We will need to be proactive in developing guidelines to avoid the recurrence of any problems that arise.