Skip to content

Conversation

@valkirilov
Copy link
Member

@valkirilov valkirilov commented Nov 27, 2025

What

Refactored the Analytics tabs layout (Overview, Database Analysis, Slow Log) to have a consistent appearance across all three pages.

  • created a shared AnalyticsPageHeader component that provides a unified header with tabs and a full-width border that seamlessly aligns with the tabs' active border.
  • applied consistent spacing and padding across all pages
  • change the Slow Log page action button, to be primary (following new FIgma design)

Testing

  1. Navigate to each Analytics tab (Overview, Database Analysis, Slow Log)
  2. Verify the tabs have a consistent full-width border below them that aligns perfectly with the active tab's border
  3. Check that spacing between the header and content is consistent across all three tabs
  4. Verify the "Configure" button on Slow Log page is styled as a primary button
  5. Verify the "New Report" button on Database Analysis page is smaller

Before

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

After

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

Closes #RI-7785


Note

Refactors ClusterDetailsHeader to styled-components and updates AnalyticsPageHeader to use theme-based tabs border, removing the unused children prop.

  • UI Refactor
    • pages/cluster-details/.../ClusterDetailsHeader.tsx:
      • Replace CSS module with styled-components (ClusterDetailsHeader.styles.ts); remove classnames/lodash usage.
      • Implement layout/padding via Container, Content, Item (with $borderLeft) and Loading.
      • Integrate AnalyticsPageHeader; simplify tooltip classes.
    • pages/database-analysis/.../AnalyticsPageHeader.styles.ts:
      • Compute header border-bottom from theme tabs (theme.components.tabs.variants.default.tabsLine).
    • pages/database-analysis/.../AnalyticsPageHeader.tsx & .types.ts:
      • Remove children support; keep optional actions.
  • Cleanup
    • Delete styles.module.scss for cluster details header; minor import removals.

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

@valkirilov valkirilov changed the title fix(ui): integrate AnalyticsPageHeader in ClusterDetails and SlowLog … RI-7785 Make Analysis tabs borders and action buttons consitent Nov 27, 2025
@valkirilov valkirilov self-assigned this Nov 27, 2025
@valkirilov valkirilov marked this pull request as ready for review November 27, 2025 15:11
@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% 21004/25323
🟡 Branches 68.15% 8853/12991
🟡 Functions 78.05% 5742/7357
🟢 Lines 83.35% 20569/24677

Test suite run success

5474 tests passing in 705 suites.

Report generated by 🧪jest coverage report action from 90eae6f

]

return (
<div className={styles.container} data-testid="cluster-details-header">
Copy link
Contributor

Choose a reason for hiding this comment

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

How about making this styled container? And from styles.module.scss remove the bg color?

Copy link
Member Author

@valkirilov valkirilov Nov 28, 2025

Choose a reason for hiding this comment

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

Done 👍

@@ -1,6 +1,5 @@
.container {
background-color: var(--euiColorEmptyShade);
Copy link
Contributor

Choose a reason for hiding this comment

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

Also remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

import { Theme } from 'uiSrc/components/base/theme/types'

const getBorderColor = (theme: Theme) =>
theme.name === 'dark' ? theme.color.dark600 : theme.color.dusk150
Copy link
Contributor

Choose a reason for hiding this comment

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

no no no no, these are all goiing away. Use semantic color, or you will have to change them next week. There are semantic border colors

Copy link
Member Author

Choose a reason for hiding this comment

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

Valid point. I made changes, and now we're hooked onto the semantic variables for the component itself, so we'll depend on it, and we should be in sync with its colors (unless they drop the semantics on a component level 😅).


export const HeaderContainer = styled.div`
width: 100%;
border-bottom: 4px solid
Copy link
Contributor

Choose a reason for hiding this comment

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

theme.core.space.space050

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done 👍

@valkirilov valkirilov force-pushed the fe/bugfix/RI-7785/fix-analysis-pages-padding branch from d892a98 to 5760f3c Compare November 28, 2025 13:51
Base automatically changed from fe/bugfix/RI-7785/fix-analysis-pages-padding to main November 28, 2025 14:22
…pages

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

References: #RI-7785
- Simplify the AnalyticsPageHeader component by removing the unused children prop.
- Update the corresponding type definition to reflect this change.

References: #RI-7785
@valkirilov valkirilov force-pushed the fe/bugfix/RI-7785/rework-analysis-layout branch from 63d00fb to 6de5a78 Compare November 28, 2025 14:27
- Introduced a new styled-components file for ClusterDetailsHeader, replacing the previous SCSS styles.
- Updated the ClusterDetailsHeader component to utilize the new styled components for improved styling and maintainability.
- Removed the old styles module to streamline the codebase.

References: #RI-7785
@valkirilov valkirilov merged commit 371f9c4 into main Dec 1, 2025
19 checks passed
@valkirilov valkirilov deleted the fe/bugfix/RI-7785/rework-analysis-layout branch December 1, 2025 14:39
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.

5 participants