Conversation
This commit introduces the HostingPolicyRenderer component which calls the Platform API to render the hosting-policy routes looking like /hosting-policy/:activeFrom It follows a similar pattern to the TermsOfUseRenderer but doesn't include a navigation component since we do not have multiple versions to consider yet. It also introduces a stub hosting policy content for viewing on staging. This won't be visible on production because there is not a corresponding Policy object in the production DB This commit also adjusts the TermsOfUseRenderer to determine the vue component to load using the content_vue_file key from the API response rather than by trying to determine it from the active_from date. Bug: T432340
|
Deployment previews on netlify for branch
|
dati18
reviewed
Jul 22, 2026
| <v-main> | ||
| <v-container class="fill-height" fluid> | ||
| <v-row justify="center"> | ||
| <v-col cols="11" md="4" order-md="last"> |
Contributor
There was a problem hiding this comment.
should you put PolicyNavigationPanel here?
| this.policy = versions[metadata.content_vue_file] | ||
| } catch (error) { | ||
| console.error(error) | ||
| alert('Failed to load policy.') |
Contributor
There was a problem hiding this comment.
The error message is very generic, and alert() is a poor UX for a Vue/Vuetify app. Should we use snackbar like other components?
| const response = await this.$api.policyByDate({ policyType, activeFrom }) | ||
|
|
||
| const metadata = await response.metadata | ||
| this.policy = versions[metadata.content_vue_file] |
Contributor
There was a problem hiding this comment.
I'm wondering if content_vue_file is empty, then this.policy becomes undefined and the UI will silently render nothing. Should we throw or show an error when key is unknown?
| this.policy = versions[metadata.content_vue_file] | ||
| } catch (error) { | ||
| console.error(error) | ||
| alert('Failed to load policy.') |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit introduces the HostingPolicyRenderer component which calls the Platform API to render the hosting-policy routes looking like /hosting-policy/:activeFrom
It follows a similar pattern to the TermsOfUseRenderer but doesn't include a navigation component since we do not have multiple versions to consider yet.
It also introduces a stub hosting policy content for viewing on staging. This won't be visible on production because there is not a corresponding Policy object in the production DB
This commit also adjusts the TermsOfUseRenderer to determine the vue component to load using the content_vue_file key from the API response rather than by trying to determine it from the active_from date.
Bug: T432340