File tree 8 files changed +35
-51
lines changed
pages/ManagementSettingsPage
8 files changed +35
-51
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ export const FeatureStageBadge: FC<FeatureStageBadgeProps> = ({
41
41
{ ...delegatedProps }
42
42
>
43
43
< span style = { visuallyHidden } > (This is a</ span >
44
- { featureStageBadgeTypes [ contentType ] }
44
+ < span css = { styles . badgeLabel } >
45
+ { featureStageBadgeTypes [ contentType ] }
46
+ </ span >
45
47
< span style = { visuallyHidden } > feature)</ span >
46
48
</ span >
47
49
) }
@@ -99,6 +101,13 @@ const styles = {
99
101
backgroundColor : theme . branding . featureStage . hover . background ,
100
102
} ) ,
101
103
104
+ badgeLabel : {
105
+ // Have to set display mode to anything other than inline, or else the
106
+ // CSS capitalization algorithm won't capitalize the element
107
+ display : "inline-block" ,
108
+ textTransform : "capitalize" ,
109
+ } ,
110
+
102
111
badgeLargeText : {
103
112
fontSize : "1rem" ,
104
113
} ,
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ interface HeaderProps {
10
10
secondary ?: boolean ;
11
11
docsHref ?: string ;
12
12
tooltip ?: ReactNode ;
13
- badges ?: ReactNode ;
14
13
}
15
14
16
15
export const SettingsHeader : FC < HeaderProps > = ( {
@@ -19,38 +18,34 @@ export const SettingsHeader: FC<HeaderProps> = ({
19
18
docsHref,
20
19
secondary,
21
20
tooltip,
22
- badges,
23
21
} ) => {
24
22
const theme = useTheme ( ) ;
25
23
26
24
return (
27
25
< Stack alignItems = "baseline" direction = "row" justifyContent = "space-between" >
28
26
< div css = { { maxWidth : 420 , marginBottom : 24 } } >
29
- < Stack direction = "row" spacing = { 2 } alignItems = "center" >
30
- < Stack direction = "row" spacing = { 1 } alignItems = "center" >
31
- < h1
32
- css = { [
33
- {
34
- fontSize : 32 ,
35
- fontWeight : 700 ,
36
- display : "flex" ,
37
- alignItems : "baseline" ,
38
- lineHeight : "initial" ,
39
- margin : 0 ,
40
- marginBottom : 4 ,
41
- gap : 8 ,
42
- } ,
43
- secondary && {
44
- fontSize : 24 ,
45
- fontWeight : 500 ,
46
- } ,
47
- ] }
48
- >
49
- { title }
50
- </ h1 >
51
- { tooltip }
52
- </ Stack >
53
- { badges }
27
+ < Stack direction = "row" spacing = { 1 } alignItems = "center" >
28
+ < h1
29
+ css = { [
30
+ {
31
+ fontSize : 32 ,
32
+ fontWeight : 700 ,
33
+ display : "flex" ,
34
+ alignItems : "baseline" ,
35
+ lineHeight : "initial" ,
36
+ margin : 0 ,
37
+ marginBottom : 4 ,
38
+ gap : 8 ,
39
+ } ,
40
+ secondary && {
41
+ fontSize : 24 ,
42
+ fontWeight : 500 ,
43
+ } ,
44
+ ] }
45
+ >
46
+ { title }
47
+ </ h1 >
48
+ { tooltip }
54
49
</ Stack >
55
50
56
51
{ description && (
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { organizationPermissions } from "api/queries/organizations";
5
5
import { deleteOrganizationRole , organizationRoles } from "api/queries/roles" ;
6
6
import type { Role } from "api/typesGenerated" ;
7
7
import { DeleteDialog } from "components/Dialogs/DeleteDialog/DeleteDialog" ;
8
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
9
8
import { displayError , displaySuccess } from "components/GlobalSnackbar/utils" ;
10
9
import { Loader } from "components/Loader/Loader" ;
11
10
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
@@ -67,7 +66,6 @@ export const CustomRolesPage: FC = () => {
67
66
< SettingsHeader
68
67
title = "Custom Roles"
69
68
description = "Manage custom roles for this organization."
70
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
71
69
/>
72
70
{ permissions . assignOrgRole && isCustomRolesEnabled && (
73
71
< Button component = { RouterLink } startIcon = { < AddIcon /> } to = "create" >
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { groupsByOrganization } from "api/queries/groups";
5
5
import { organizationPermissions } from "api/queries/organizations" ;
6
6
import type { Organization } from "api/typesGenerated" ;
7
7
import { EmptyState } from "components/EmptyState/EmptyState" ;
8
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
9
8
import { displayError } from "components/GlobalSnackbar/utils" ;
10
9
import { Loader } from "components/Loader/Loader" ;
11
10
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
@@ -81,7 +80,6 @@ export const GroupsPage: FC = () => {
81
80
< SettingsHeader
82
81
title = "Groups"
83
82
description = "Manage groups for this organization."
84
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
85
83
/>
86
84
{ permissions . createGroup && feats . template_rbac && (
87
85
< Button component = { RouterLink } startIcon = { < GroupAdd /> } to = "create" >
Original file line number Diff line number Diff line change 7
7
} from "api/queries/organizations" ;
8
8
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
9
9
import { EmptyState } from "components/EmptyState/EmptyState" ;
10
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
11
10
import { Loader } from "components/Loader/Loader" ;
12
11
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
13
12
import { Stack } from "components/Stack/Stack" ;
@@ -84,7 +83,6 @@ export const IdpSyncPage: FC = () => {
84
83
title = "IdP Sync"
85
84
description = "Group and role sync mappings (configured using Coder CLI)."
86
85
tooltip = { < IdpSyncHelpTooltip /> }
87
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
88
86
/>
89
87
< Stack direction = "row" spacing = { 2 } >
90
88
< Button
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import type {
17
17
} from "api/typesGenerated" ;
18
18
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
19
19
import { AvatarData } from "components/AvatarData/AvatarData" ;
20
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
21
20
import { displayError , displaySuccess } from "components/GlobalSnackbar/utils" ;
22
21
import {
23
22
MoreMenu ,
@@ -61,11 +60,7 @@ export const OrganizationMembersPageView: FC<
61
60
> = ( props ) => {
62
61
return (
63
62
< div >
64
- < SettingsHeader
65
- title = "Members"
66
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
67
- />
68
-
63
+ < SettingsHeader title = "Members" />
69
64
< Stack >
70
65
{ Boolean ( props . error ) && < ErrorAlert error = { props . error } /> }
71
66
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import type {
6
6
ProvisionerKeyDaemons ,
7
7
} from "api/typesGenerated" ;
8
8
import { EmptyState } from "components/EmptyState/EmptyState" ;
9
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
10
9
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
11
10
import { Stack } from "components/Stack/Stack" ;
12
11
import { ProvisionerGroup } from "modules/provisioners/ProvisionerGroup" ;
@@ -39,10 +38,7 @@ export const OrganizationProvisionersPageView: FC<
39
38
direction = "row"
40
39
justifyContent = "space-between"
41
40
>
42
- < SettingsHeader
43
- title = "Provisioners"
44
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
45
- />
41
+ < SettingsHeader title = "Provisioners" />
46
42
< Button
47
43
endIcon = { < OpenInNewIcon /> }
48
44
target = "_blank"
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import type {
8
8
} from "api/typesGenerated" ;
9
9
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
10
10
import { DeleteDialog } from "components/Dialogs/DeleteDialog/DeleteDialog" ;
11
- import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
12
11
import {
13
12
FormFields ,
14
13
FormFooter ,
@@ -67,11 +66,7 @@ export const OrganizationSettingsPageView: FC<
67
66
68
67
return (
69
68
< div >
70
- < SettingsHeader
71
- title = "Settings"
72
- badges = { < FeatureStageBadge contentType = "beta" size = "lg" /> }
73
- />
74
-
69
+ < SettingsHeader title = "Settings" />
75
70
{ Boolean ( error ) && ! isApiValidationError ( error ) && (
76
71
< div css = { { marginBottom : 32 } } >
77
72
< ErrorAlert error = { error } />
You can’t perform that action at this time.
0 commit comments