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

issue 1650 add advisory message bar for staging environment #1665

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

Conversation

horatiorosa
Copy link
Contributor

Summary

Advisory message bar for staging environment

  • add advisory message component and template
  • added advisory message bar to application template
  • updated client environment with getFeatureFlagShowSandboxWarning function setting FEATURE_FLAG_SHOW_SANDBOX_WARNING env var

Tasks/Bug Numbers

@horatiorosa horatiorosa self-assigned this Mar 4, 2025
@horatiorosa horatiorosa requested a review from a team as a code owner March 4, 2025 18:42
Copy link

netlify bot commented Mar 4, 2025

Deploy Preview for labs-zap failed.

Name Link
🔨 Latest commit e229823
🔍 Latest deploy log https://app.netlify.com/sites/labs-zap/deploys/67c8c74e000fac00088d5b2a

@horatiorosa horatiorosa force-pushed the issue/1650-advisory-banner-for-staging-environment branch 6 times, most recently from 23f9d0a to 53ccc93 Compare March 5, 2025 16:53
@@ -11,7 +11,6 @@ export default class ApplicationAdapter extends JSONAPIAdapter {
session;

get headers() {
console.log(this.session);
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it seemed unnecessary to have the session printing to the console. I was thinking this was probably left after some some debugging.

showSandboxWarningOn = ENV.featureFlagShowSandboxWarning;

// @argument
message = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe make this an empty string if you need a default value? That way you aren't mixing bools and strings on the same property.

@@ -0,0 +1,5 @@
<div class="advisory-message">
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe check if this.message is truthy and conditionally render the div based on that? That way we never accidentally render an empty bar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we would accidentally render an empty div as there is a check in the application template looking for the truthy value of the feature flag.

Were you thinking of something like:

{{#if this.message}}
  <div class="advisory-message">
  // ... code

 - add advisory message component and template
 - added advisory message bar to application template
 - updated client environment with getFeatureFlagShowSandboxWarning function setting FEATURE_FLAG_SHOW_SANDBOX_WARNING env var
 - added application controller to access env vars in application template
@horatiorosa horatiorosa force-pushed the issue/1650-advisory-banner-for-staging-environment branch from 53ccc93 to e229823 Compare March 5, 2025 21:51
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.

Create a banner for ZAP Search staging environment to indicate they are meant for testing
3 participants