Skip to content

Render alpha notice on routes and endpoints #642

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

Merged
merged 12 commits into from
Jun 11, 2025

Conversation

razor-x
Copy link
Member

@razor-x razor-x commented Jun 11, 2025

  • Add alpha notice
  • Test alpha message

Copy link
Member

@DebbieAtSeam DebbieAtSeam left a comment

Choose a reason for hiding this comment

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

Also, I was just about to comment on the extra blank line, but then you beat me to fixing in!

@@ -0,0 +1,3 @@
{% hint style="info" %}
**Alpha**. {{alphaMessage}}
Copy link
Member

Choose a reason for hiding this comment

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

@razor-x Using "alpha" implies that there's a specific meaning and that there's likely to be a "beta" later. Do we want to assume that we will add functionality for an analogous "beta" tag later on, or do we want to go with something more generic like "preview" or, perhaps better, "prerelease"?

Copy link
Member Author

Choose a reason for hiding this comment

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

@DebbieAtSeam I removed the "Alpha" prefix. We can just use alpha as the property for now, and put whatever we want in the message.

Copy link
Member

Choose a reason for hiding this comment

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

OK

@@ -7,6 +7,7 @@ export const PathMetadataSchema = z.record(
resources: z.array(z.string()).default([]),
description: z.string().trim().min(1).optional(),
overview: z.string().trim().min(1).optional(),
alpha: z.string().trim().min(1).optional(),
Copy link
Member

Choose a reason for hiding this comment

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

If we only need one label, let's use preview or early_access. Then, please see my other suggestions.

Suggested change
alpha: z.string().trim().min(1).optional(),
early_access: z.string().trim().min(1).optional(),

Comment on lines +2 to +4
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
{{#if isEarlyAccess}}
{{> early-access-notice}}
{{/if}}

@@ -62,6 +62,7 @@
/thermostats:
title: Thermostats
resources: []
alpha: 'This API is in Alpha, please give us feedback.'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
alpha: 'This API is in Alpha, please give us feedback.'
early_access: '**Alpha**. This API is in Alpha, please give us feedback.'

Comment on lines +6 to +8
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
{{#if isEarlyAccess}}
{{> early-access-notice}}
{{/if}}

Comment on lines +2 to +4
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{{#if isAlpha}}
{{> alpha-notice}}
{{/if}}
{{#if isEarlyAccess}}
{{> early-access-notice}}
{{/if}}

Comment on lines +116 to +117
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
file.isEarlyAccess = (metadata.early_access ?? '').length > 0
file.earlyAccessMessage = metadata.early_access

Copy link
Member

Choose a reason for hiding this comment

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

or is the metadata tag supposed to be earlyAccess, not early_access?

Comment on lines +9 to +10
isAlpha: boolean
alphaMessage: string | undefined
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
isAlpha: boolean
alphaMessage: string | undefined
isEarlyAccess: boolean
earlyAccessMessage: string | undefined

Comment on lines +32 to +33
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
file.isEarlyAccess = (metadata.early_access ?? '').length > 0
file.earlyAccessMessage = metadata.early_access

Comment on lines +20 to +21
isAlpha: boolean
alphaMessage: string | undefined
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
isAlpha: boolean
alphaMessage: string | undefined
isEarlyAccess: boolean
earlyAccessMessage: string | undefined

Comment on lines +97 to +98
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
file.isAlpha = (metadata.alpha ?? '').length > 0
file.alphaMessage = metadata.alpha
file.isEarlyAccess = (metadata.early_access ?? '').length > 0
file.earlyAccessMessage = metadata.early_access

@razor-x razor-x marked this pull request as ready for review June 11, 2025 19:12
@razor-x razor-x requested a review from a team as a code owner June 11, 2025 19:12
@razor-x razor-x merged commit 10d316f into main Jun 11, 2025
12 checks passed
@razor-x razor-x deleted the evan/cx-365-render-alpha-status-for-routes-or-namespaces branch June 11, 2025 19:12
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.

3 participants