Content
View differences
Updated by Wieland Lindenthal 7 months ago
### Acceptance Criteria
* Add a new menu entry in Administration called "Documents"
* It has two sub-pages
* **Types** Types (covered in <mention class="mention" data-id="67443" data-type="work_package" data-text="##67443">##67443</mention> )
* **Real-time collaboration** Real-time collaboration
* The **Real-time collaboration** page
* For the time being, we can expect that real-time collaboration will be a feature for containerized installations (Helm, Kubernetes, Docker Compose, ...). For the deployment of Hocuspocus we currently plan Allows to only support container based installation. That also means that package based installation are by default not getting that feature. That will be a significant amount of installations. However, we want admins to move away from packed installations anyways. For example, we don't provide packages for new Linux distro versions, anymore. So for a significant amount of enable/disable real time we will need to support both, the new BlockNote+Hocuspocus real-time text collaboration and the old CKEditor5 based text editing that has not real-time text editing capability.
* In containerized installations typically all the fundamental settings for a complete setup are provided via ENV variables. We will do the same for integrating the real-time collaboration service Hocuspocus.
* Packed installations don't come with Hocuspocus and thus, we cannot expect the ENV variables to be set. However, we want to allow them to configure their OpenProject to work with any Hocuspocus server that is installed independently. Maybe the admin chooses to install only the Hocuspocus server on a container based approach and maybe even on a completely different hard ware or data center. Then we give them the option to configure all necessary settings via the administration UI.
* There are three settings
* These settings can be set via ENV variables, which is typically the case for container based installation. When set via ENV, the values for the settings are read-only within the Admin UI.
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__ENABLED="true"` (Setting `:real-time_text_collaboration_enabled`)
* This setting sets the "expectation" for the presence other configurations options and the subsequent system behavior. If it is enabled then it means that the system can expect that the other configuration settings are present and working. And if they are not working, we can give proper help, like "A certain setting is wrong/missing (as you want to use real-time collaboration)", "Real-time text collaboration server is not reachable", ... More on this in a separate feature work package (TBD)
* When disabled
* There is not BlockNote anywhere. For 17.0 we bundle BlockNote with the presence of a Hocuspocus real-time collaboration server.
* Old CKEditor5 Markdown markdown based documents will are still be used.
used
* In the Documents documents index page the "+ Document" button forwards to the `documents/new` route and renders a CKEditor5 based document creation form.
* When enabled
* OpenProject expects a Hocuspocus server to be present.
* If the Hocuspocus server is not present or has any other issue, present, then OpenProject shows meaningful errors accordingly.
(it is expected to misbehave)
* <br>
* In the Documents documents index page the "+ Document" button creates a new document and forwards to the `documents/<id>` route, with the ID of the document that was just created.
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__URL="WSS://example.org:12345/some/path"` (Setting `:real-time_text_collaboration_url`)
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__SECRET="4325up19ruj2k3j4lk32j4lj;l32j4"` (Setting `:real-time_text_collaboration_secret`) (used for symmetrical encryption of access tokens)
* These settings needs to be officially introduced and documented.
* The UI needs to adopt to the fact that these settings might be partially in read-only mode if provided as ENV variable.
* Case:
* Setting `:real-time_text_collaboration_enabled` is in read-only state
* and the value is `true`
* Show the UI in enabled state.
* Don't allow to deactivate (as setting is in read-only)
* The UI shows the real-time text collaboration server's URL, read-only.
* The UI indicates the presence of a shared secret "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*", read-only.
* Nice to have: we have a proper validation of the setup showing a health status:
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
* the value is `false` (not very likely case)
* enabling is not possible.
* There is no UI to set all the other settings. (could be discussed)
* Setting `:real-time_text_collaboration_enabled` is writable (not set via ENV)
* and the value is `true` (instead the value is read from the DB)
* UI allows to disable
* Disabling will first show a Danger-dialogue that documents that were created as real-time collaboration documents will not be viewable and not editable anymore. That warning needs to be confirmed.
* Will save the setting `:real-time_text_collaboration_enabled` as `false` in the DB.
* Will not overwrite the values of the two settings. (could be discussed)
* Shows the two fields (editable)
* And ideally show health status (nice to have)
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
* and the value is `false` (this is actually the default)
* UI allows to enable
* We don't need any Danger-Dialogue as BlockNote+Hocuspocus can be used alongside CKEditor5 based documents
* Reveals a form for the remaining two settings
* URL (respecting their read-only state: If that setting was provided via ENV the UI does not allow to change it)
* Secret (respecting their read-only state: If that setting was provided via ENV the UI does not allow to change it)
* There is a submit button
* that will ideally trigger a validation of the setup (nice to have for 17.0)
* Will store the values in the DB.
* Ideally we show some health status information (nice to have)
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
route.
**Out of scope**
* Health checks and diagnostics.
* Add a new menu entry in Administration called "Documents"
* It has two sub-pages
* **Types**
* **Real-time collaboration**
* The **Real-time collaboration** page
* For the time being, we can expect that real-time collaboration will be a feature for containerized installations (Helm, Kubernetes, Docker Compose, ...). For the deployment of Hocuspocus we currently plan
* In containerized installations typically all the fundamental settings for a complete setup are provided via ENV variables. We will do the same for integrating the real-time collaboration service Hocuspocus.
* Packed installations don't come with Hocuspocus and thus, we cannot expect the ENV variables to be set. However, we want to allow them to configure their OpenProject to work with any Hocuspocus server that is installed independently. Maybe the admin chooses to install only the Hocuspocus server on a container based approach and maybe even on a completely different hard ware or data center. Then we give them the option to configure all necessary settings via the administration UI.
* There are three settings
* These settings can be set via ENV variables, which is typically the case for container based installation. When set via ENV, the values for the settings are read-only within the Admin UI.
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__ENABLED="true"` (Setting `:real-time_text_collaboration_enabled`)
* This setting sets the "expectation" for the presence other configurations options and the subsequent system behavior. If it is enabled then it means that the system can expect that the other configuration settings are present and working. And if they are not working, we can give proper help, like "A certain setting is wrong/missing (as you want to use real-time collaboration)", "Real-time text collaboration server is not reachable", ... More on this in a separate feature work package (TBD)
* When disabled
* In the Documents
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__URL="WSS://example.org:12345/some/path"` (Setting `:real-time_text_collaboration_url`)
* `OPENPROJECT_REAL-TIME__TEXT__COLLABORATION__SECRET="4325up19ruj2k3j4lk32j4lj;l32j4"` (Setting `:real-time_text_collaboration_secret`) (used for symmetrical encryption of access tokens)
* These settings needs to be officially introduced and documented.
* The UI needs to adopt to the fact that these settings might be partially in read-only mode if provided as ENV variable.
* Case:
* Setting `:real-time_text_collaboration_enabled` is in read-only state
* and the value is `true`
* Show the UI in enabled state.
* Don't allow to deactivate (as setting is in read-only)
* The UI shows the real-time text collaboration server's URL, read-only.
* The UI indicates the presence of a shared secret "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*", read-only.
* Nice to have: we have a proper validation of the setup showing a health status:
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
* the value is `false` (not very likely case)
* enabling is not possible.
* There is no UI to set all the other settings. (could be discussed)
* Setting `:real-time_text_collaboration_enabled` is writable (not set via ENV)
* and the value is `true` (instead the value is read from the DB)
* UI allows to disable
* Disabling will first show a Danger-dialogue that documents that were created as real-time collaboration documents will not be viewable and not editable anymore. That warning needs to be confirmed.
* Will save the setting `:real-time_text_collaboration_enabled` as `false` in the DB.
* Will not overwrite the values of the two settings. (could be discussed)
* Shows the two fields (editable)
* And ideally show health status (nice to have)
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
* and the value is `false` (this is actually the default)
* UI allows to enable
* We don't need any Danger-Dialogue as BlockNote+Hocuspocus can be used alongside CKEditor5 based documents
* Reveals a form for the remaining two settings
* URL (respecting their read-only state: If that setting was provided via ENV the UI does not allow to change it)
* Secret (respecting their read-only state: If that setting was provided via ENV the UI does not allow to change it)
* There is a submit button
* that will ideally trigger a validation of the setup (nice to have for 17.0)
* Will store the values in the DB.
* Ideally we show some health status information (nice to have)
* "Connection is healthy"
* Real-time collaboration server version: "1.2.3"
* Health checks and diagnostics.