-
Notifications
You must be signed in to change notification settings - Fork 421
RI-7785 Make Analysis tabs borders and action buttons consitent #5259
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
Code Coverage - Frontend unit tests
Test suite run success5474 tests passing in 705 suites. Report generated by 🧪jest coverage report action from 90eae6f |
...ight/ui/src/pages/database-analysis/components/analytics-page-header/AnalyticsPageHeader.tsx
Outdated
Show resolved
Hide resolved
| ] | ||
|
|
||
| return ( | ||
| <div className={styles.container} data-testid="cluster-details-header"> |
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.
How about making this styled container? And from styles.module.scss remove the bg color?
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.
Done 👍
| @@ -1,6 +1,5 @@ | |||
| .container { | |||
| background-color: var(--euiColorEmptyShade); | |||
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.
Also remove this?
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.
Done 👍
| import { Theme } from 'uiSrc/components/base/theme/types' | ||
|
|
||
| const getBorderColor = (theme: Theme) => | ||
| theme.name === 'dark' ? theme.color.dark600 : theme.color.dusk150 |
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.
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
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.
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 |
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.
theme.core.space.space050
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.
Thanks, done 👍
d892a98 to
5760f3c
Compare
…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
63d00fb to
6de5a78
Compare
- 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
What
Refactored the Analytics tabs layout (Overview, Database Analysis, Slow Log) to have a consistent appearance across all three pages.
AnalyticsPageHeadercomponent that provides a unified header with tabs and a full-width border that seamlessly aligns with the tabs' active border.Testing
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
ClusterDetailsHeaderto styled-components and updatesAnalyticsPageHeaderto use theme-based tabs border, removing the unusedchildrenprop.pages/cluster-details/.../ClusterDetailsHeader.tsx:ClusterDetailsHeader.styles.ts); removeclassnames/lodashusage.Container,Content,Item(with$borderLeft) andLoading.AnalyticsPageHeader; simplify tooltip classes.pages/database-analysis/.../AnalyticsPageHeader.styles.ts:border-bottomfrom theme tabs (theme.components.tabs.variants.default.tabsLine).pages/database-analysis/.../AnalyticsPageHeader.tsx&.types.ts:childrensupport; keep optionalactions.styles.module.scssfor cluster details header; minor import removals.Written by Cursor Bugbot for commit 90eae6f. This will update automatically on new commits. Configure here.