[BPSC] Add collaborative form fields
Context
These enhancements support the implementation of the collaborative reviews. More specifically, targeting the form field types and concurrency.
Proposal
- YJS collaboration on the following form field components:
TextInput
,RichTextEditor
- Graphql subscriptions to receive real-time updates on
Select
,SafeRadioGroup
,CheckboxGroup
andSupplementaryFiles
-- and server-side logic to ensure that saved values merge with rather than overwrite other recent changes in case of race conditions. YJS is unnecessary for these fields and would provide no real benefits. - Remove "List of contributors" (
AuthorsInput
) and "List of links" (LinksInput
) from the set of field types that can be included in reviews. I think these are not used yet by any customer and this would save a lot of work implementing YJS for them.AuthorsInput
may be replaced with a nested form in future, so implementing YJS for it may be wasted work. Modify the reviews logic to allow a review object with no associateduserId
, but withcollaborative
property set to true. I'm assuming at this stage that there can only be one collaborative review per manuscript version. In future we may need multiple, but that's more work and we can defer until then.
Design
TBC