-
Notifications
You must be signed in to change notification settings - Fork 15
fix(Cluster): side paddings #2301
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
Conversation
src/containers/Nodes/Nodes.scss
Outdated
--nodes-side-padding: var(--g-spacing-5); | ||
width: calc(100% + var(--nodes-side-padding)); | ||
padding-right: var(--nodes-side-padding); |
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.
Why don't you just remove padding here?
Such approach (100%+ width, hidden paddings, negative margins, transforms) is cursed, it causes unexpected behavior and bugs long-term - you fix cluster controls and autorefresh layout bugs every 2-3 weeks
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.
Really, thats time to get rid of this evil.
So, I've done it. Stand redeployed.
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.
You didn't delete groups wrapper classes
src/containers/Nodes/Nodes.scss
Outdated
--nodes-side-padding: var(--g-spacing-5); | ||
width: calc(100% + var(--nodes-side-padding)); | ||
padding-right: var(--nodes-side-padding); |
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.
You didn't delete groups wrapper classes
} | ||
|
||
&__content { | ||
width: calc(100% - var(--cluster-side-padding)); |
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.
It seems that this is the last evil, but essential. For now our scroll container doesn't have paddings, so sticky elements stick to it.
I found this solution better than passing to all tables inside Cluster page classes with left: 20px
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.
What if you add left padding to cluster scroll container, and right padding to all cluster components (dashboard, tabs, tabs content)?
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.
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.
Pull Request Overview
This PR adjusts the side paddings and sticky positioning across various cluster-related components. Key changes include:
- Removal of the groups wrapper padding in Storage and Nodes containers.
- Updates to sticky behavior and side padding in Cluster and ClusterOverview components, including new wrapper elements.
- A width change from 100% to max-content in TableWithControlsLayout controls.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/containers/Storage/Storage.scss | Removed redundant groups wrapper padding. |
src/containers/Nodes/Nodes.scss | Removed redundant groups wrapper padding. |
src/containers/Cluster/ClusterOverview/ClusterOverview.scss | Removed sticky positioning from the overview wrapper. |
src/containers/Cluster/Cluster.tsx | Added new dashboard and content wrappers; adjusted route path formatting. |
src/containers/Cluster/Cluster.scss | Updated styling for side paddings and sticky elements. |
src/components/TableWithControlsLayout/TableWithControlsLayout.scss | Changed controls width from full-width to max-content. |
Comments suppressed due to low confidence (2)
src/containers/Cluster/ClusterOverview/ClusterOverview.scss:32
- Removal of the sticky positioning from the __overview-wrapper class may affect the intended behavior. If sticky layout is required for proper usability, please revisit this change.
position: sticky; (removed) and left: 0; (removed)
src/components/TableWithControlsLayout/TableWithControlsLayout.scss:23
- Changing the width from 100% to 'max-content' can impact responsiveness. Verify that this adjustment does not lead to layout overflow issues across different screen sizes.
width: max-content;
@@ -20,7 +20,7 @@ | |||
&__controls { | |||
z-index: 3; | |||
|
|||
width: 100%; | |||
width: max-content; |
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.
Closes #2300
Stand
CI Results
Test Status: β FAILED
π Full Report
π No changes in tests. π
Bundle Size:β οΈ
Current: 0.00 KB | Main: 0.00 KB
Diff: 0.00 KB (N/A)
βΉοΈ CI Information