Skip to content

Commit 282d988

Browse files
committed
add tooltips to instance oidc and managers
1 parent 77523a9 commit 282d988

File tree

6 files changed

+70
-42
lines changed

6 files changed

+70
-42
lines changed

www/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@nivo/geo": "0.83.0",
4545
"@nivo/line": "0.83.0",
4646
"@octokit/core": "4.2.1",
47-
"@pluralsh/design-system": "3.74.3",
47+
"@pluralsh/design-system": "3.74.4",
4848
"@react-spring/web": "9.7.3",
4949
"@stripe/react-stripe-js": "2.1.0",
5050
"@stripe/stripe-js": "1.54.0",

www/src/App.tsx

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ import {
1515
} from '@pluralsh/design-system'
1616
import { MarkdocContextProvider } from '@pluralsh/design-system/dist/markdoc'
1717
import { CssBaseline, ThemeProvider, mergeTheme } from 'honorable'
18-
import styled, { ThemeProvider as StyledThemeProvider } from 'styled-components'
18+
import styled, {
19+
StyleSheetManager,
20+
ThemeProvider as StyledThemeProvider,
21+
} from 'styled-components'
1922
import { mergeDeep } from '@apollo/client/utilities'
2023
import mpRecipe from 'honorable-recipe-mp'
2124
import { GrowthBook, GrowthBookProvider } from '@growthbook/growthbook-react'
2225

26+
import { shouldForwardProp } from './utils/shouldForwardProp'
27+
2328
import { PluralErrorBoundary } from './components/utils/PluralErrorBoundary'
2429

2530
import { client } from './helpers/client'
@@ -172,31 +177,35 @@ function App() {
172177
<ApolloProvider client={client}>
173178
<IntercomProvider appId={INTERCOM_APP_ID}>
174179
<ThemeProvider theme={honorableTheme}>
175-
<StyledThemeProvider theme={mergedStyledTheme}>
176-
<GrowthBookProvider growthbook={growthbook as any as GrowthBook}>
177-
<CursorPositionProvider>
178-
<MarkdocContextProvider value={{ variant: 'console' }}>
179-
<NavContextProvider>
180-
<OverlayContextProvider>
181-
<BreadcrumbsProvider>
182-
<CssBaseline />
183-
<GlobalStyle />
184-
<Grommet
185-
full
186-
theme={mergedStyledTheme as any as ThemeType}
187-
themeMode="dark"
188-
>
189-
<PluralErrorBoundary>
190-
<RootBoxSC>{routes}</RootBoxSC>
191-
</PluralErrorBoundary>
192-
</Grommet>
193-
</BreadcrumbsProvider>
194-
</OverlayContextProvider>
195-
</NavContextProvider>
196-
</MarkdocContextProvider>
197-
</CursorPositionProvider>
198-
</GrowthBookProvider>
199-
</StyledThemeProvider>
180+
<StyleSheetManager shouldForwardProp={shouldForwardProp}>
181+
<StyledThemeProvider theme={mergedStyledTheme}>
182+
<GrowthBookProvider
183+
growthbook={growthbook as any as GrowthBook}
184+
>
185+
<CursorPositionProvider>
186+
<MarkdocContextProvider value={{ variant: 'console' }}>
187+
<NavContextProvider>
188+
<OverlayContextProvider>
189+
<BreadcrumbsProvider>
190+
<CssBaseline />
191+
<GlobalStyle />
192+
<Grommet
193+
full
194+
theme={mergedStyledTheme as any as ThemeType}
195+
themeMode="dark"
196+
>
197+
<PluralErrorBoundary>
198+
<RootBoxSC>{routes}</RootBoxSC>
199+
</PluralErrorBoundary>
200+
</Grommet>
201+
</BreadcrumbsProvider>
202+
</OverlayContextProvider>
203+
</NavContextProvider>
204+
</MarkdocContextProvider>
205+
</CursorPositionProvider>
206+
</GrowthBookProvider>
207+
</StyledThemeProvider>
208+
</StyleSheetManager>
200209
</ThemeProvider>
201210
</IntercomProvider>
202211
</ApolloProvider>

www/src/components/overview/clusters/plural-cloud/CloudInstanceTableCols.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
ConsoleIcon,
66
Flex,
77
ListBoxItem,
8+
Tooltip,
89
} from '@pluralsh/design-system'
910
import { createColumnHelper } from '@tanstack/react-table'
1011
import { ProviderIcon } from 'components/utils/ProviderIcon'
@@ -194,18 +195,19 @@ const ColActions = columnHelper.accessor((instance) => instance, {
194195
<ListBoxItem
195196
key={MenuItemKey.EditSize}
196197
label="Edit instance size"
197-
textValue="Edit instance size"
198198
/>
199199
<ListBoxItem
200200
key={MenuItemKey.EditOidc}
201-
label="Edit cluster managers"
202-
textValue="Edit cluster managers"
201+
label={
202+
<Tooltip label="Allow other team members to reconfigure this console instance">
203+
<span>Edit cluster managers</span>
204+
</Tooltip>
205+
}
203206
/>
204207
<ListBoxItem
205208
key={MenuItemKey.Delete}
206209
destructive
207210
label="Delete instance"
208-
textValue="Delete instance"
209211
/>
210212
</MoreMenu>
211213
{/* Modals */}

www/src/components/overview/clusters/plural-cloud/ConsoleInstanceOIDC.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
FormField,
77
Modal,
88
Spinner,
9+
Tooltip,
910
} from '@pluralsh/design-system'
1011
import {
1112
BindingInput,
@@ -42,7 +43,7 @@ export function ConsoleInstanceOIDC({
4243
fallback={
4344
<Spinner
4445
size={24}
45-
css={{ width: '100%' }}
46+
css={{ minWidth: '70px' }}
4647
/>
4748
}
4849
>
@@ -51,12 +52,17 @@ export function ConsoleInstanceOIDC({
5152
renderIndicators={false}
5253
>
5354
<>
54-
<Button
55-
secondary
56-
onClick={() => setOpen(true)}
55+
<Tooltip
56+
placement="top"
57+
label="Enable login for your team members for this console instance"
5758
>
58-
OIDC
59-
</Button>
59+
<Button
60+
secondary
61+
onClick={() => setOpen(true)}
62+
>
63+
OIDC
64+
</Button>
65+
</Tooltip>
6066
<Modal
6167
onOpenAutoFocus={(e) => e.preventDefault()}
6268
open={open}

www/src/utils/shouldForwardProp.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import isPropValid from '@emotion/is-prop-valid'
2+
3+
// context: https://styled-components.com/docs/faqs#shouldforwardprop-is-no-longer-provided-by-default
4+
// there are very few cases of this between the DS and app, but this'll catch any remaining that are missed
5+
export function shouldForwardProp(propName, target) {
6+
if (typeof target === 'string') {
7+
return isPropValid(propName)
8+
}
9+
10+
return true
11+
}

www/yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4025,9 +4025,9 @@ __metadata:
40254025
languageName: node
40264026
linkType: hard
40274027

4028-
"@pluralsh/design-system@npm:3.74.3":
4029-
version: 3.74.3
4030-
resolution: "@pluralsh/design-system@npm:3.74.3"
4028+
"@pluralsh/design-system@npm:3.74.4":
4029+
version: 3.74.4
4030+
resolution: "@pluralsh/design-system@npm:3.74.4"
40314031
dependencies:
40324032
"@floating-ui/react-dom-interactions": 0.13.3
40334033
"@loomhq/loom-embed": 1.5.0
@@ -4073,7 +4073,7 @@ __metadata:
40734073
react-dom: ">=18.3.1"
40744074
react-transition-group: ">=4.4.5"
40754075
styled-components: ">=6.1.13"
4076-
checksum: 8d9246768e5f2cb42011aff03b4e54d25d0eb9962f084e849219502567a491d2f051dd7cd8869ac4dc4531f9956cb7e0daf767f42bd4843797d68523733a937d
4076+
checksum: b50d9b7f2fda9e769911de1895ed83318771e7fae74fb6c4c3ce8ca88562f4890d4859e806af1bf8fc3175841ca1639e7b64376d1e6d7966d980a8c2e5fcd01a
40774077
languageName: node
40784078
linkType: hard
40794079

@@ -20092,7 +20092,7 @@ __metadata:
2009220092
"@nivo/geo": 0.83.0
2009320093
"@nivo/line": 0.83.0
2009420094
"@octokit/core": 4.2.1
20095-
"@pluralsh/design-system": 3.74.3
20095+
"@pluralsh/design-system": 3.74.4
2009620096
"@pluralsh/eslint-config-typescript": 2.5.150
2009720097
"@pluralsh/stylelint-config": 2.0.10
2009820098
"@react-spring/web": 9.7.3

0 commit comments

Comments
 (0)