Content
View differences
Updated by Dominic Bräunlein 2 days ago
### Concept
A user can link existing wiki pages or create a new wiki page in XWiki directly from OpenProject by using quick commands in the work package toolbar.
###
Acceptance criteria
In OpenProject:
* There are two new Macros in the work package toolbar
* "New wiki page" and "Add wiki page"
<br>
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918299/content">
* A _New wiki page_ dialog will appear:
* The user will be invited to enter a title for the Wiki.
* In the future, they will also be able to select the Space to which this Wiki will belong.
* The newly-created wiki page will appear in the Wiki tab since it is also automatically linked with the work package.
* If the link was created in-line, a corresponding link will appear. Clicking on this link will take the user to the newly-created page on XWiki.
###
Implementation
* Prerequisites:
* (assumed to be present) OpenProject&#39;s rich text editor has a generic slash-command UX pattern implemented, generically allowing &quot;providers&quot; to register commands (Currently not yet available. Implementation outside the scope of this here. Will be done by OpenProject independently)
* (assumed to be present) XWiki API for listing spaces
* (assumed to be present) XWiki API for listing pages, optionally filtering by space
* (Implementation needed in XWiki) XWiki API for pages that allow for creating a link to a OpenProject work package
* (Implementation needed in XWiki and OpenProject) Bi-directional OAuth setup on administrator level.&nbsp;Defined in ##55601.
* Slash command editor macro &quot;Create new wiki page&quot;
* Effort:
* UI to guide the user to grant OpenProject access to XWiki via OAuth unless a valid access token is already present.
* Implement slash-command &quot;provider&quot; for **creating** wiki pages
* Modal window with a form for creating a wiki page
* Inputs
* Select target space
* Select target page
* Text field for page title
* On form submit
* create page by sending a POST request to XWiki to create the page
* send POST request to XWiki to create the link between work package and freshly created wiki page
* Show optional link &quot;Edit page in XWiki&quot;
* On modal close
* send POST request to XWiki to create the link
* update the current work package &quot;Wiki&quot; tab to show new link
* Insert OpenProject rich text editor macro for showing a link to the wiki page.
### Visuals
**User cans type / and select** _**New wiki page**_ **to create and link a wiki page in-line:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107263/content">
**The New wiki page dialog lets users type a name and (in the future) select a space:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107264/content">
**The link also appears in the Wikis tab in the right-hand split screen:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107265/content">
### Mockups
**View early-stage mockups on Figma:**
###
A user can link existing wiki pages or create a new wiki page in XWiki directly from OpenProject by using quick commands in the work package toolbar.
###
In OpenProject:
* There are two new Macros in the work package toolbar
* &quot;New wiki page&quot; and &quot;Add wiki page&quot;
<br>
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/918299/content">
* A _New wiki page_ dialog will appear:
* The user will be invited to enter a title for the Wiki.
* In the future, they will also be able to select the Space to which this Wiki will belong.
* The newly-created wiki page will appear in the Wiki tab since it is also automatically linked with the work package.
* If the link was created in-line, a corresponding link will appear. Clicking on this link will take the user to the newly-created page on XWiki.
* Prerequisites:
* (assumed to be present) OpenProject&#39;s rich text editor has a generic slash-command UX pattern implemented, generically allowing &quot;providers&quot; to register commands (Currently not yet available. Implementation outside the scope of this here. Will be done by OpenProject independently)
* (assumed to be present) XWiki API for listing spaces
* (assumed to be present) XWiki API for listing pages, optionally filtering by space
* (Implementation needed in XWiki) XWiki API for pages that allow for creating a link to a OpenProject work package
* (Implementation needed in XWiki and OpenProject) Bi-directional OAuth setup on administrator level.&nbsp;Defined in ##55601.
* Slash command editor macro &quot;Create new wiki page&quot;
* Effort:
* UI to guide the user to grant OpenProject access to XWiki via OAuth unless a valid access token is already present.
* Implement slash-command &quot;provider&quot; for **creating** wiki pages
* Modal window with a form for creating a wiki page
* Inputs
* Select target space
* Select target page
* Text field for page title
* On form submit
* create page by sending a POST request to XWiki to create the page
* send POST request to XWiki to create the link between work package and freshly created wiki page
* Show optional link &quot;Edit page in XWiki&quot;
* On modal close
* send POST request to XWiki to create the link
* update the current work package &quot;Wiki&quot; tab to show new link
* Insert OpenProject rich text editor macro for showing a link to the wiki page.
### Visuals
**User cans type / and select** _**New wiki page**_ **to create and link a wiki page in-line:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107263/content">
**The New wiki page dialog lets users type a name and (in the future) select a space:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107264/content">
**The link also appears in the Wikis tab in the right-hand split screen:**
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/107265/content">
### Mockups
**View early-stage mockups on Figma:**