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

Review if we still need to enqueue a follow-up group true-up inside the group true-up code #4424

Open
balazsbajorics opened this issue Oct 25, 2023 · 0 comments

Comments

@balazsbajorics
Copy link
Contributor

as I wrote in #4422

It really looks like that the canvas strategies are doing two mistakes that are negating each other:

pushIntendedBoundsAndUpdateGroups(
  [{ target: selectedElement, frame: newFrame }],
  'starting-metadata', // mistake 1. enqueue a follow-up true up by specifying starting-metadata 
),
...groupChildren.map((c) =>
  queueTrueUpElement([trueUpGroupElementChanged(c.elementPath)]), // mistake 2. ONLY for group children (which should already be suspicious that we need this kind of understanding in every strategy!!) then enqueue a _second_ true up that undoes the mistakes of the previous true-up
),

These are the two PRs that are responsible for the current situation: #4042 and #4183

I have a feeling that the edge case these two PRs tried to solve is already solved by another system in place...

What I would do is remove the enqueued true ups, and also remove the follow-up queueTrueUpElement from the canvas strategies, and see if we are still breaking any tests.

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

No branches or pull requests

1 participant