Skip to content

Conversation

@valkirilov
Copy link
Member

@valkirilov valkirilov commented Nov 27, 2025

What

Standardized horizontal padding (16px) across all three analysis pages (Overview, Database Analysis, and Slow Log) by creating a shared AnalysisPageContainer component and refactoring all pages to use it.

Changes

  • Created shared AnalysisPageContainer component with consistent padding-inline: 1.6rem
  • Replaced local container styles in Database Analysis page with shared component
  • Migrated from SCSS to styled-components and applied shared container

Testing

  1. Navigate to each analysis page (Overview, Database Analysis, Slow Log)
  2. Verify all three pages have consistent horizontal padding (16px from edges)
  3. Verify content is properly aligned and layout is not broken
  4. Switch between tabs to ensure padding remains consistent

Before

Screen.Recording.2025-11-27.at.15.28.19.mov

After

Screen.Recording.2025-11-27.at.15.26.38.mov

Closes #RI-7785


Note

Introduces shared layout components and refactors Cluster Details, Database Analysis, and Slow Log pages for consistent padding and header structure, with minor styling and button updates.

  • UI/Analytics Layout
    • New components: AnalysisPageContainer (shared overflow + padding-inline), AnalyticsPageHeader (wraps AnalyticsTabs + optional actions).
    • Refactors:
      • database-analysis: Replace MainContainer with AnalysisPageContainer; header rebuilt to use AnalyticsPageHeader; tabs wrapped in StyledTabs with top padding.
      • slow-log: Page migrated to AnalysisPageContainer; header/actions moved into AnalyticsPageHeader; add ContentWrapper for content spacing; remove styles.module.scss.
      • cluster-details: Use AnalyticsPageHeader in header; ClusterDetailsPageWrapper adds scrollbarStyles and theme padding.
  • Styling/UX tweaks
    • Tabs/header alignment: header bottom border to match tabs; TabsWrapper overlaps border; consistent theme spacing (space200).
    • Buttons: "New Report" set to small size; "Configure" switched to PrimaryButton.
    • Minor cleanups: remove extra generics/props; replace direct AnalyticsTabs usages with AnalyticsPageHeader.

Written by Cursor Bugbot for commit a7f4efb. This will update automatically on new commits. Configure here.

@valkirilov valkirilov self-assigned this Nov 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.94% 20995/25314
🟡 Branches 68.12% 8849/12991
🟡 Functions 78.03% 5737/7352
🟢 Lines 83.35% 20560/24668

Test suite run success

5474 tests passing in 705 suites.

Report generated by 🧪jest coverage report action from a7f4efb

@valkirilov valkirilov marked this pull request as ready for review November 27, 2025 15:06
@valkirilov valkirilov changed the title RI-7785 Fix analysis pages padding consistency RI-7785 Fix Analysis tabs padding consistency Nov 27, 2025
export const Wrapper = styled.div`
${scrollbarStyles()}
max-height: calc(100% - 134px);
max-width: 1920px;
Copy link
Contributor

Choose a reason for hiding this comment

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

So specific ...
All these values should be put together and with descriptive names.
I guess one more tech debt item

Copy link
Member Author

Choose a reason for hiding this comment

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

It was ported from the styles.sass.ts, but actually, we don't need it at all. Removed 👍

pd-redis
pd-redis previously approved these changes Nov 28, 2025
Create reusable container component for analysis pages with consistent
horizontal padding.

References: #RI-7785
Replace local MainContainer with shared AnalysisPageContainer component.

References: #RI-7785
Wrap Overview page content in shared AnalysisPageContainer to add
consistent horizontal padding.

References: #RI-7785
…etailsPage

Remove styles.module.scss and implement styled-components for consistent styling in the ClusterDetailsPage

References: #RI-7785
Replace main container with shared AnalysisPageContainer to add
consistent horizontal padding. Remove unused SCSS styles.

References: #RI-7785
…pages

- Replace AnalyticsTabs with the new AnalyticsPageHeader component for improved consistency across pages.
- Update styles and layout to enhance visual coherence.

References: #RI-7785
- Remove max-height and max-width properties from the Wrapper styled component for improved layout flexibility.

References: #RI-7785
@valkirilov valkirilov force-pushed the fe/bugfix/RI-7785/fix-analysis-pages-padding branch from d892a98 to 5760f3c Compare November 28, 2025 13:51
export const StyledAnalysisPageContainer = styled(Col)`
overflow: auto;
padding-inline: ${({ theme }: { theme: Theme }) => theme.core.space.space200};
`
Copy link

Choose a reason for hiding this comment

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

Bug: Missing height constraint on AnalysisPageContainer

The StyledAnalysisPageContainer is missing height: 100% which was present in the old styles for all three pages. Without a defined height, the container won't properly constrain its children, causing the overflow: auto to not work correctly and preventing the pages from filling the available vertical space. The Col component's flex-grow: 1 alone isn't sufficient without a parent height constraint.

Fix in Cursor Fix in Web

@valkirilov valkirilov merged commit 4905099 into main Nov 28, 2025
19 checks passed
@valkirilov valkirilov deleted the fe/bugfix/RI-7785/fix-analysis-pages-padding branch November 28, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants