Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Readonly mode for umb-collection element #2247

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Aug 30, 2024

Description

This PR adds readonly mode to the umb-collection element

General concept:

  • The collection context includes a ReadOnlyStateManager that keeps track on read-only states.
  • A state is added to the manager when the readonly attribute gets set on the umb-collection element.
  • A new condition has to be added so extensions can check if a workspace is read-only. The condition is currently added to create actions so they only appear when a collection is writable.

Notice:
I have added a new workspace view for a "Content collection". A collection based on a content type with a data type configuration and variable data. It is currently a duplication of the more generic named "workspace-view-collection".

How to test

  • Add the readonly attribute to the element through developer tools

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We figured out in a pair review that the Language Permissions should not affect Create abilities (this is the change to be reverted)
So we are left with a PR that just does some clean up/refactoring. Which should be completed, so the default 'Collection'-kind Workspace View does not depend on the Content Workspace Configuration/DataType. (Mads knowns the mission)
Therefor I marked it as Draft.

@nielslyngsoe nielslyngsoe marked this pull request as draft September 9, 2024 09:39
Copy link

sonarcloud bot commented Sep 12, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
13.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@leekelleher leekelleher removed their request for review September 13, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants