From 76d94a5eca694195b08e0310e0069d557de9e148 Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Mon, 22 Apr 2024 10:24:18 -0400 Subject: [PATCH 1/4] Refactor Logo.stories into /common --- .../components/common/stories/Logo.stories.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/lib/components/common/stories/Logo.stories.svelte diff --git a/src/lib/components/common/stories/Logo.stories.svelte b/src/lib/components/common/stories/Logo.stories.svelte new file mode 100644 index 000000000..caa81b356 --- /dev/null +++ b/src/lib/components/common/stories/Logo.stories.svelte @@ -0,0 +1,14 @@ + + + From 93e3faa3eb03d6382ca4f51da0a41ef6c27cd0ce Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Mon, 22 Apr 2024 10:24:36 -0400 Subject: [PATCH 2/4] Refactor layouts into lib/components/layouts --- .../{ => layouts}/ContentLayout.svelte | 0 .../components/{ => layouts}/MainLayout.svelte | 16 ++++++++-------- .../stories/MainLayout.stories.svelte | 16 ++++++++-------- src/lib/components/stories/Logo.stories.svelte | 14 -------------- src/routes/app/add-ons/+page.svelte | 5 ++--- .../app/add-ons/[owner]/[repo]/+page.svelte | 2 +- src/routes/app/upload/+layout@.svelte | 2 +- src/routes/documents/[id]-[slug]/+layout.svelte | 2 +- 8 files changed, 21 insertions(+), 36 deletions(-) rename src/lib/components/{ => layouts}/ContentLayout.svelte (100%) rename src/lib/components/{ => layouts}/MainLayout.svelte (92%) rename src/lib/components/{ => layouts}/stories/MainLayout.stories.svelte (90%) delete mode 100644 src/lib/components/stories/Logo.stories.svelte diff --git a/src/lib/components/ContentLayout.svelte b/src/lib/components/layouts/ContentLayout.svelte similarity index 100% rename from src/lib/components/ContentLayout.svelte rename to src/lib/components/layouts/ContentLayout.svelte diff --git a/src/lib/components/MainLayout.svelte b/src/lib/components/layouts/MainLayout.svelte similarity index 92% rename from src/lib/components/MainLayout.svelte rename to src/lib/components/layouts/MainLayout.svelte index 6226ac849..34cb56160 100644 --- a/src/lib/components/MainLayout.svelte +++ b/src/lib/components/layouts/MainLayout.svelte @@ -6,16 +6,16 @@ import { getContext } from "svelte"; import { SidebarCollapse16, SidebarExpand16 } from "svelte-octicons"; - import Button from "./common/Button.svelte"; - import Flex from "./common/Flex.svelte"; - import SignedIn from "./common/SignedIn.svelte"; - import UserMenu from "./navigation/UserMenu.svelte"; - import OrgMenu from "./navigation/OrgMenu.svelte"; + import Button from "../common/Button.svelte"; + import Flex from "../common/Flex.svelte"; + import SignedIn from "../common/SignedIn.svelte"; + import UserMenu from "../navigation/UserMenu.svelte"; + import OrgMenu from "../navigation/OrgMenu.svelte"; import { SIGN_IN_URL } from "@/config/config"; - import Breadcrumbs from "./navigation/Breadcrumbs.svelte"; - import LanguageMenu from "./navigation/LanguageMenu.svelte"; - import HelpMenu from "./navigation/HelpMenu.svelte"; + import Breadcrumbs from "../navigation/Breadcrumbs.svelte"; + import LanguageMenu from "../navigation/LanguageMenu.svelte"; + import HelpMenu from "../navigation/HelpMenu.svelte"; export let modal: boolean = false; diff --git a/src/lib/components/stories/MainLayout.stories.svelte b/src/lib/components/layouts/stories/MainLayout.stories.svelte similarity index 90% rename from src/lib/components/stories/MainLayout.stories.svelte rename to src/lib/components/layouts/stories/MainLayout.stories.svelte index af5247e2a..cf36a21b9 100644 --- a/src/lib/components/stories/MainLayout.stories.svelte +++ b/src/lib/components/layouts/stories/MainLayout.stories.svelte @@ -19,15 +19,15 @@ import Button from "$lib/components/common/Button.svelte"; import SidebarItem from "$lib/components/sidebar/SidebarItem.svelte"; - import documents from "../../api/fixtures/documents/documents.json"; - import Flex from "../common/Flex.svelte"; - import SidebarGroup from "../sidebar/SidebarGroup.svelte"; - import Action from "../common/Action.svelte"; + import documents from "../../../api/fixtures/documents/documents.json"; + import Flex from "../../common/Flex.svelte"; + import SidebarGroup from "../../sidebar/SidebarGroup.svelte"; + import Action from "../../common/Action.svelte"; import Pin from "@/common/Pin.svelte"; - import ResultsList from "../documents/ResultsList.svelte"; - import ContentLayout from "../ContentLayout.svelte"; - import PageToolbar from "../common/PageToolbar.svelte"; - import Search from "../inputs/Search.svelte"; + import ResultsList from "../../documents/ResultsList.svelte"; + import ContentLayout from "../../ContentLayout.svelte"; + import PageToolbar from "../../common/PageToolbar.svelte"; + import Search from "../../inputs/Search.svelte"; import { addons } from "@/test/handlers/addons"; diff --git a/src/lib/components/stories/Logo.stories.svelte b/src/lib/components/stories/Logo.stories.svelte deleted file mode 100644 index bca05293a..000000000 --- a/src/lib/components/stories/Logo.stories.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/src/routes/app/add-ons/+page.svelte b/src/routes/app/add-ons/+page.svelte index c272e6ee8..82d97bd49 100644 --- a/src/routes/app/add-ons/+page.svelte +++ b/src/routes/app/add-ons/+page.svelte @@ -9,10 +9,9 @@ import Search from "@/lib/components/inputs/Search.svelte"; import Pin from "@/common/icons/Pin.svelte"; import Star from "@/common/icons/Star.svelte"; - import Credit from "@/common/icons/Credit.svelte"; - import ContentLayout from "$lib/components/ContentLayout.svelte"; + import ContentLayout from "$lib/components/layouts/ContentLayout.svelte"; import Empty from "$lib/components/common/Empty.svelte"; - import MainLayout from "$lib/components/MainLayout.svelte"; + import MainLayout from "$lib/components/layouts/MainLayout.svelte"; import PageToolbar from "$lib/components/common/PageToolbar.svelte"; import Error from "@/lib/components/common/Error.svelte"; import ListItem from "$lib/components/addons/AddOnListItem.svelte"; diff --git a/src/routes/app/add-ons/[owner]/[repo]/+page.svelte b/src/routes/app/add-ons/[owner]/[repo]/+page.svelte index f7cb5f44b..8a48dc757 100644 --- a/src/routes/app/add-ons/[owner]/[repo]/+page.svelte +++ b/src/routes/app/add-ons/[owner]/[repo]/+page.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/app/upload/+layout@.svelte b/src/routes/app/upload/+layout@.svelte index 3cf2af273..79c44edc8 100644 --- a/src/routes/app/upload/+layout@.svelte +++ b/src/routes/app/upload/+layout@.svelte @@ -1,7 +1,7 @@