From ccbc0c2b270b7d828f1c71d06fdf464fbf234e88 Mon Sep 17 00:00:00 2001 From: ecarrill Date: Tue, 8 Oct 2024 05:54:42 -0700 Subject: [PATCH 1/2] chore: [M3-7014] - Remove isVLAN code --- .../LinodesLanding/DisplayGroupedLinodes.tsx | 5 - .../LinodesLanding/SortableTableHead.tsx | 133 ++++++++---------- .../Linodes/LinodesLanding/TableWrapper.tsx | 9 +- 3 files changed, 63 insertions(+), 84 deletions(-) diff --git a/packages/manager/src/features/Linodes/LinodesLanding/DisplayGroupedLinodes.tsx b/packages/manager/src/features/Linodes/LinodesLanding/DisplayGroupedLinodes.tsx index b7e7d09c21f..7fdb1f9750f 100644 --- a/packages/manager/src/features/Linodes/LinodesLanding/DisplayGroupedLinodes.tsx +++ b/packages/manager/src/features/Linodes/LinodesLanding/DisplayGroupedLinodes.tsx @@ -45,7 +45,6 @@ interface DisplayGroupedLinodesProps data: LinodeWithMaintenance[]; display: 'grid' | 'list'; handleRegionFilter: (regionFilter: RegionFilter) => void; - isVLAN?: boolean; linodeViewPreference: 'grid' | 'list'; linodesAreGrouped: boolean; openDialog: (type: DialogType, linodeID: number, linodeLabel: string) => void; @@ -67,7 +66,6 @@ export const DisplayGroupedLinodes = (props: DisplayGroupedLinodesProps) => { display, handleOrderChange, handleRegionFilter, - isVLAN, linodeViewPreference, linodesAreGrouped, order, @@ -86,7 +84,6 @@ export const DisplayGroupedLinodes = (props: DisplayGroupedLinodesProps) => { const tableWrapperProps = { dataLength, handleOrderChange, - isVLAN, order, orderBy, someLinodesHaveMaintenance: props.someLinodesHaveMaintenance, @@ -190,7 +187,6 @@ export const DisplayGroupedLinodes = (props: DisplayGroupedLinodesProps) => { handleOrderChange, handlePageChange, handlePageSizeChange, - isVLAN, order, orderBy, page, @@ -264,7 +260,6 @@ export const DisplayGroupedLinodes = (props: DisplayGroupedLinodesProps) => { handleOrderChange, handlePageChange, handlePageSizeChange, - isVLAN, order, orderBy, page, diff --git a/packages/manager/src/features/Linodes/LinodesLanding/SortableTableHead.tsx b/packages/manager/src/features/Linodes/LinodesLanding/SortableTableHead.tsx index 0062283654a..d9ec9cffbc7 100644 --- a/packages/manager/src/features/Linodes/LinodesLanding/SortableTableHead.tsx +++ b/packages/manager/src/features/Linodes/LinodesLanding/SortableTableHead.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; import GridView from 'src/assets/icons/grid-view.svg'; import { GroupByTagToggle } from 'src/components/GroupByTagToggle'; import { Hidden } from 'src/components/Hidden'; -import { OrderByProps } from 'src/components/OrderBy'; import { TableCell } from 'src/components/TableCell'; import { TableHead } from 'src/components/TableHead'; import { TableRow } from 'src/components/TableRow'; @@ -13,11 +12,12 @@ import { Tooltip } from 'src/components/Tooltip'; import { StyledToggleButton } from './DisplayLinodes.styles'; +import type { OrderByProps } from 'src/components/OrderBy'; + // There's nothing very scientific about the widths across the breakpoints // here, just a lot of trial and error based on maximum expected column sizes. interface Props { - isVLAN?: boolean; linodeViewPreference: 'grid' | 'list'; linodesAreGrouped: boolean; toggleGroupLinodes: () => boolean; @@ -33,7 +33,6 @@ export const SortableTableHead = (props: SortableTableHeadProps) => { const { handleOrderChange, - isVLAN, linodeViewPreference, linodesAreGrouped, order, @@ -85,82 +84,68 @@ export const SortableTableHead = (props: SortableTableHeadProps) => { > Status - {isVLAN ? ( + - VLAN IP + Plan - ) : null} - {isVLAN ? null : ( - <> - - - Plan - - - Public IP Address - - - - Region - - - - - - Last Backup - - - - )} + + Public IP Address + + + + Region + + + + + + Last Backup + +
(props: TableWrapperProps) => { const { dataLength, handleOrderChange, - isVLAN, linodeViewPreference, linodesAreGrouped, order, @@ -45,7 +45,6 @@ const TableWrapper = (props: TableWrapperProps) => { > Date: Tue, 8 Oct 2024 06:09:45 -0700 Subject: [PATCH 2/2] Add changset --- .../.changeset/pr-11065-tech-stories-1728392959296.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-11065-tech-stories-1728392959296.md diff --git a/packages/manager/.changeset/pr-11065-tech-stories-1728392959296.md b/packages/manager/.changeset/pr-11065-tech-stories-1728392959296.md new file mode 100644 index 00000000000..5a90047345f --- /dev/null +++ b/packages/manager/.changeset/pr-11065-tech-stories-1728392959296.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +Removed unnecessary isVLAN code from codebase ([#11065](https://github.com/linode/manager/pull/11065))