🐛 Replace dev mode bar with small DEV badge in navbar#4167
Conversation
The full-width green bar was too intrusive. Replaced with a small green "DEV" badge pill next to the app title in the navbar. Removed the devBarOffset layout shift logic since the bar no longer exists. Fixes #4149 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Replaces the full-width development-mode bar with a small “DEV” badge in the navbar, removing related layout offset calculations.
Changes:
- Removed the dev-mode top bar from
Layoutand simplified banner stacking offsets. - Simplified
NavbarAPI by removingtopOffsetand pinning it to the top. - Added a conditional “DEV” badge in
Navbarwhen__DEV_MODE__is enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| web/src/components/layout/navbar/Navbar.tsx | Removes topOffset positioning and adds a conditional DEV badge in the left navbar cluster. |
| web/src/components/layout/Layout.tsx | Removes dev bar rendering and offset math; updates padding/banner top calculations accordingly. |
|
|
||
| return ( | ||
| <nav data-tour="navbar" style={{ top: topOffset }} className="fixed left-0 right-0 h-16 glass z-50 px-3 md:px-6 flex items-center justify-between"> | ||
| <nav data-tour="navbar" style={{ top: 0 }} className="fixed left-0 right-0 h-16 glass z-50 px-3 md:px-6 flex items-center justify-between"> |
There was a problem hiding this comment.
Inline style={{ top: 0 }} is redundant here and recreates a new object every render. Prefer using Tailwind (top-0) and removing the inline style prop to keep positioning in CSS and reduce avoidable render churn.
| <nav data-tour="navbar" style={{ top: 0 }} className="fixed left-0 right-0 h-16 glass z-50 px-3 md:px-6 flex items-center justify-between"> | |
| <nav data-tour="navbar" className="fixed top-0 left-0 right-0 h-16 glass z-50 px-3 md:px-6 flex items-center justify-between"> |
| <span className="text-base md:text-lg font-semibold text-foreground">{branding.appName}</span> | ||
| <span className="text-[10px] text-muted-foreground tracking-wide">{branding.tagline}</span> | ||
| </button> | ||
| {__DEV_MODE__ && ( | ||
| <span | ||
| className="hidden sm:inline-flex items-center justify-center px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider bg-green-500/20 text-green-400 border border-green-500/30 rounded-full" | ||
| title="Development mode" | ||
| > | ||
| DEV | ||
| </span> | ||
| )} | ||
| <a |
There was a problem hiding this comment.
The PR description says the DEV badge appears “next to the app title” and “between title and docs link,” but the responsive visibility doesn’t line up: the title is hidden lg:flex while the badge is hidden sm:inline-flex and the docs link is hidden lg:flex. On sm/md, the badge can appear without the title and without the docs link. Consider aligning breakpoints (e.g., show the badge at lg+ only, or make the title visible at the same breakpoint as the badge) so behavior matches the stated intent.
| {__DEV_MODE__ && ( | ||
| <span | ||
| className="hidden sm:inline-flex items-center justify-center px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider bg-green-500/20 text-green-400 border border-green-500/30 rounded-full" | ||
| title="Development mode" | ||
| > | ||
| DEV | ||
| </span> | ||
| )} |
There was a problem hiding this comment.
The badge relies on title for meaning, which isn’t consistently announced by screen readers. Add an accessible name (e.g., aria-label=\"Development mode\") and/or include screen-reader-only text so the dev indicator is conveyed non-visually.
- Navbar: Remove redundant inline style={{ top: 0 }}, use Tailwind
top-0 class instead (#4167)
- DEV badge: Add aria-label + role="status", match lg: breakpoint
with title visibility (#4167)
- FeedbackModal: Use refs for dirty check in handleClose to prevent
keydown listener churn on every keystroke (#4161)
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…#4171) - Navbar: Remove redundant inline style={{ top: 0 }}, use Tailwind top-0 class instead (#4167) - DEV badge: Add aria-label + role="status", match lg: breakpoint with title visibility (#4167) - FeedbackModal: Use refs for dirty check in handleClose to prevent keydown listener churn on every keystroke (#4161) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
🔄 Auto-Applying Copilot Code ReviewCopilot code review found 1 code suggestion(s) and 2 general comment(s). @copilot Please apply all of the following code review suggestions:
Also address these general comments:
Push all fixes in a single commit. Run Auto-generated by copilot-review-apply workflow. |
Summary
Replaces the full-width green "Development Mode" bar with a small green "DEV" badge pill in the navbar, next to the app title. Much less intrusive.
devBarOffsetlayout shift calculationstopOffsetprop from Navbar__DEV_MODE__badge in Navbar between title and docs linkFixes #4149
Test plan