Skip to content

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

Merged
merged 5 commits into from
May 21, 2025
Merged

fix(Cluster): side paddings #2301

merged 5 commits into from
May 21, 2025

Conversation

Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented May 19, 2025

Closes #2300
Stand

CI Results

Test Status: ❌ FAILED

πŸ“Š Full Report

Total Passed Failed Flaky Skipped
318 196 122 0 0

😟 No changes in tests. πŸ˜•

Bundle Size: ⚠️

Current: 0.00 KB | Main: 0.00 KB
Diff: 0.00 KB (N/A)

⚠️ Unable to calculate change.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • πŸ“Š indicates links to detailed reports.
  • πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.

Comment on lines 20 to 22
--nodes-side-padding: var(--g-spacing-5);
width: calc(100% + var(--nodes-side-padding));
padding-right: var(--nodes-side-padding);
Copy link
Member

@artemmufazalov artemmufazalov May 19, 2025

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

Copy link
Contributor Author

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.

Copy link
Member

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

@Raubzeug Raubzeug requested a review from artemmufazalov May 19, 2025 11:30
Comment on lines 20 to 22
--nodes-side-padding: var(--g-spacing-5);
width: calc(100% + var(--nodes-side-padding));
padding-right: var(--nodes-side-padding);
Copy link
Member

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

@Raubzeug Raubzeug requested a review from artemmufazalov May 20, 2025 06:49
}

&__content {
width: calc(100% - var(--cluster-side-padding));
Copy link
Contributor Author

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

Copy link
Member

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)?

Copy link
Contributor Author

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)?

Than we get back with layout bug on the left from tabs :(
Screenshot 2025-05-20 at 17 42 57

@astandrik astandrik requested a review from Copilot May 21, 2025 08:56
Copy link
Contributor

@Copilot Copilot AI left a 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;

@astandrik
Copy link
Collaborator

image

@@ -20,7 +20,7 @@
&__controls {
z-index: 3;

width: 100%;
width: max-content;
Copy link
Member

Choose a reason for hiding this comment

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

width: 100% here is for the create db button - it should stick to the right

Expected:
Screenshot 2025-05-21 at 15 46 53

You code:
Screenshot 2025-05-21 at 15 45 11

@Raubzeug Raubzeug added this pull request to the merge queue May 21, 2025
Merged via the queue into main with commit 478c9e8 May 21, 2025
5 checks passed
@Raubzeug Raubzeug deleted the cluster-paddings branch May 21, 2025 15:53
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

Successfully merging this pull request may close these issues.

Cluster page side align
3 participants