Skip to content

feat(webui/header): move tabs to right & add breadcrumb navigation #314

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 2 commits into from
Jun 4, 2025

Conversation

Jitmisra
Copy link
Contributor

@Jitmisra Jitmisra commented Jun 3, 2025

It closes #313.
I have redesigned the header-

Moved the tabs to the right side for better alignment and cleaner layout.

Added a breadcrumb below the header to display the current navigation path clearly and improve contextual awareness.

before
Monosnap Apache Kvrocks Controller 2025-05-31 22-44-55
after

Monosnap.screencast.2025-06-02.15-29-26.mp4

@PragmaTwice PragmaTwice changed the title Redesigned Header: Moved Tabs to Right & Added Breadcrumb Navigation feat(webui/header): move tabs to right & add breadcrumb navigation Jun 4, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.84%. Comparing base (6c56470) to head (d4933ce).
Report is 66 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #314      +/-   ##
============================================
+ Coverage     43.38%   46.84%   +3.45%     
============================================
  Files            37       45       +8     
  Lines          2971     4391    +1420     
============================================
+ Hits           1289     2057     +768     
- Misses         1544     2128     +584     
- Partials        138      206      +68     
Flag Coverage Δ
unittests 46.84% <ø> (+3.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@git-hulk git-hulk requested a review from Copilot June 4, 2025 02:57
Copy link

@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 redesigns the header by moving the tabs to the right and adding breadcrumb navigation for improved clarity and alignment. Key changes include:

  • Updating sidebar components by removing the shadow effect.
  • Enhancing the NavLinks button styling with a new scrolled prop.
  • Adding a new Breadcrumb component along with banner and layout updates.
  • Minor adjustments in footer image styling and global CSS transitions.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
webui/src/app/ui/sidebar.tsx Removed shadow classes from Paper components in sidebar
webui/src/app/ui/nav-links.tsx Revised inline styling for button with a new scrolled prop
webui/src/app/ui/footer.tsx Updated footer image style for improved appearance
webui/src/app/ui/breadcrumb.tsx Added new breadcrumb component to show navigation context
webui/src/app/ui/banner.tsx Integrated scroll-based adjustments for header behavior
webui/src/app/page.tsx Modified Image component props for header logo rendering
webui/src/app/layout.tsx Integrated Breadcrumb component into the main layout
webui/src/app/globals.css Adjusted transition properties and dark mode styles

Comment on lines +55 to +97
sx={{
textTransform: "none",
borderRadius: "20px",
paddingLeft: scrolled ? 2 : 2.5,
paddingRight: scrolled ? 2 : 2.5,
paddingTop: scrolled ? 0.6 : 0.8,
paddingBottom: scrolled ? 0.6 : 0.8,
fontSize: scrolled ? "0.875rem" : "0.9rem",
letterSpacing: "0.01em",
fontWeight: 500,
marginX: 0.5,
transition: "all 0.3s ease",
backgroundColor: isActive
? (theme) =>
theme.palette.mode === "dark"
? "rgba(255, 255, 255, 0.15)"
: "rgba(25, 118, 210, 0.08)"
: "transparent",
color: (theme) => {
if (theme.palette.mode === "dark") {
return isActive ? "#fff" : "rgba(255, 255, 255, 0.9)";
}
return isActive ? "#1976d2" : "rgba(0, 0, 0, 0.7)";
},
"&:hover": {
backgroundColor: (theme) =>
theme.palette.mode === "dark"
? "rgba(255, 255, 255, 0.2)"
: "rgba(25, 118, 210, 0.12)",
boxShadow: isActive
? (theme) =>
theme.palette.mode === "dark"
? "0 2px 8px rgba(0, 0, 0, 0.3)"
: "0 2px 8px rgba(25, 118, 210, 0.2)"
: "none",
},
boxShadow: isActive
? (theme) =>
theme.palette.mode === "dark"
? "0 2px 5px rgba(0, 0, 0, 0.2)"
: "0 2px 5px rgba(25, 118, 210, 0.15)"
: "none",
}}
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The inline style object for the Button is quite complex; consider extracting it into a separate variable or styled component to improve readability and maintainability.

Suggested change
sx={{
textTransform: "none",
borderRadius: "20px",
paddingLeft: scrolled ? 2 : 2.5,
paddingRight: scrolled ? 2 : 2.5,
paddingTop: scrolled ? 0.6 : 0.8,
paddingBottom: scrolled ? 0.6 : 0.8,
fontSize: scrolled ? "0.875rem" : "0.9rem",
letterSpacing: "0.01em",
fontWeight: 500,
marginX: 0.5,
transition: "all 0.3s ease",
backgroundColor: isActive
? (theme) =>
theme.palette.mode === "dark"
? "rgba(255, 255, 255, 0.15)"
: "rgba(25, 118, 210, 0.08)"
: "transparent",
color: (theme) => {
if (theme.palette.mode === "dark") {
return isActive ? "#fff" : "rgba(255, 255, 255, 0.9)";
}
return isActive ? "#1976d2" : "rgba(0, 0, 0, 0.7)";
},
"&:hover": {
backgroundColor: (theme) =>
theme.palette.mode === "dark"
? "rgba(255, 255, 255, 0.2)"
: "rgba(25, 118, 210, 0.12)",
boxShadow: isActive
? (theme) =>
theme.palette.mode === "dark"
? "0 2px 8px rgba(0, 0, 0, 0.3)"
: "0 2px 8px rgba(25, 118, 210, 0.2)"
: "none",
},
boxShadow: isActive
? (theme) =>
theme.palette.mode === "dark"
? "0 2px 5px rgba(0, 0, 0, 0.2)"
: "0 2px 5px rgba(25, 118, 210, 0.15)"
: "none",
}}
sx={getButtonStyles(scrolled, isActive)}

Copilot uses AI. Check for mistakes.

Comment on lines +144 to +145
{breadcrumbItems.map((item, index) => (
<Box key={index} className="flex items-center">
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

Using index as a key in a list render may lead to issues with component identity; consider using a unique identifier if available.

Suggested change
{breadcrumbItems.map((item, index) => (
<Box key={index} className="flex items-center">
{breadcrumbItems.map((item) => (
<Box key={item.name} className="flex items-center">

Copilot uses AI. Check for mistakes.

@@ -65,80 +67,179 @@ export default function Banner() {
document.getElementById("navbar")?.classList.add("navbar-dark-mode");
}

const handleScroll = () => {
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider debouncing the scroll event handler to reduce the frequency of state updates during fast scrolling, which could improve performance.

Copilot uses AI. Check for mistakes.

@PragmaTwice PragmaTwice merged commit 9ae1849 into apache:unstable Jun 4, 2025
4 checks passed
@Jitmisra Jitmisra deleted the header-redesign branch July 13, 2025 09:41
@Jitmisra Jitmisra restored the header-redesign branch July 13, 2025 09:42
@Jitmisra Jitmisra deleted the header-redesign branch July 13, 2025 09:44
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.

Redesigned Header – Moved Tabs to Right & Added Breadcrumb Navigation
3 participants