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

fix layouting issues with collab #347

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

loreanvictor
Copy link
Contributor

Checklist

  • I documented the TypeScript code using JSDoc style.

Motivation and Context

Importing patches can sometimes lead to broken layouts: for example when a relationship is updated, its path might have been set due to a different context (state) than what is present on local machine (perhaps due to concurrent changes), resulting in broken relationships.

Description

This PR fixes the aforementioned issues by running layouter after importing patches. This used to be the flow, but due to layouter instability and locking certain actions (e.g. resizing), was disabled for a while. The layouter is now executed with a debounce, to mitigate its inherent instability and provide a smoother user experience.

Steps for Testing

  1. Run two Apollon instances using Apollon_standalone.
  2. Try to make changes at the same time and break the layouts.

They layouts should typically fix themselves. Using subscribeToAllModelChangePatches() method helps with finding corner cases more easily.

Test Coverage

File Branch Line
services/patcher/patcher-saga.ts 76.92% 91.48%

@matthiaslehnertum matthiaslehnertum merged commit c001a9c into develop Mar 24, 2024
5 checks passed
@matthiaslehnertum matthiaslehnertum deleted the bugfix/resolve-layouting-issues-in-collab branch March 24, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants