From 7c42147f4b45ebc43d9b5044b8a98f7504300d60 Mon Sep 17 00:00:00 2001 From: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:21:32 +0545 Subject: [PATCH] feat(frontend): mapper UI frontend refactor (#1830) * fix(merge): merge of branch development * fix(bottom-sheet): set default bottom sheet height 85vh * fix(editor): height fix * fix(editor): configure editor for both editable and non editable * fix(more): configure editable & non-editable editor to for comment & instructions resp * fix(+page): pass instructions as props to more component * fix(more): fix editor prop * fix(page): override unnecessary vertical padding add * fix(more): UI slicing for comment section * feat(icons): icons add * feat(more): instructions section UI slicing * feat(more): component broken down to smaller comment, activities components * feat(more): seperate comment & activities skeleton to another component * fix(+page): comment more component --- .../lib/components/common/Editor/editor.css | 3 +- .../components/common/Editor/editor.svelte | 28 +++++---- .../lib/components/common/bottom-sheet.svelte | 4 +- .../components/page/more/activities.svelte | 42 ++++++++++++++ .../lib/components/page/more/comment.svelte | 58 +++++++++++++++++++ .../src/lib/components/page/more/index.svelte | 30 ++++------ .../lib/components/skeleton/activities.svelte | 20 +++++++ .../lib/components/skeleton/comment.svelte | 17 ++++++ .../src/routes/[projectId]/+page.svelte | 6 +- src/mapper/src/styles/page.css | 4 ++ .../static/assets/icons/clock-history.svg | 5 ++ .../static/assets/icons/person-fill.svg | 3 + 12 files changed, 179 insertions(+), 41 deletions(-) create mode 100644 src/mapper/src/lib/components/page/more/activities.svelte create mode 100644 src/mapper/src/lib/components/page/more/comment.svelte create mode 100644 src/mapper/src/lib/components/skeleton/activities.svelte create mode 100644 src/mapper/src/lib/components/skeleton/comment.svelte create mode 100644 src/mapper/static/assets/icons/clock-history.svg create mode 100644 src/mapper/static/assets/icons/person-fill.svg diff --git a/src/mapper/src/lib/components/common/Editor/editor.css b/src/mapper/src/lib/components/common/Editor/editor.css index f482a7d7ac..8321a19509 100644 --- a/src/mapper/src/lib/components/common/Editor/editor.css +++ b/src/mapper/src/lib/components/common/Editor/editor.css @@ -2,13 +2,12 @@ outline: none !important; padding-left: 1rem; padding-right: 1rem; - height: 100px; + height: 100%; overflow-y: scroll; } @media screen and (max-width: 500px) { .tiptap { - height: 80px; overflow-y: scroll; } } diff --git a/src/mapper/src/lib/components/common/Editor/editor.svelte b/src/mapper/src/lib/components/common/Editor/editor.svelte index 5f24cb9dd6..ed17b91967 100644 --- a/src/mapper/src/lib/components/common/Editor/editor.svelte +++ b/src/mapper/src/lib/components/common/Editor/editor.svelte @@ -8,15 +8,22 @@ let element; let editor; + export let editable; + export let content; + export let setEditorHtmlContent; onMount(() => { editor = new Editor({ element: element, extensions: [StarterKit], - content: '', + content: content, onTransaction: () => { editor = editor; }, + editable: editable, + onUpdate: ({ editor }) => { + setEditorHtmlContent && setEditorHtmlContent(editor.getHTML()); + }, }); }); @@ -28,23 +35,14 @@
Localadmin
+#2
+2024-10-21 11:42
++ svcfmtm updated status to MAPPED +
+Localadmin
+#2
+2024-10-21 11:42
+