Add the concept of managed/temporary workspaces

Created on 19 November 2019, about 5 years ago
Updated 15 November 2024, about 1 month ago

Problem/Motivation

There are various use-cases when we need to display the contents of a workspace to the site users (content editors), without showing them the full workspace UI. Here are two examples:

- the node preview system: it could be re-implemented using the Workspaces API, by creating a temporary workspace when the user enters the "preview state" for a node;
- content moderation: as mentioned in #3037136-49: Make Workspaces and Content Moderation work together and implemented in the Workspace moderation contrib module, a temporary workspace could be used behind the scenes to emulate the default/pending/latest revision behavior of the entity API.

Proposed resolution

Add a boolean temporary base field to the workspace entity type, which provides the following behavior:

- they are hidden from the regular admin listing (maybe they can be displayed in a separate tab)
- they can not be "switched into" manually from the UI, they can only be (de)activated by the code that defined/created them
- they are automatically deleted after a fixed time period (configurable globally or per-workspace?). Maybe the temporary base field should be a "expires at" timestamp field instead?

Remaining tasks

Discuss all the possibilities, work on a patch, etc.

User interface changes

Possibly a new local task on the main workspace listing page.

API changes

TBD.

Data model changes

TBD.

Release notes snippet

TBD.

Feature request
Status

Active

Version

11.0 🔥

Component

workspaces.module

Created by

🇷🇴Romania amateescu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇴Romania amateescu

    Started working on this.

  • 🇩🇪Germany geek-merlin Freiburg, Germany

    @amateescu: Great news! This was on my hot-list for long, but never found time.

    From my mental notes:
    > Add a boolean temporary base field to the workspace entity type
    As "managed" workspace, it shloudl rather be a "Owner"/"Provider" base field, so modules can recognize their workspaces (which obeoletes the boolean field).

    WDYT?

Production build 0.71.5 2024