From ad84e31be4519f83974c82c9965f04add2f308dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Thu, 7 Nov 2024 16:53:21 +0100 Subject: [PATCH 01/16] feat(xo-6): create side panel --- .../ui/side-panel/ui-side-panel.story.vue | 60 +++++++++++++++ .../components/ui/side-panel/UiSidePanel.vue | 77 +++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 @xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue create mode 100644 @xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue new file mode 100644 index 00000000000..993eb662648 --- /dev/null +++ b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue @@ -0,0 +1,60 @@ + + + diff --git a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue b/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue new file mode 100644 index 00000000000..cb5c4bb46f7 --- /dev/null +++ b/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue @@ -0,0 +1,77 @@ + + + + + + From 6ed923fca48857a54d661b3659f0e8be6ea4619c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Thu, 7 Nov 2024 22:12:13 +0100 Subject: [PATCH 02/16] feat(xo-6): display additional action in dropdown --- .../ui/side-panel/ui-side-panel.story.vue | 43 +++++++++-- .../components/ui/side-panel/UiSidePanel.vue | 73 ++++++++++++++++--- 2 files changed, 99 insertions(+), 17 deletions(-) diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue index 993eb662648..0bb33292f85 100644 --- a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue +++ b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue @@ -5,7 +5,8 @@ prop('state').type('states').enum('normal', 'empty', 'loading', 'error').preset('info').required().widget(), prop('busy').bool().widget(), prop('isError').bool().widget(), - setting('actions').widget(text()).preset('Button'), + setting('action1').widget(text()).preset('Edit'), + setting('action2').widget(text()).preset('Delete'), setting('isEmpty').widget(boolean()), slot(), slot('actions').help('Meant to receive UiButton'), @@ -15,19 +16,46 @@ Normal: { props: { busy: false, - error: false, + isError: false, + }, + settings: { + isEmpty: false, + }, + }, + Empty: { + props: { + busy: false, + isError: false, + }, + settings: { + isEmpty: true, + }, + }, + Error: { + props: { + busy: false, + isError: true, + }, + }, + Busy: { + props: { + busy: true, + isError: false, }, }, }" > From 534c972fe34dad32c0d07aae05e51f91a48cb4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Fri, 8 Nov 2024 10:47:51 +0100 Subject: [PATCH 05/16] feat(xo-6): remove duplicated component --- .../web-core/lib/assets/no-selection.svg | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 @xen-orchestra/web-core/lib/assets/no-selection.svg diff --git a/@xen-orchestra/web-core/lib/assets/no-selection.svg b/@xen-orchestra/web-core/lib/assets/no-selection.svg deleted file mode 100644 index fdf323b36f6..00000000000 --- a/@xen-orchestra/web-core/lib/assets/no-selection.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 3cbbc6b513c4658b8727f732bfb346f0effbc6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Fri, 8 Nov 2024 10:49:10 +0100 Subject: [PATCH 06/16] feat(xo-6): remove duplicated component --- .../lib/components/ui/NoDataError.vue | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 @xen-orchestra/web-core/lib/components/ui/NoDataError.vue diff --git a/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue b/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue deleted file mode 100644 index 16b55e31d03..00000000000 --- a/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - From dccac09cb251e69bddc93828174077a84d43bff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Wed, 13 Nov 2024 16:48:13 +0100 Subject: [PATCH 07/16] feat(xo-lite): feedback --- .../ui-panel.story.vue} | 56 ++++++------------- .../UiSidePanel.vue => panel/UiPanel.vue} | 32 +++++------ 2 files changed, 31 insertions(+), 57 deletions(-) rename @xen-orchestra/lite/src/stories/web-core/ui/{side-panel/ui-side-panel.story.vue => panel/ui-panel.story.vue} (52%) rename @xen-orchestra/web-core/lib/components/ui/{side-panel/UiSidePanel.vue => panel/UiPanel.vue} (57%) diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue similarity index 52% rename from @xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue rename to @xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue index f47fcf99172..c3ea870b6ca 100644 --- a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue +++ b/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue @@ -2,68 +2,40 @@ - - @@ -72,8 +44,14 @@ import ComponentStory from '@/components/component-story/ComponentStory.vue' import { prop, setting, slot } from '@/libs/story/story-param' import { text } from '@/libs/story/story-widget' +import VtsLoadingHero from '@core/components/state-hero/VtsLoadingHero.vue' import UiButton from '@core/components/ui/button/UiButton.vue' import UiCard from '@core/components/ui/card/UiCard.vue' -import UiSidePanel from '@core/components/ui/side-panel/UiSidePanel.vue' +import UiSidePanel from '@core/components/ui/panel/UiPanel.vue' import { faEdit, faTrash } from '@fortawesome/free-solid-svg-icons' +import { useToggle } from '@vueuse/core' +import { computed } from 'vue' + +const [isToggled, toggle] = useToggle() +const isReady = computed(() => isToggled.value) diff --git a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue b/@xen-orchestra/web-core/lib/components/ui/panel/UiPanel.vue similarity index 57% rename from @xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue rename to @xen-orchestra/web-core/lib/components/ui/panel/UiPanel.vue index cb568605c96..cdb80949a22 100644 --- a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue +++ b/@xen-orchestra/web-core/lib/components/ui/panel/UiPanel.vue @@ -1,37 +1,28 @@ - + From 9962cca6fc2280e6b8b7e1c3937b159d26d6db71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Thu, 7 Nov 2024 16:53:21 +0100 Subject: [PATCH 08/16] feat(xo-6): create side panel --- .../ui/side-panel/ui-side-panel.story.vue | 60 +++++++++++++++ .../components/ui/side-panel/UiSidePanel.vue | 77 +++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 @xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue create mode 100644 @xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue new file mode 100644 index 00000000000..993eb662648 --- /dev/null +++ b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue @@ -0,0 +1,60 @@ + + + diff --git a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue b/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue new file mode 100644 index 00000000000..cb5c4bb46f7 --- /dev/null +++ b/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue @@ -0,0 +1,77 @@ + + + + + + From 3d26260a92f5f0e60a98138a14484c73095c8a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Thu, 7 Nov 2024 22:12:13 +0100 Subject: [PATCH 09/16] feat(xo-6): display additional action in dropdown --- .../ui/side-panel/ui-side-panel.story.vue | 43 +++++++++-- .../components/ui/side-panel/UiSidePanel.vue | 73 ++++++++++++++++--- 2 files changed, 99 insertions(+), 17 deletions(-) diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue index 993eb662648..0bb33292f85 100644 --- a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue +++ b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue @@ -5,7 +5,8 @@ prop('state').type('states').enum('normal', 'empty', 'loading', 'error').preset('info').required().widget(), prop('busy').bool().widget(), prop('isError').bool().widget(), - setting('actions').widget(text()).preset('Button'), + setting('action1').widget(text()).preset('Edit'), + setting('action2').widget(text()).preset('Delete'), setting('isEmpty').widget(boolean()), slot(), slot('actions').help('Meant to receive UiButton'), @@ -15,19 +16,46 @@ Normal: { props: { busy: false, - error: false, + isError: false, + }, + settings: { + isEmpty: false, + }, + }, + Empty: { + props: { + busy: false, + isError: false, + }, + settings: { + isEmpty: true, + }, + }, + Error: { + props: { + busy: false, + isError: true, + }, + }, + Busy: { + props: { + busy: true, + isError: false, }, }, }" > From 6ee86524630f7fefa76596abe7c4b8ace1a0b668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Fri, 8 Nov 2024 10:47:51 +0100 Subject: [PATCH 12/16] feat(xo-6): remove duplicated component --- .../web-core/lib/assets/no-selection.svg | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 @xen-orchestra/web-core/lib/assets/no-selection.svg diff --git a/@xen-orchestra/web-core/lib/assets/no-selection.svg b/@xen-orchestra/web-core/lib/assets/no-selection.svg deleted file mode 100644 index fdf323b36f6..00000000000 --- a/@xen-orchestra/web-core/lib/assets/no-selection.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 0bd05f0c2ca454e0a442ee9e40cf52e92b83b97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Fri, 8 Nov 2024 10:49:10 +0100 Subject: [PATCH 13/16] feat(xo-6): remove duplicated component --- .../lib/components/ui/NoDataError.vue | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 @xen-orchestra/web-core/lib/components/ui/NoDataError.vue diff --git a/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue b/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue deleted file mode 100644 index 16b55e31d03..00000000000 --- a/@xen-orchestra/web-core/lib/components/ui/NoDataError.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - From 28d0c7cb26a23eabbacc44fb41752a22c4c85c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Wed, 13 Nov 2024 17:04:17 +0100 Subject: [PATCH 14/16] feat(xo-lite): delete duplicate --- .../ui/side-panel/ui-side-panel.story.vue | 79 ------------------- .../components/ui/side-panel/UiSidePanel.vue | 61 -------------- 2 files changed, 140 deletions(-) delete mode 100644 @xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue delete mode 100644 @xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue deleted file mode 100644 index f47fcf99172..00000000000 --- a/@xen-orchestra/lite/src/stories/web-core/ui/side-panel/ui-side-panel.story.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue b/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue deleted file mode 100644 index cb568605c96..00000000000 --- a/@xen-orchestra/web-core/lib/components/ui/side-panel/UiSidePanel.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - From 0aee141b4f80d58b64f1ef6b1c7d78ec0435dd27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastian=20Czech?= Date: Wed, 13 Nov 2024 17:09:29 +0100 Subject: [PATCH 15/16] feat(xo-lite): change toggle --- .../lite/src/stories/web-core/ui/panel/ui-panel.story.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue index c3ea870b6ca..af6907cb270 100644 --- a/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue +++ b/@xen-orchestra/lite/src/stories/web-core/ui/panel/ui-panel.story.vue @@ -21,9 +21,9 @@ }, }" > - Toggle