From a380b7c1415ca37b27f016bb0c06af7621d532cf Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Tue, 28 Nov 2023 15:55:34 -0500 Subject: [PATCH 1/4] Removes *.demo.svelte files Since we updated to Svelte4 and the newest version of `@storybook/addon-svelte-csf`, we no longer have to avoid composed components in our stories. --- src/addons/browser/SearchInput.svelte | 2 +- .../browser/stories/AddOnListItem.demo.svelte | 20 ---------- .../stories/AddOnListItem.stories.svelte | 26 ++++++++----- src/addons/browser/stories/Filter.demo.svelte | 10 ----- .../browser/stories/Filter.stories.svelte | 26 +++++++------ .../browser/stories/SearchInput.demo.svelte | 7 ---- .../stories/SearchInput.stories.svelte | 27 ++++++++------ src/addons/dispatch/stories/Form.demo.svelte | 20 ---------- .../dispatch/stories/Form.stories.svelte | 36 ++++++++++++------ .../dispatch/stories/Header.demo.svelte | 16 -------- .../dispatch/stories/Header.stories.svelte | 28 +++++++++----- .../sidebar/stories/ListItem.demo.svelte | 22 ----------- .../sidebar/stories/ListItem.stories.svelte | 37 +++++++++++++------ .../sidebar/stories/Sidebar.demo.svelte | 15 -------- .../sidebar/stories/Sidebar.stories.svelte | 31 ++++++++++------ src/addons/stories/Drawer.demo.svelte | 20 ---------- src/addons/stories/Drawer.stories.svelte | 32 +++++++++++----- src/addons/stories/Paginator.demo.svelte | 25 ------------- src/addons/stories/Paginator.stories.svelte | 35 +++++++++++++----- 19 files changed, 183 insertions(+), 252 deletions(-) delete mode 100644 src/addons/browser/stories/AddOnListItem.demo.svelte delete mode 100644 src/addons/browser/stories/Filter.demo.svelte delete mode 100644 src/addons/browser/stories/SearchInput.demo.svelte delete mode 100644 src/addons/dispatch/stories/Form.demo.svelte delete mode 100644 src/addons/dispatch/stories/Header.demo.svelte delete mode 100644 src/addons/sidebar/stories/ListItem.demo.svelte delete mode 100644 src/addons/sidebar/stories/Sidebar.demo.svelte delete mode 100644 src/addons/stories/Drawer.demo.svelte delete mode 100644 src/addons/stories/Paginator.demo.svelte diff --git a/src/addons/browser/SearchInput.svelte b/src/addons/browser/SearchInput.svelte index f7267b519..25fa1fa38 100644 --- a/src/addons/browser/SearchInput.svelte +++ b/src/addons/browser/SearchInput.svelte @@ -1,4 +1,4 @@ - - - - -
- -
diff --git a/src/addons/browser/stories/AddOnListItem.stories.svelte b/src/addons/browser/stories/AddOnListItem.stories.svelte index 83dd12775..5f2700708 100644 --- a/src/addons/browser/stories/AddOnListItem.stories.svelte +++ b/src/addons/browser/stories/AddOnListItem.stories.svelte @@ -1,8 +1,7 @@ - - + diff --git a/src/addons/browser/stories/Filter.demo.svelte b/src/addons/browser/stories/Filter.demo.svelte deleted file mode 100644 index 87152cd23..000000000 --- a/src/addons/browser/stories/Filter.demo.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/src/addons/browser/stories/Filter.stories.svelte b/src/addons/browser/stories/Filter.stories.svelte index 761d63654..a3495d976 100644 --- a/src/addons/browser/stories/Filter.stories.svelte +++ b/src/addons/browser/stories/Filter.stories.svelte @@ -1,22 +1,24 @@ - - + export const meta = { + title: "Add-Ons / Browser / Components / Filter", + tags: ["autodocs"], + parameters: { layout: "centered" }, + component: Filter, + argTypes: { selected: { control: "boolean" } }, + }; + diff --git a/src/addons/browser/stories/SearchInput.demo.svelte b/src/addons/browser/stories/SearchInput.demo.svelte deleted file mode 100644 index 8d7170d8e..000000000 --- a/src/addons/browser/stories/SearchInput.demo.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - - -

Query: {$query}

diff --git a/src/addons/browser/stories/SearchInput.stories.svelte b/src/addons/browser/stories/SearchInput.stories.svelte index 13214b2ca..bea38ae14 100644 --- a/src/addons/browser/stories/SearchInput.stories.svelte +++ b/src/addons/browser/stories/SearchInput.stories.svelte @@ -1,17 +1,20 @@ - - + - - - + diff --git a/src/addons/dispatch/stories/Form.demo.svelte b/src/addons/dispatch/stories/Form.demo.svelte deleted file mode 100644 index ee4a2c97c..000000000 --- a/src/addons/dispatch/stories/Form.demo.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -

{addon.name}

- -
- -
-

Data

- - {JSON.stringify($values, null, 2)} - -
diff --git a/src/addons/dispatch/stories/Form.stories.svelte b/src/addons/dispatch/stories/Form.stories.svelte index 5772eb221..b6c6ee3e3 100644 --- a/src/addons/dispatch/stories/Form.stories.svelte +++ b/src/addons/dispatch/stories/Form.stories.svelte @@ -1,20 +1,34 @@ - - + export const meta = { + title: "Add-Ons / Dispatch / Form", + component: Form, + parameters: { layout: "centered" }, + }; + diff --git a/src/addons/dispatch/stories/Header.demo.svelte b/src/addons/dispatch/stories/Header.demo.svelte deleted file mode 100644 index 1feb19ee2..000000000 --- a/src/addons/dispatch/stories/Header.demo.svelte +++ /dev/null @@ -1,16 +0,0 @@ - - - - -
-
-
diff --git a/src/addons/dispatch/stories/Header.stories.svelte b/src/addons/dispatch/stories/Header.stories.svelte index 645324f2b..4b4640dc2 100644 --- a/src/addons/dispatch/stories/Header.stories.svelte +++ b/src/addons/dispatch/stories/Header.stories.svelte @@ -1,21 +1,29 @@ - - + diff --git a/src/addons/sidebar/stories/ListItem.demo.svelte b/src/addons/sidebar/stories/ListItem.demo.svelte deleted file mode 100644 index 199f6288d..000000000 --- a/src/addons/sidebar/stories/ListItem.demo.svelte +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/src/addons/sidebar/stories/ListItem.stories.svelte b/src/addons/sidebar/stories/ListItem.stories.svelte index 27f3fbe73..87f6cb186 100644 --- a/src/addons/sidebar/stories/ListItem.stories.svelte +++ b/src/addons/sidebar/stories/ListItem.stories.svelte @@ -1,22 +1,37 @@ - - + - import Sidebar from "../Sidebar.svelte"; - - - - - diff --git a/src/addons/sidebar/stories/Sidebar.stories.svelte b/src/addons/sidebar/stories/Sidebar.stories.svelte index 11fe663ca..d6daa2490 100644 --- a/src/addons/sidebar/stories/Sidebar.stories.svelte +++ b/src/addons/sidebar/stories/Sidebar.stories.svelte @@ -1,11 +1,10 @@ - - + - - + + diff --git a/src/addons/stories/Drawer.demo.svelte b/src/addons/stories/Drawer.demo.svelte deleted file mode 100644 index 2a127dc97..000000000 --- a/src/addons/stories/Drawer.demo.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -
-

Drawer Contents

-

Lorem ipsum dolor sit amet

-
-
diff --git a/src/addons/stories/Drawer.stories.svelte b/src/addons/stories/Drawer.stories.svelte index 7a806b815..a067dcd80 100644 --- a/src/addons/stories/Drawer.stories.svelte +++ b/src/addons/stories/Drawer.stories.svelte @@ -1,21 +1,33 @@ - - + diff --git a/src/addons/stories/Paginator.demo.svelte b/src/addons/stories/Paginator.demo.svelte deleted file mode 100644 index c12b16f01..000000000 --- a/src/addons/stories/Paginator.demo.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - - - -
- -
diff --git a/src/addons/stories/Paginator.stories.svelte b/src/addons/stories/Paginator.stories.svelte index 95c363c8a..9e0bfba89 100644 --- a/src/addons/stories/Paginator.stories.svelte +++ b/src/addons/stories/Paginator.stories.svelte @@ -1,25 +1,40 @@ - - + From 8909d11d50a46cb65e1f4f04c07c5077fcee928e Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Tue, 5 Dec 2023 13:34:05 -0500 Subject: [PATCH 2/4] Consolidates data handling functions --- .../runs/stories/History.stories.svelte | 66 ++++++++---------- src/addons/runs/stories/Runs.stories.svelte | 30 ++++---- .../runs/stories/Scheduled.stories.svelte | 68 ++++++++----------- src/addons/runs/stories/mockData.ts | 38 +++++++++++ 4 files changed, 110 insertions(+), 92 deletions(-) create mode 100644 src/addons/runs/stories/mockData.ts diff --git a/src/addons/runs/stories/History.stories.svelte b/src/addons/runs/stories/History.stories.svelte index 113453e1d..b872da25f 100644 --- a/src/addons/runs/stories/History.stories.svelte +++ b/src/addons/runs/stories/History.stories.svelte @@ -1,46 +1,38 @@ - - - - + export const meta = { + title: "Add-Ons / Runs / History", + component: History, + parameters: { layout: "centered" }, + }; + - - - - + + + + diff --git a/src/addons/runs/stories/Runs.stories.svelte b/src/addons/runs/stories/Runs.stories.svelte index 5db6df21f..c2470e4b3 100644 --- a/src/addons/runs/stories/Runs.stories.svelte +++ b/src/addons/runs/stories/Runs.stories.svelte @@ -1,19 +1,17 @@ - - + export const meta = { + title: "Add-Ons / Runs", + tags: ["autodocs"], + parameters: { layout: "fullscreen" }, + component: Runs, + }; +