-
Notifications
You must be signed in to change notification settings - Fork 170
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
Correctly Aligned Grid Controls #6484
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
- `alignContent` in `getSpecialMeasurements` now isn't filtered by `getFlexJustifyContent`. - Added `justifyContent` and `alignContent` to `GridResizingProps`. - In `GridResizing`, the main div now includes `paddingRight`, `paddingBottom`, `justifyContent` and `alignContent`. - `GridControl` now uses `range` to build the `placeholders` value. - Removed position shifting from `GridControl` and changed the `border` to an `outline` as those were causing the content to be repositioned. - Added `range` utility function. - `SpecialSizeMeasurements.alignContent` is now typed to `string | null` instead of `FlexJustifyContent | null` as that type is wildly incorrect.
seanparsons
requested review from
gbalint,
Rheeseyb,
ruggi,
balazsbajorics and
bkrmendy
October 7, 2024 11:41
#14669 Bundle Size — 57.74MiB (~+0.01%).57a6a40(current) vs 916e8b9 master#14667(baseline) Warning Bundle contains 70 duplicate packages – View duplicate packages Bundle metrics
|
Current #14669 |
Baseline #14667 |
|
---|---|---|
Initial JS | 40.74MiB (~+0.01% ) |
40.74MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 18.84% |
17.95% |
Chunks | 21 |
21 |
Assets | 23 |
23 |
Modules | 4113 |
4113 |
Duplicate Modules | 213 |
213 |
Duplicate Code | 27.41% |
27.41% |
Packages | 475 |
475 |
Duplicate Packages | 70 |
70 |
Bundle size by type 2 changes
1 regression
1 improvement
Current #14669 |
Baseline #14667 |
|
---|---|---|
JS | 57.73MiB (~+0.01% ) |
57.73MiB |
HTML | 7.37KiB (-0.25% ) |
7.39KiB |
Bundle analysis report Branch fix/correctly-aligned-grid-contr... Project dashboard
Generated by RelativeCI Documentation Report issue
ruggi
approved these changes
Oct 7, 2024
@@ -892,19 +908,19 @@ export const GridControl = React.memo<GridControlProps>(({ grid }) => { | |||
gridPath: gridPath, | |||
}) | |||
|
|||
const placeholders = Array.from(Array(grid.cells).keys()) | |||
const placeholders = range(0, grid.cells) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪄
bkrmendy
approved these changes
Oct 8, 2024
balazsbajorics
approved these changes
Oct 8, 2024
liady
pushed a commit
that referenced
this pull request
Dec 13, 2024
- `alignContent` in `getSpecialMeasurements` now isn't filtered by `getFlexJustifyContent`. - Added `justifyContent` and `alignContent` to `GridResizingProps`. - In `GridResizing`, the main div now includes `paddingRight`, `paddingBottom`, `justifyContent` and `alignContent`. - `GridControl` now uses `range` to build the `placeholders` value. - Removed position shifting from `GridControl` and changed the `border` to an `outline` as those were causing the content to be repositioned. - Added `range` utility function. - `SpecialSizeMeasurements.alignContent` is now typed to `AlignContent | null` instead of `FlexJustifyContent | null` as that is more correct.
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.
Problem:
It was initially found that adding
alignContent: 'center'
causes a skew in the placeholder boundaries, but this also affects the resize handles.Fix:
This involves several fixes:
border
foroutline
inGridControl
so that it would not affect the content held within and removed the slight shifting of that element to cater for theborder
.alignContent
as there are values which were being filtered out.Before:
After:
Commit Details:
alignContent
ingetSpecialMeasurements
now isn't filtered bygetFlexJustifyContent
.justifyContent
andalignContent
toGridResizingProps
.GridResizing
, the main div now includespaddingRight
,paddingBottom
,justifyContent
andalignContent
.GridControl
now usesrange
to build theplaceholders
value.GridControl
and changed theborder
toan
outline
as those were causing the content to be repositioned.range
utility function.SpecialSizeMeasurements.alignContent
is now typed toAlignContent | null
insteadof
FlexJustifyContent | null
as that is more correct.Manual Tests:
I hereby swear that: