Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

What is the goal of this PR and why is this important?

Visual distinction between staging and production environments via navbar color. Staging shows red (bg-red-600), all other environments show blue (bg-primary).

How did you approach the change?

Added two helper methods in ApplicationHelper:

def staging_environment?
  ENV["RAILS_ENV"] == "staging" || Rails.env == "staging"
end

def navbar_bg_class
  staging_environment? ? "bg-red-600" : "bg-primary"
end

Replaced hardcoded bg-primary with <%= navbar_bg_class %> in:

  • app/views/shared/_navbar.html.erb
  • app/views/layouts/application.html.erb

Added test coverage for helper methods and view rendering in staging vs non-staging contexts.

Anything else to add?

Checks both ENV["RAILS_ENV"] and Rails.env to handle different deployment configurations.

Original prompt

make a pr for conditionally changing the navbar color to red when in staging (maybe based on ENV var?)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 19, 2026 23:44
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copilot AI changed the title [WIP] Add conditional navbar color change for staging environment Add red navbar background for staging environment Jan 19, 2026
Copilot AI requested a review from maebeale January 19, 2026 23:49
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.

2 participants