Skip to content

🐛 Replace dev mode bar with small DEV badge in navbar#4167

Merged
clubanderson merged 1 commit intomainfrom
fix/dev-badge-navbar
Apr 1, 2026
Merged

🐛 Replace dev mode bar with small DEV badge in navbar#4167
clubanderson merged 1 commit intomainfrom
fix/dev-badge-navbar

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

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.

  • Removed the 20px bar from Layout.tsx
  • Removed devBarOffset layout shift calculations
  • Removed topOffset prop from Navbar
  • Added __DEV_MODE__ badge in Navbar between title and docs link

Fixes #4149

Test plan

  • Dev mode: small green "DEV" badge visible in navbar
  • Production mode: no badge shown
  • No layout shift — navbar stays at top:0

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>
Copilot AI review requested due to automatic review settings April 1, 2026 14:19
@clubanderson clubanderson merged commit 9311e67 into main Apr 1, 2026
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 1, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit a9e6ab9
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69cd29905a1abf00078e762b
😎 Deploy Preview https://deploy-preview-4167.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow bot deleted the fix/dev-badge-navbar branch April 1, 2026 14:20
@kubestellar-prow kubestellar-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 1, 2026
Copy link
Copy Markdown
Contributor

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

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 Layout and simplified banner stacking offsets.
  • Simplified Navbar API by removing topOffset and pinning it to the top.
  • Added a conditional “DEV” badge in Navbar when __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">
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
Comment on lines 82 to 93
<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
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +85 to +92
{__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>
)}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
clubanderson added a commit that referenced this pull request Apr 1, 2026
- 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>
clubanderson added a commit that referenced this pull request Apr 1, 2026
…#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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 1 code suggestion(s) and 2 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • web/src/components/layout/navbar/Navbar.tsx (line 51): <nav data-tour="navbar" className="fixed top-0 left-0 right-0 h-16 glass z-50 px...

Also address these general comments:

  • web/src/components/layout/navbar/Navbar.tsx (line 93): The PR description says the DEV badge appears “next to the app title” and “between title and docs link,” but the respons
  • web/src/components/layout/navbar/Navbar.tsx (line 92): The badge relies on title for meaning, which isn’t consistently announced by screen readers. Add an accessible name (e

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top green bar in dev mode has bad UI

3 participants