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 (Whiteboards): Shape index and arrow binding issue #8885

Merged
merged 8 commits into from Mar 24, 2023

Conversation

sprocketc
Copy link
Collaborator

@sprocketc sprocketc commented Mar 23, 2023

  • Fixed persisting and undoing shape index changes. To reproduce the issue, place shapes on top of each other and click [ or ] to change their order. After changing their original order, navigate to a different page or undo the action. You will see that the index changes are not persisted, and cannot be undone. Reintroduced the index property of shapes to fix persist. If the current index is different from the shape index, we update its nonce. Also added update-shapes-index to update the order on undo/redo. I removed bump from page, since it doesn't do anything anymore.
  • Fixed an issue with arrow bindings and undo/redo, To reproduce this, create two shapes, connect them with an arrow, delete one of them, undo the delete action and move the previously deleted shape. The arrow should follow the shape.
  • Fixed a minor overflow issue on references modal (see https://discord.com/channels/725182569297215569/1056543757065003048/1088117614070480928)

@sprocketc sprocketc changed the title Fix (Whiteboards): Shape index and bindings Fix (Whiteboards): Shape index and arrow bindings issue Mar 23, 2023
@sprocketc sprocketc changed the title Fix (Whiteboards): Shape index and arrow bindings issue [WIP] Fix (Whiteboards): Shape index and arrow bindings issue Mar 23, 2023
@sprocketc sprocketc changed the title [WIP] Fix (Whiteboards): Shape index and arrow bindings issue [WIP] Fix (Whiteboards): Shape index and arrow binding issue Mar 23, 2023
@sprocketc sprocketc changed the title [WIP] Fix (Whiteboards): Shape index and arrow binding issue Fix (Whiteboards): Shape index and arrow binding issue Mar 23, 2023
@sprocketc sprocketc marked this pull request as ready for review March 23, 2023 16:17
Copy link
Contributor

@tiensonqin tiensonqin left a comment

Choose a reason for hiding this comment

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

Work as described! 🚢

@@ -16,8 +16,9 @@ test('enable whiteboards', async ({ page }) => {
})

test('should display onboarding tour', async ({ page }) => {
// ensure onboarding tour is going to be triggered locally
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@tiensonqin
Copy link
Contributor

In the future, I hope we can use fractional Indexing for the shapes index and store it in the blocks instead of the page's properties, the current implementation needs to transact all the indexes when adjusting the position of one shape. Another benefit is that it makes real-time collaboration development easier.

@tiensonqin tiensonqin merged commit 5913d81 into master Mar 24, 2023
12 checks passed
@tiensonqin tiensonqin deleted the fix/shape-index branch March 24, 2023 06:40
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.

None yet

2 participants