-
Notifications
You must be signed in to change notification settings - Fork 171
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
Push intended bounds for empty elements #4359
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Job #8825: Bundle Size — 63.66MiB (+0.04%).
Warning Bundle contains 64 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
View job #8825 report View feat/true-up-empty branch activity |
# Conflicts: # editor/src/components/canvas/canvas-strategies/strategies/convert-to-absolute-and-move-strategy.tsx
# Conflicts: # editor/src/components/canvas/canvas-strategies/strategies/convert-to-absolute-and-move-strategy.tsx # editor/src/components/canvas/commands/push-intended-bounds-and-update-targets-command.ts
Performance test results: |
Performance test results: |
balazsbajorics
approved these changes
Oct 24, 2023
Rheeseyb
reviewed
Oct 24, 2023
...r/src/components/canvas/commands/push-intended-bounds-and-update-hugging-elements-command.ts
Outdated
Show resolved
Hide resolved
Rheeseyb
approved these changes
Oct 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4364
Problem:
This PR extends the true up logic so that it goes beyond just group bounds.
For reviewers: the majority of the diff is just renames, while the actual logic changes happening in
editor/src/components/canvas/commands/push-intended-bounds-and-update-targets-command.ts
,editor/src/components/editor/actions/actions.tsx
, andeditor/src/core/model/true-up-targets.ts
(plus the tests).What this does:
PushIntendedBoundsTarget
to discriminate between different targets: currently, groups and hugging elementsrunPushIntendedBoundsAndUpdateTargets
into multiple steps, one for each type ofPushIntendedBoundsTarget
. The new commands are triggered byTRUE_UP_ELEMENTS
(renamed fromTRUE_UP
)→ set their x/y/w/h so that they match the last non-empty bounds.
Notes:
The explicit use of a
_group
type is more for backwards compatibility and in the future it could make sense to extend it to any element that can behave like a group, but for now I think it's fine to have it like that so it's clear what's being changed.