Skip to content

[SMT-66] [SMT-67] [SMT-68] Change header colours#2245

Open
ionwyn wants to merge 1 commit intomasterfrom
task/SMT-66/change-header-colours
Open

[SMT-66] [SMT-67] [SMT-68] Change header colours#2245
ionwyn wants to merge 1 commit intomasterfrom
task/SMT-66/change-header-colours

Conversation

@ionwyn
Copy link
Copy Markdown
Collaborator

@ionwyn ionwyn commented Apr 7, 2026

No description provided.

Copy link
Copy Markdown

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

Updates environment-specific colouring for the application header so non-production environments can be visually distinguished consistently.

Changes:

  • Add environment-specific background colours for #header-main in header.scss.
  • Apply the computed environmentClass to the outer #header container (using classnames) so the new CSS selectors take effect.

Reviewed changes

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

File Description
client/src/sass/header.scss Adds env-specific styling rules for #header-main background colour.
client/src/js/views/TopNav.jsx Adds classnames and applies environmentClass to the #header wrapper element.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 71 to 84
let environmentClass = '';
if (this.props.currentUser.environment === 'Development') {
environmentClass = 'env-dev';
} else if (this.props.currentUser.environment === 'Test') {
environmentClass = 'env-test';
} else if (this.props.currentUser.environment === 'Training') {
environmentClass = 'env-trn';
} else if (this.props.currentUser.environment === 'UAT') {
environmentClass = 'env-uat';
}

return (
<div id="header" className="sticky-top">
<div id="header" className={classNames('sticky-top', environmentClass)}>
<Navbar id="header-main">
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

Adding environmentClass to the outer #header means the Training environment (env-trn) will now style #header-main (via header.scss) but won’t style #top-nav (no .env-trn rules exist). This will produce mismatched colours between the main header and the nav in Training. Consider either mapping Training to env-uat (so existing #top-nav.env-uat styles apply) or adding corresponding .env-trn styles for #top-nav.

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +53
}

&.env-trn #header-main,
&.env-uat #header-main {
background-color: $nav-background-color-uat;
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

env-trn is grouped with env-uat for #header-main, but there are no corresponding #top-nav.env-trn styles (only env-test/dev/uat). As a result, Training will get UAT colouring for #header-main while #top-nav stays at the default colour. Either add &.env-trn rules under #top-nav (likely matching UAT), or remove env-trn from here and map Training to an existing environment class.

Copilot uses AI. Check for mistakes.
Comment on lines 39 to +41
}

#header {
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

There are now two separate #header { ... } blocks in this file (one for banner/working-indicator and one for env-specific #header-main background). Consider merging them into a single #header block to keep related header styling together and reduce the chance of future conflicting edits.

Suggested change
}
#header {

Copilot uses AI. Check for mistakes.
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.

3 participants