From bd478996207ff59e4dd43c06da9711e14ecd09b4 Mon Sep 17 00:00:00 2001 From: Jin Lee <86632227+jinlee93@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:10:13 -0700 Subject: [PATCH] refactor(toolbar)!: remove component (#1683) * refactor(toolbar)!: remove component * refactor(toolbar)!: remove the subcomponents too * fix: remove some padding --- .../CoursePlannerEdit/CoursePlannerEdit.tsx | 34 ++-- .../FeedbackOverview.module.css | 4 - .../FeedbackOverview/FeedbackOverview.tsx | 40 ++-- src/components/DragDrop/DragDrop.stories.tsx | 81 ++++---- .../__snapshots__/DragDrop.test.ts.snap | 72 +++----- src/components/Toolbar/Toolbar.module.css | 62 ------- src/components/Toolbar/Toolbar.stories.tsx | 63 ------- src/components/Toolbar/Toolbar.test.ts | 6 - src/components/Toolbar/Toolbar.tsx | 55 ------ .../__snapshots__/Toolbar.test.ts.snap | 173 ------------------ src/components/Toolbar/index.ts | 1 - src/components/ToolbarItem/ToolbarItem.tsx | 45 ----- src/components/ToolbarItem/index.ts | 1 - src/index.ts | 2 - 14 files changed, 92 insertions(+), 547 deletions(-) delete mode 100755 src/components/Toolbar/Toolbar.module.css delete mode 100644 src/components/Toolbar/Toolbar.stories.tsx delete mode 100644 src/components/Toolbar/Toolbar.test.ts delete mode 100644 src/components/Toolbar/Toolbar.tsx delete mode 100644 src/components/Toolbar/__snapshots__/Toolbar.test.ts.snap delete mode 100644 src/components/Toolbar/index.ts delete mode 100644 src/components/ToolbarItem/ToolbarItem.tsx delete mode 100644 src/components/ToolbarItem/index.ts diff --git a/.storybook/pages/CoursePlannerEdit/CoursePlannerEdit.tsx b/.storybook/pages/CoursePlannerEdit/CoursePlannerEdit.tsx index 7a8041c93..784bfd81b 100644 --- a/.storybook/pages/CoursePlannerEdit/CoursePlannerEdit.tsx +++ b/.storybook/pages/CoursePlannerEdit/CoursePlannerEdit.tsx @@ -32,8 +32,6 @@ import { TableHeaderCell, TableRow, Text, - Toolbar, - ToolbarItem, } from '../../../src'; import type { NewState } from '../../../src/components/DragDrop/DragDrop'; @@ -431,19 +429,17 @@ export const CoursePlannerEdit = () => { emptyContent: container1EmptyContent(), header: ( - - - - Available projects - - - +
+ + Available projects + +
- - +
+
), }, @@ -452,19 +448,17 @@ export const CoursePlannerEdit = () => { emptyContent: container2EmptyContent(), header: ( - - - - Planned projects - - - +
+ + Planned projects + +
- - +
+
), }, diff --git a/.storybook/pages/FeedbackOverview/FeedbackOverview.module.css b/.storybook/pages/FeedbackOverview/FeedbackOverview.module.css index 9d7ce57f7..133f69f59 100644 --- a/.storybook/pages/FeedbackOverview/FeedbackOverview.module.css +++ b/.storybook/pages/FeedbackOverview/FeedbackOverview.module.css @@ -1,9 +1,5 @@ @import '../../../src/design-tokens/mixins.css'; -.feedback-overview__toolbar { - padding-bottom: var(--eds-size-2); -} - .feedback-overview__card-header { margin-bottom: var(--eds-size-1); font: var(--eds-theme-typography-title-md); diff --git a/.storybook/pages/FeedbackOverview/FeedbackOverview.tsx b/.storybook/pages/FeedbackOverview/FeedbackOverview.tsx index 8c42567a3..046e8a223 100644 --- a/.storybook/pages/FeedbackOverview/FeedbackOverview.tsx +++ b/.storybook/pages/FeedbackOverview/FeedbackOverview.tsx @@ -14,8 +14,6 @@ import { Table, Text, TimelineNav, - Toolbar, - ToolbarItem, } from '../../../src'; import breakpoint from '../../../src/design-tokens/tier-1-definitions/breakpoints'; @@ -208,16 +206,11 @@ export const FeedbackOverview = ({ activeIndex = 0 }: Props) => { - - - - Feedback Overview - - - +
+ + Feedback Overview + +
- - +
+
{isTable && ( @@ -405,16 +398,11 @@ export const FeedbackOverview = ({ activeIndex = 0 }: Props) => { } variant="number" > - - - - Checkpoint Progress - - - +
+ + Checkpoint Progress + +
- - +
+
{isTable && (
diff --git a/src/components/DragDrop/DragDrop.stories.tsx b/src/components/DragDrop/DragDrop.stories.tsx index f40d1e2d9..666036a94 100644 --- a/src/components/DragDrop/DragDrop.stories.tsx +++ b/src/components/DragDrop/DragDrop.stories.tsx @@ -10,7 +10,6 @@ import { Heading, Icon, Text, - Toolbar, } from '../..'; import styles from './DragDrop.stories.module.css'; @@ -91,11 +90,11 @@ export const Default: StoryObj = { itemIds: ['item-1', 'item-2', 'item-3', 'item-4', 'item-5'], header: ( - +
Available Projects - +
), }, @@ -298,11 +297,11 @@ export const Default: StoryObj = { ), header: ( - +
Selected Projects - +
), }, @@ -365,11 +364,11 @@ export const HoveredHandle: StoryObj = { itemIds: ['item-1', 'item-2', 'item-3', 'item-4', 'item-5'], header: ( - +
Available Projects - +
), }, @@ -492,11 +491,11 @@ export const HoveredHandle: StoryObj = { ), header: ( - +
Selected Projects - +
), }, @@ -520,19 +519,17 @@ const InteractiveDragDrop = () => { itemIds: ['item-1', 'item-2', 'item-3', 'item-4', 'item-5'], header: ( - - - - Available projects - - - +
+ + Available projects + +
- - +
+
), }, @@ -543,19 +540,17 @@ const InteractiveDragDrop = () => { itemIds: [], header: ( - - - - Planned projects - - - +
+ + Planned projects + +
- - +
+
), }, @@ -566,19 +561,17 @@ const InteractiveDragDrop = () => { itemIds: [], header: ( - - - - Planned projects - - - +
+ + Planned projects + +
- - +
+
), }, @@ -589,19 +582,17 @@ const InteractiveDragDrop = () => { itemIds: [], header: ( - - - - Planned projects - - - +
+ + Planned projects + +
- - +
+
), }, diff --git a/src/components/DragDrop/__snapshots__/DragDrop.test.ts.snap b/src/components/DragDrop/__snapshots__/DragDrop.test.ts.snap index 14b236126..7f8fb1d7e 100644 --- a/src/components/DragDrop/__snapshots__/DragDrop.test.ts.snap +++ b/src/components/DragDrop/__snapshots__/DragDrop.test.ts.snap @@ -17,7 +17,7 @@ exports[` Default story renders snapshot 1`] = ` >
Default story renders snapshot 1`] = ` >
HoveredHandle story renders snapshot 1`] = ` >
HoveredHandle story renders snapshot 1`] = ` >
Interactive story renders snapshot 1`] = ` >
-
-

- Available projects -

-
+ Available projects +