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

Block Workspace: Inherit Property VariantId #2214

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

nielslyngsoe
Copy link
Member

Parse VariantId from Property Context to Block Workspace to its Block DataSet Variant ID.

Though Blocks Data is invariant, it can take part of a varying Property, making the data belong to a specific Variant.

This should result in the following cases:

Document with invariant Property, will provide a Invariant Variant ID for the Blocks Workspace.

Document with varying Property, will inherit the culture(& eventually segment) a provide it for the Blocks Workspace.

Fixes umbraco/Umbraco-CMS#16859

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)

Motivation and context

This is needed for Property Editors that want to use the Culture for their responsibility. That could be picking other content, then that should be of the same culture as the property.

How to test?

Screenshots (if appropriate)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

# Conflicts:
#	src/packages/block/block/workspace/block-element-manager.ts
@madsrasmussen madsrasmussen self-assigned this Aug 19, 2024
Copy link
Contributor

@madsrasmussen madsrasmussen left a comment

Choose a reason for hiding this comment

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

It works as expected 👍

Copy link

sonarcloud bot commented Aug 19, 2024

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

@madsrasmussen madsrasmussen removed their assignment Aug 19, 2024
@nielslyngsoe nielslyngsoe merged commit f028142 into main Aug 19, 2024
7 of 8 checks passed
@nielslyngsoe nielslyngsoe deleted the v14/bugfix/block-inherit-variant-id branch August 19, 2024 11:20
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.

Cannot get variantId of property
2 participants