Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show environment banner on staging environments #2822

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulrobertlloyd
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd commented Jan 7, 2025

Styles and markup for an AppHostingEnvironmentComponent that renders a banner above the header on all staging environments, giving an environment’s name and assigned colour, default to staging/grey if this cannot be determined.

  • Largely inspired by what was used on Apply, meaning parts of this are likely incorrect; do we use HOSTING_ENVIRONMENT_NAME variable? If not, where can I get the named environment?
  • Do we also have an Heroku review environment that needs to be accounted for?
  • Does it need any tests?

Also deleted the custom styling for white tags as we don’t use that anymore.

Banners

Development banner.
Staging banner.
Test banner.
QA banner.
Preview banner.
Training banner.

@tvararu tvararu temporarily deployed to mavis-pr-2822 January 7, 2025 23:50 Inactive
@thomasleese thomasleese added this to the v1.4.0 milestone Jan 13, 2025
@thomasleese thomasleese force-pushed the environment-banner branch 6 times, most recently from 0fd22dd to 0e55959 Compare January 15, 2025 16:01
@thomasleese thomasleese added the ✨ feature New functionality label Jan 15, 2025
@paulrobertlloyd paulrobertlloyd marked this pull request as ready for review January 15, 2025 16:05
@paulrobertlloyd
Copy link
Contributor Author

Thanks for the spruce-up @thomasleese!

end

def environment
ENV.fetch("SENTRY_ENVIRONMENT", "development")
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is the only place we're using this environment variable (other than Sentry itself) I thought it was okay to use it here, but if we start needing this in more places I suggest we have a HOSTING_ENVIRONMENT variable and configure Sentry to use that instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants