Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 18, 2025

This PR implements a new feature flag STAGING_ELASTIC_NAV that allows the edge environment to use the staging elastic navigation script from https://stag-www.elastic.co/elastic-nav.js instead of the production script at https://www.elastic.co/elastic-nav.js.

Changes

Added StagingElasticNavEnabled Feature Flag

  • New property in FeatureFlags.cs that maps to the staging-elastic-nav key
  • Follows the same pattern as existing feature flags with getter/setter support

Modified Header Template Logic

  • Updated _Header.cshtml to conditionally select the elastic nav script URL based on the feature flag
  • When StagingElasticNavEnabled is true: uses https://stag-www.elastic.co/elastic-nav.js
  • When false or unset: uses https://www.elastic.co/elastic-nav.js (existing behavior)

Environment Configuration

  • Enabled STAGING_ELASTIC_NAV: true only in the edge environment in assembler.yml
  • All other environments (prod, staging, dev) remain unchanged and continue using the production navigation

Environment Behavior

Environment Feature Flag Script URL
edge STAGING_ELASTIC_NAV: true https://stag-www.elastic.co/elastic-nav.js
prod Not set (false) https://www.elastic.co/elastic-nav.js
staging Not set (false) https://www.elastic.co/elastic-nav.js
dev Not set (false) https://www.elastic.co/elastic-nav.js

This change allows the web team to test the new elastic navigation from their staging environment in the edge docs build while keeping all other environments stable and using the production navigation.

Fixes #1907.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: reakaleek <16325797+reakaleek@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Staging elasitc nav feature flag. Add staging elastic nav feature flag for edge environment Sep 18, 2025
Copilot finished work on behalf of reakaleek September 18, 2025 10:45
@Copilot Copilot AI requested a review from reakaleek September 18, 2025 10:45
@reakaleek reakaleek marked this pull request as ready for review September 18, 2025 10:48
@reakaleek reakaleek requested review from a team as code owners September 18, 2025 10:48
@reakaleek reakaleek self-requested a review September 18, 2025 10:48
Co-authored-by: reakaleek <16325797+reakaleek@users.noreply.github.com>
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

LGTM

@Copilot Copilot AI requested a review from reakaleek September 18, 2025 10:50
Copilot finished work on behalf of reakaleek September 18, 2025 10:50
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

LGTM

@reakaleek reakaleek merged commit 72314a0 into main Sep 19, 2025
26 checks passed
@reakaleek reakaleek deleted the copilot/fix-1907 branch September 19, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Staging elasitc nav feature flag.
2 participants