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

hotfix: block grid live editing race condition #2101

Merged

Conversation

nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented Jul 5, 2024

Makes Block Grid Editor only set its data if its not in Live Editing Mode. Cause otherwise they end up competing with each other and eventually out rule the corrections made by the Property Editor.

Fixes: umbraco/Umbraco-CMS#16227

Here a semantic diff for better overview:
https://app.semanticdiff.com/gh/umbraco/Umbraco.CMS.Backoffice/pull/2101/changes#src/packages/block/block/workspace/block-workspace.context.ts

Types of changes

This makes sure the Block Workspace observes data of the Property Editor while in create-state, in this way the corrections made of the Property Editor, like rowSpan setting, gets set and the Block Workspace receives that correction.

Only sets the Blocks data if its not in live editing mode. Cause setting these will eventually overwrite the corrections from the Property Editor.

  • 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

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.

@nielslyngsoe nielslyngsoe changed the base branch from main to release/14.1 July 5, 2024 11:00
@nielslyngsoe nielslyngsoe changed the title V14/hotfix/block grid live editing race condition hotfix: block grid live editing race condition Jul 5, 2024
Copy link
Collaborator

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

I was able to reproduce the problem before applying this fix, and after changing to this branch and re-creating the block grid in the exact same way, I was no longer able to reproduce the bug! LGTM!

@iOvergaard iOvergaard merged commit 98b657d into release/14.1 Jul 5, 2024
8 checks passed
@iOvergaard iOvergaard deleted the v14/hotfix/block-grid-live-editing-race-condition branch July 5, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants