Skip to content

bug: fix visibility of outdated banner and refactor - #1176

Merged
tarrow merged 8 commits into
mainfrom
T434193-2-pero-tarrow
Aug 26, 2026
Merged

bug: fix visibility of outdated banner and refactor#1176
tarrow merged 8 commits into
mainfrom
T434193-2-pero-tarrow

Conversation

@tarrow

@tarrow tarrow commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Only display the outdated banner on policies accessed via specific URL when appropriate.

Fixes a misunderstanding that the route contains enough information and instead uses the API response as the single source of truth.

This patch introduces extra requests when loading policy pages but is fine for now.

Fixes route ordering in route/index.js. A request will use the first route it matches. Therefore, the '/hosting-policy/:activeFrom' route must come after all other hosting policy routes otherwise the activeFrom parameter can be upcoming and pilot.

Simplify the policy renderers loading by removing computed properties and adding a watch on route changes. This also fixes the flashing of banners and temporarily displaying an incorrect banner on page load.

Removes the hard-coded path to component path mapping and dynamically imports the policy contents.

Bug: T434193
Bug: T434862

@github-actions

Copy link
Copy Markdown

Deployment previews on netlify for branch refs/pull/1176/merge will be at the following locations (when build is done):

…erenced by date

This patch introduces a PoC workaround to not use the route but the
active_from date to determine if the policy being rendered is
the current or upcoming one.

Bug: T434193
@tarrow
tarrow force-pushed the T434193-2-pero-tarrow branch from 4f1f5ac to 0975783 Compare August 25, 2026 13:36
- remove policyMetadata property of component
- replace with specific property for the policyActiveFrom date
- specifically catch and continue only on Axios 404s and rethrow other errors
@tarrow
tarrow marked this pull request as ready for review August 25, 2026 14:30
@outdooracorn outdooracorn changed the title bugfix: banner for versions of current and upcoming policies when referenced by date bugfix: fix visibility of outdated banner Aug 25, 2026
@outdooracorn outdooracorn changed the title bugfix: fix visibility of outdated banner bug: fix visibility of outdated banner Aug 25, 2026
A request will use the first route it matches. Therefore, the '/hosting-policy/:activeFrom' route must come after all other hosting policy routes otherwise the `activeFrom` parameter can be `upcoming` and `pilot`.
* Prevents `this.renderPage()` from being called multiple times on a single page load.
* Helps to simplify the logic and make this file easier to parse.
@outdooracorn outdooracorn changed the title bug: fix visibility of outdated banner bug: fix visibility of outdated banner and refactor Aug 26, 2026

@outdooracorn outdooracorn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works for me locally. Let's get this shipped. :shipit:

@tarrow
tarrow merged commit 05faf2c into main Aug 26, 2026
7 checks passed
@tarrow
tarrow deleted the T434193-2-pero-tarrow branch August 26, 2026 10:41
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.

2 participants