From 8970a30cff99f9234617d7ec17067275dbfc7e43 Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Sun, 8 Sep 2024 04:13:43 -0400 Subject: work on fields menu --- .../views/nodes/DataVizBox/DocCreatorMenu.scss | 67 ++++++++++++++ .../views/nodes/DataVizBox/DocCreatorMenu.tsx | 102 +++++++++------------ 2 files changed, 111 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss b/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss index 955698b19..eaa32e62a 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss @@ -898,6 +898,7 @@ border: 1px solid rgb(180, 180, 180); margin: 5px; margin-top: 0px; + margin-bottom: 10px; border-radius: 3px; flex: 0 0 auto; gap: 25px; @@ -914,6 +915,7 @@ width: 100%; height: 20px; background-color: rgb(50, 50, 50); + color: rgb(168, 167, 167); } .opts-bar { @@ -934,11 +936,38 @@ } .content { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; height: calc(100% - 20px); width: 100%; background-color: rgb(50, 50, 50); border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; + resize: none; + + .bubbles { + display: none; + } + + .text { + margin-right: 5px; + } + + &:hover .bubbles { + display: flex; + flex-direction: row; + align-items: flex-start; + } + + &:hover .type-display { + display: none; + } + + .bubble { + margin: 3px; + } } } @@ -949,6 +978,33 @@ border-radius: 5px; background-color: rgb(50, 50, 50); box-shadow: 5px 5px rgb(29, 29, 31); + + .content { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + height: calc(100% - 20px); + width: 100%; + background-color: rgb(50, 50, 50); + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; + + .text { + margin-right: 9px; + } + + .bubbles { + display: flex; + flex-direction: row; + align-items: center; + } + + .bubble { + margin: 3px; + margin-right: 4px; + } + } } .desc-box { @@ -958,7 +1014,18 @@ border-radius: 5px; background-color: rgb(50, 50, 50); box-shadow: 5px 5px rgb(29, 29, 31); + + .content { + height: calc(100% - 20px); + width: 100%; + background-color: rgb(50, 50, 50); + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; + resize: none; + + } } + } } diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index 87e1e2c96..a01b26036 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -1179,24 +1179,24 @@ export class DocCreatorMenu extends ObservableReactComponent { } get dashboardContents(){ + const sizes: string[] = ['tiny', 'small', 'medium', 'large', 'huge']; - return ( -
-
- - -
-
- {/* {this.fieldsInfos.map((field, index) => -
-
- this.setColTitle(field, e.target.value)}/> -
- {field.type === TemplateFieldType.UNSET ? Select media type : null} + const fieldPanel = (field: Col) => { + return ( +
+
+ +
+
+
+
Title
+ -
-
-
Type
+
+
Valid Sizes
- +
+ {sizes.map(size => <> + {this.setColSize(field, size as TemplateFieldSize)}}/> +
{size}
+ )} +
-
-
-
Valid Sizes
-
- +
+
Description
+