Skip to content

32251 Updated banner styling#862

Merged
severinbeauvais merged 2 commits intobcgov:mainfrom
severinbeauvais:32251
Jan 29, 2026
Merged

32251 Updated banner styling#862
severinbeauvais merged 2 commits intobcgov:mainfrom
severinbeauvais:32251

Conversation

@severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#32251

Description of changes:

  • app version = 5.8.9
  • updated banner styling

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).

- updated banner styling
Copy link

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 the top-of-app alert banner presentation to match new styling requirements and bumps the UI version.

Changes:

  • Reworks the App-level banner markup to include a custom icon + container layout.
  • Adds new SCSS rules targeting the banner element and removes the prior generic v-alert wrapper styling.
  • Increments the app version to 5.8.9.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/src/App.vue Updates banner structure and adds new banner-specific styling.
app/package.json Bumps application version to 5.8.9.

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

app/src/App.vue Outdated
mdi-information
</v-icon>

<span
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

bannerText comes from a LaunchDarkly feature flag and is injected as raw HTML. Wrapping it in a <span> constrains the injected markup to inline-only content; if the flag ever includes block-level tags (eg <p>, <div>, <ul>), this will produce invalid HTML and browsers will reflow/reparent nodes in unpredictable ways. Consider using a block element (eg <div>) for the v-html target, or explicitly restricting/sanitizing the flag content to inline markup only.

Suggested change
<span
<div

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current implementation is consistent across UIs. No change recommended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed my mind and updated the other UIs. CP is right -- div is more flexible, and due to the use of flexbox, is correctly aligned, etc.

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

bcregistry-sre commented Jan 29, 2026

}
}

#alert-banner {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer this be a class over depending on ID for any new styles. Can we do that ?

ID has higher specificity and and when overriding styles with IDs we need to use !important. If we are overriding classes, then it works as you would expect, last class applied wins.

Copy link
Collaborator Author

@severinbeauvais severinbeauvais Jan 29, 2026

Choose a reason for hiding this comment

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

The built-in styles are pretty specific for alerts so I would have needed to concatenate several classes to target this exact component (and use !important).

So I used id instead of class to not risk setting styles for other alert components. Only this component needs these styles.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, I wont argue against it this time, but lets have it for the future. As this will compound the need for !important. And now we will need specifically all the styles to target this ID with !important to be able to override e.g. the color of dark-gray-links inside alert.

Thanks

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://namerequest-dev--pr-862-60styfc2.web.app

@severinbeauvais severinbeauvais merged commit 890fc57 into bcgov:main Jan 29, 2026
8 checks passed
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