Skip to content

Commit

Permalink
chore: add APIX badge support for alpha endpoints (#1189)
Browse files Browse the repository at this point in the history
Tooltip, text color, and tests are updated for alpha endpoints

- also removed forced CalVer in release-please-config.json

APIX end to end tests are failing but that's not caused by anything I changed
  • Loading branch information
jkaster authored Oct 14, 2022
1 parent 2e6e19e commit 7ee39bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { pickTooltipContent } from './utils'
describe('DocMethodSummary utils', () => {
test.each`
status | expected
${'alpha'} | ${'This alpha item is either for internal use, or not fully developed and may be significantly changed or completely removed in future releases.'}
${'beta'} | ${'This beta item is under development and subject to change.'}
${'experimental'} | ${'This experimental item is not fully developed and may be significantly changed or completely removed in future releases.'}
${'deprecated'} | ${'This item has been deprecated and will be removed in the future.'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export const pickStatus = (status: string) => {
*/
export const pickTooltipContent = (status: string) => {
switch (status.toLowerCase()) {
case 'alpha':
return 'This alpha item is either for internal use, or not fully developed and may be significantly changed or completely removed in future releases.'
case 'beta':
return 'This beta item is under development and subject to change.'
case 'experimental':
Expand Down
2 changes: 2 additions & 0 deletions packages/run-it/src/components/MethodBadge/MethodBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import styled, { css } from 'styled-components'
* Status of endpoint method.
*/
type MethodStatus =
| 'alpha'
| 'beta'
| 'stable'
| 'experimental'
Expand Down Expand Up @@ -70,6 +71,7 @@ type ApixIntentNames =

export const pickBadgeIntent = (type: HttpMethod | MethodStatus | string) => {
switch (type) {
case 'alpha':
case 'DELETE':
case 'deprecated':
return 'critical'
Expand Down
1 change: 0 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
],
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"release-as": "22.16.0",
"packages": {
".": {
"release-as": ""
Expand Down

0 comments on commit 7ee39bb

Please sign in to comment.