From e1787d8f92151f81c01db3758b1ae7f9e9fd2245 Mon Sep 17 00:00:00 2001 From: eirikhaugstulen Date: Sat, 15 Nov 2025 17:53:21 +0300 Subject: [PATCH 1/2] fix: close sidebar on adding widget --- i18n/en.pot | 34 +++++++++++++++++-- .../AddComponent/AddComponent.tsx | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index cdcdf4d..e6fd0cc 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2025-03-20T22:01:28.568Z\n" -"PO-Revision-Date: 2025-03-20T22:01:28.568Z\n" +"POT-Creation-Date: 2025-11-13T18:52:55.880Z\n" +"PO-Revision-Date: 2025-11-13T18:52:55.881Z\n" msgid "Data store keys created!" msgstr "Data store keys created!" @@ -35,6 +35,36 @@ msgstr "Do you want to create them?" msgid "Create keys" msgstr "Create keys" +msgid "Export Enrollment Overview" +msgstr "Export Enrollment Overview" + +msgid "Review your enrollment overview configuration before exporting." +msgstr "Review your enrollment overview configuration before exporting." + +msgid "Export Add Event Page" +msgstr "Export Add Event Page" + +msgid "Review your add event page configuration before exporting." +msgstr "Review your add event page configuration before exporting." + +msgid "Export Edit Event Page" +msgstr "Export Edit Event Page" + +msgid "Review your edit event page configuration before exporting." +msgstr "Review your edit event page configuration before exporting." + +msgid "Enrollment Overview" +msgstr "Enrollment Overview" + +msgid "Add Event Page" +msgstr "Add Event Page" + +msgid "Edit Event Page" +msgstr "Edit Event Page" + +msgid "Export" +msgstr "Export" + msgid "Dashboard" msgstr "Dashboard" diff --git a/src/components/Pages/EditEnrollmentOverview/FormComponents/AddComponent/AddComponent.tsx b/src/components/Pages/EditEnrollmentOverview/FormComponents/AddComponent/AddComponent.tsx index 055cab7..84a1fb6 100644 --- a/src/components/Pages/EditEnrollmentOverview/FormComponents/AddComponent/AddComponent.tsx +++ b/src/components/Pages/EditEnrollmentOverview/FormComponents/AddComponent/AddComponent.tsx @@ -63,6 +63,7 @@ export const AddComponent = ({ columnName, availablePlugins, availableWidgets, a }); setValue(columnName, newValues); + setOpen(false); } const addPluginToColumn = ({ id, pluginLaunchUrl }: { id: string, pluginLaunchUrl: string }) => { @@ -84,6 +85,7 @@ export const AddComponent = ({ columnName, availablePlugins, availableWidgets, a } setValue(columnName, newValues); + setOpen(false); } return ( From 65b8937721de43e12bf0f4e10fd1c7e809ae8d42 Mon Sep 17 00:00:00 2001 From: eirikhaugstulen Date: Sat, 15 Nov 2025 18:11:58 +0300 Subject: [PATCH 2/2] s --- i18n/en.pot | 25 +++-- .../ViewModePage/ViewModePage.tsx | 44 ++++---- src/components/ui/empty.tsx | 105 ++++++++++++++++++ 3 files changed, 143 insertions(+), 31 deletions(-) create mode 100644 src/components/ui/empty.tsx diff --git a/i18n/en.pot b/i18n/en.pot index e6fd0cc..492f37f 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2025-11-13T18:52:55.880Z\n" -"PO-Revision-Date: 2025-11-13T18:52:55.881Z\n" +"POT-Creation-Date: 2025-11-15T14:56:01.306Z\n" +"PO-Revision-Date: 2025-11-15T14:56:01.306Z\n" msgid "Data store keys created!" msgstr "Data store keys created!" @@ -181,18 +181,23 @@ msgstr "Edit event" msgid "Edit" msgstr "Edit" -msgid "Default layout" -msgstr "Default layout" +msgid "Make the enrollment page your own" +msgstr "Make the enrollment page your own" msgid "" -"You are currently using the default layout for this page. Click on the " -"button below to start customizing." +"Switch to edit mode to build a layout that surfaces the data your team " +"needs most. Rearrange widgets, spotlight key indicators, and guide users " +"with a tailored flow." msgstr "" -"You are currently using the default layout for this page. Click on the " -"button below to start customizing." +"Switch to edit mode to build a layout that surfaces the data your team " +"needs most. Rearrange widgets, spotlight key indicators, and guide users " +"with a tailored flow." -msgid "Start" -msgstr "Start" +msgid "Start designing" +msgstr "Start designing" + +msgid "You can always revert back to the default layout later." +msgstr "You can always revert back to the default layout later." msgid "Quick actions" msgstr "Quick actions" diff --git a/src/components/Pages/EditEnrollmentOverview/ViewModePage/ViewModePage.tsx b/src/components/Pages/EditEnrollmentOverview/ViewModePage/ViewModePage.tsx index e22a14c..c5bf715 100644 --- a/src/components/Pages/EditEnrollmentOverview/ViewModePage/ViewModePage.tsx +++ b/src/components/Pages/EditEnrollmentOverview/ViewModePage/ViewModePage.tsx @@ -8,6 +8,8 @@ import { FormattedEnrollmentDataStoreInfo } from "../../EnrollmentOverview/hooks import { WidgetTypes } from "../EditModePage/hooks/useDefaultValues"; import { PluginSchema } from "../../FormFieldConfigurator/FormController"; import { ItemDisplay } from "./ItemDisplay"; +import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../../../ui/empty"; +import { LayoutTemplate } from "lucide-react"; type Props = { goBackToTableView: () => void; @@ -110,27 +112,27 @@ export const ViewModePage = ( ) : ( -
-

- {i18n.t('Default layout')} -

- -

- {i18n.t('You are currently using the default layout for this page. Click on the button below to start customizing.')} -

- - -
+ + + + + + + {i18n.t('No custom layout yet')} + + + {i18n.t('This page still uses the default layout. Jump into edit mode to add widgets, reorder columns and create an experience that fits your workflows.')} + + + + + + )} diff --git a/src/components/ui/empty.tsx b/src/components/ui/empty.tsx new file mode 100644 index 0000000..a86caad --- /dev/null +++ b/src/components/ui/empty.tsx @@ -0,0 +1,105 @@ +import React from "react"; +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "../../lib/utils" + +function Empty({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +const emptyMediaVariants = cva( + "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", + { + variants: { + variant: { + default: "bg-transparent", + icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function EmptyMedia({ + className, + variant = "default", + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) { + return ( +
a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", + className + )} + {...props} + /> + ) +} + +function EmptyContent({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { + Empty, + EmptyHeader, + EmptyTitle, + EmptyDescription, + EmptyContent, + EmptyMedia, +}