-
Notifications
You must be signed in to change notification settings - Fork 366
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
upcoming: [M3-8751& M3-8610] - Image Service Gen 2 final GA tweaks #11115
Changes from 7 commits
244a7c6
6728794
28c201f
7142a03
cf8713d
5d13abe
f64cf60
05615e8
e170851
fa4f886
cf8911c
e96abeb
051d09a
81b9a72
dc5f1f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Image Service Gen 2 final GA tweaks ([#11115](https://github.com/linode/manager/pull/11115)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
|
||
import CloudInitIcon from 'src/assets/icons/cloud-init.svg'; | ||
import { Hidden } from 'src/components/Hidden'; | ||
import { LinkButton } from 'src/components/LinkButton'; | ||
import { Stack } from 'src/components/Stack'; | ||
import { TableCell } from 'src/components/TableCell'; | ||
import { TableRow } from 'src/components/TableRow'; | ||
import { Tooltip } from 'src/components/Tooltip'; | ||
import { Typography } from 'src/components/Typography'; | ||
import { useFlags } from 'src/hooks/useFlags'; | ||
import { useProfile } from 'src/queries/profile/profile'; | ||
import { capitalizeAllWords } from 'src/utilities/capitalize'; | ||
import { formatDate } from 'src/utilities/formatDate'; | ||
|
@@ -44,6 +48,7 @@ export const ImageRow = (props: Props) => { | |
} = image; | ||
|
||
const { data: profile } = useProfile(); | ||
const flags = useFlags(); | ||
|
||
const isFailed = status === 'pending_upload' && event?.status === 'failed'; | ||
|
||
|
@@ -92,23 +97,47 @@ export const ImageRow = (props: Props) => { | |
|
||
return ( | ||
<TableRow data-qa-image-cell={id} key={id}> | ||
<TableCell data-qa-image-label>{label}</TableCell> | ||
<TableCell data-qa-image-label noWrap> | ||
{capabilities.includes('cloud-init') && | ||
flags.imageServiceGen2 && | ||
flags.imageServiceGen2Ga ? ( | ||
<Stack | ||
alignItems="center" | ||
direction="row" | ||
gap={1} | ||
justifyContent="space-between" | ||
> | ||
{label} | ||
<Tooltip title="This image is compatible with cloud-init."> | ||
<div style={{ display: 'flex' }}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't because we don't forward ref on our Box or Stack, which I believe is needed for the tooltip to work. I could throw a forward ref but I'm hoping React 19 will make that not necessary π There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yeah... annoying but makes sense π |
||
<CloudInitIcon /> | ||
</div> | ||
</Tooltip> | ||
</Stack> | ||
) : ( | ||
label | ||
)} | ||
</TableCell> | ||
<Hidden smDown> | ||
<TableCell>{getStatusForImage(status)}</TableCell> | ||
</Hidden> | ||
{multiRegionsEnabled && ( | ||
<> | ||
<Hidden smDown> | ||
<TableCell> | ||
<Hidden smDown> | ||
<TableCell> | ||
{regions.length > 0 ? ( | ||
<LinkButton onClick={() => handlers.onManageRegions?.(image)}> | ||
{pluralize('Region', 'Regions', regions.length)} | ||
</LinkButton> | ||
</TableCell> | ||
</Hidden> | ||
<Hidden smDown> | ||
<TableCell>{compatibilitiesList}</TableCell> | ||
</Hidden> | ||
</> | ||
) : ( | ||
'N/A' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be the default copy? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, that explains it well. Was just thinking N/A may not be very clear to the user in case this happens. Not a big deal |
||
)} | ||
</TableCell> | ||
</Hidden> | ||
)} | ||
{multiRegionsEnabled && !flags.imageServiceGen2Ga && ( | ||
<Hidden smDown> | ||
<TableCell>{compatibilitiesList}</TableCell> | ||
</Hidden> | ||
)} | ||
<TableCell data-qa-image-size> | ||
{getSizeForImage(size, status, event?.status)} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this probably could've the same flag as a JSON flag