From dbc5ceea94a8739c9b01020e377aba34a8bef9b6 Mon Sep 17 00:00:00 2001
From: gaelle morin <gmorin.dev@gmail.com>
Date: Fri, 8 Jan 2021 23:31:48 +0100
Subject: [PATCH] fix: left-menu - icons alignment + feature: circle-edit and
 -profile

---
 package-lock.json                             | 14 ++---
 package.json                                  |  2 +-
 src/locales/en.json                           |  4 +-
 src/locales/es.json                           |  4 +-
 src/locales/fr.json                           |  4 +-
 src/styles/index.scss                         | 10 +++
 src/styles/left-nav/_index.scss               | 10 +--
 .../partials/admin/page-admin-circles.pug     |  2 +-
 .../partials/circle/page-circle-edit.pug      | 61 ++++++++++---------
 .../partials/circle/page-circle-profile.pug   |  4 +-
 src/views/partials/menu-left.pug              | 14 +++--
 11 files changed, 71 insertions(+), 58 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 40b1ac76..f9f36d8c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,7 +8,7 @@
       "version": "1.0.0",
       "license": "MIT",
       "dependencies": {
-        "@startinblox/hubl-styling-framework": "^1.0.20",
+        "@startinblox/hubl-styling-framework": "^1.0.21",
         "fs-extra": "^9.0.1",
         "normalize.css": "^8.0.1",
         "parcel-bundler": "^1.12.4",
@@ -1442,9 +1442,9 @@
       }
     },
     "node_modules/@startinblox/hubl-styling-framework": {
-      "version": "1.0.20",
-      "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.0.20.tgz",
-      "integrity": "sha512-Q9pFi2pzTkNQYHyKKmNJb53ddP2Ldx63HwZgODounK1EQ9CYPD9SJHDhHBT1ueGkde7fljipSXyLdgw54Odz+g=="
+      "version": "1.0.21",
+      "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.0.21.tgz",
+      "integrity": "sha512-LaKWMXwK4LNKgvsuVNLTSlNU2aoUk0VQgjfX0XSSPQskudIe675tS+hVRmCMH2Wtl2/MyWvscyYqX+2//zXnCQ=="
     },
     "node_modules/@types/q": {
       "version": "1.5.4",
@@ -10603,9 +10603,9 @@
       }
     },
     "@startinblox/hubl-styling-framework": {
-      "version": "1.0.20",
-      "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.0.20.tgz",
-      "integrity": "sha512-Q9pFi2pzTkNQYHyKKmNJb53ddP2Ldx63HwZgODounK1EQ9CYPD9SJHDhHBT1ueGkde7fljipSXyLdgw54Odz+g=="
+      "version": "1.0.21",
+      "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.0.21.tgz",
+      "integrity": "sha512-LaKWMXwK4LNKgvsuVNLTSlNU2aoUk0VQgjfX0XSSPQskudIe675tS+hVRmCMH2Wtl2/MyWvscyYqX+2//zXnCQ=="
     },
     "@types/q": {
       "version": "1.5.4",
diff --git a/package.json b/package.json
index 16907471..5e8750a7 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
     ]
   },
   "dependencies": {
-    "@startinblox/hubl-styling-framework": "^1.0.20",
+    "@startinblox/hubl-styling-framework": "^1.0.21",
     "fs-extra": "^9.0.1",
     "normalize.css": "^8.0.1",
     "parcel-bundler": "^1.12.4",
diff --git a/src/locales/en.json b/src/locales/en.json
index a2cbdcd9..9e26932d 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -80,8 +80,8 @@
       "labelStatus": "Circle status",
       "labelName": "Circle name *",
       "labelOwner": "Admin *",
-      "labelDescription": "Circle headline *",
-      "subTitle": "Members list :",
+      "labelDescription": "Circle headline",
+      "subTitle": "Members list",
       "tableHeader1": "Name",
       "tableHeader2": "Access",
       "buttonSubmit": "Save",
diff --git a/src/locales/es.json b/src/locales/es.json
index 0b0332ab..b33a7e23 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -80,8 +80,8 @@
       "labelStatus": "Estado del círculo",
       "labelName": "Nombre del círculo *",
       "labelOwner": "Administrador/a *",
-      "labelDescription": "Subtítulo del círculo *",
-      "subTitle": "Listado de miembrxs: ",
+      "labelDescription": "Subtítulo del círculo",
+      "subTitle": "Listado de miembrxs",
       "tableHeader1": "Nombre",
       "tableHeader2": "Acceso",
       "buttonSubmit": "Guardar",
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 3a63d0b1..75a4594d 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -80,8 +80,8 @@
       "labelStatus": "Statut du cercle",
       "labelName": "Nom du cercle *",
       "labelOwner": "Administrateur ou administratrice *",
-      "labelDescription": "Sous-titre du cercle *",
-      "subTitle": "Liste des membres :",
+      "labelDescription": "Sous-titre du cercle",
+      "subTitle": "Liste des membres",
       "tableHeader1": "Nom",
       "tableHeader2": "Accès",
       "buttonSubmit": "Enregistrer",
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 7ba7362a..7f91ddcd 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -30,11 +30,21 @@ solid-display>div {
   width: 50%;
 }
 
+.w33 {
+  width: 33.333%;
+}
+
+.w66 {
+  width: 66.666%;
+}
+
 .text-left {
   text-align: left;
 }
 
 
+
+
 @import 'header/_index';
 @import 'left-nav/_index';
 @import 'content/_index';
\ No newline at end of file
diff --git a/src/styles/left-nav/_index.scss b/src/styles/left-nav/_index.scss
index 4166ca87..066477f1 100644
--- a/src/styles/left-nav/_index.scss
+++ b/src/styles/left-nav/_index.scss
@@ -31,18 +31,16 @@ nav {
   .sub-menu-icon {
     margin-left: 3px;
     margin-right: 3px;
-    margin-top: 1px;
     opacity: 0.8;
     width: 12px;
-
-    div {
-      font-family: simple-line-icons;
-      font-size: 12px;
+    >div {
+      line-height: 19px;
     }
   }
 
   .sub-menu-name {
     margin-right: 15px;
+    vertical-align: middle;
   }
 
 
@@ -59,9 +57,11 @@ nav {
 
       @media(min-width: 1024px) {
         display: block;
+        line-height: 19px;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
+        width: 100%;
       }
     }
   }
diff --git a/src/views/partials/admin/page-admin-circles.pug b/src/views/partials/admin/page-admin-circles.pug
index 30cb6b4a..b1a23ca4 100644
--- a/src/views/partials/admin/page-admin-circles.pug
+++ b/src/views/partials/admin/page-admin-circles.pug
@@ -34,7 +34,7 @@ solid-router(default-route='admin-circle-list', hidden)
     div.segment.margin-bottom-medium.clearfix
       div.segment.lg-half.float-left
         h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle')
-      div.segment.lg-half.float-left.text-right.padding-top-xxsmall
+      div.segment.lg-half.float-left.text-right.padding-top-xxxsmall.padding-bottom-xxxsmall
         solid-ac-checker(data-src=`${endpoints.circles || (endpoints.post && endpoints.post.circles)}`, permission='acl:Append')
           solid-link(
             class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-plus'
diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug
index 77bd9b4a..12abd562 100644
--- a/src/views/partials/circle/page-circle-edit.pug
+++ b/src/views/partials/circle/page-circle-edit.pug
@@ -1,6 +1,6 @@
 solid-ac-checker(permission='acl:Read', bind-resources)
-  div.segment.padding-large.border-bottom.border-color-grey.clearfix
-    div.segment.lg-half.float-left
+  div.segment.lg-full.padding-large.border-bottom.border-color-grey
+    div.segment.lg-half
       solid-display.text-xxlarge.text-letter-spacing-large(
         bind-resources
         fields='name, dash, description'
@@ -10,10 +10,10 @@ solid-ac-checker(permission='acl:Read', bind-resources)
         class-name='text-color-heading text-bold'
         class-dash='text-color-heading text-bold'          
       )
-    div.segment.lg-half.float-left.text-right
+    div.segment.lg-half.text-right
       solid-link(class="backlink right", bind-resources, next='circle-profile' data-trans='circle.edit.backlink')
 
-div.segment.padding-large
+div.segment.lg-full.padding-large.whitespace-normal
 
   solid-widget(name="circle-edit-members-delete")
     template
@@ -25,6 +25,9 @@ div.segment.padding-large
           data-trans='data-label=circle.edit.buttonDelete'
         )
 
+  solid-widget(name='hubl-circle-edit-admin')
+    template ${value ? "Administrateur" : ""}
+
   solid-ac-checker(permission='acl:Write', bind-resources)
     div#loader-circle-edit.loader.loader-top
       div
@@ -32,14 +35,13 @@ div.segment.padding-large
       div
       div
     
-    solid-form.segment.clearfix.button-register(
+    solid-form.form(
       bind-resources
 
       fields='name, description, status, owner'
       required-status
       required-name
       required-owner
-      required-description
       range-owner=`${endpoints.users || endpoints.get.users}`
 
       label-status=''
@@ -50,12 +52,11 @@ div.segment.padding-large
       label-description=''
 
       class-name='segment margin-bottom-medium lg-half padding-right-small text-small text-semibold text-uppercase text-color-heading'
-      class-description='segment margin-bottom-medium lg-full text-small text-semibold text-uppercase text-color-heading'
-      class-status='segment margin-bottom-medium lg-half padding-right-small text-small text-semibold text-uppercase text-color-heading icon icon-magnify float-left'
-      class-owner='segment margin-bottom-medium lg-half padding-left-small text-small text-semibold text-uppercase text-color-heading float-left'
+      class-description='segment margin-bottom-medium lg-half padding-left-small text-small text-semibold text-uppercase text-color-heading'
+      class-status='segment margin-bottom-medium lg-half padding-right-small text-small text-semibold text-uppercase text-color-heading whitespace-normal'
+      class-owner='segment margin-bottom-medium lg-half padding-left-small text-small text-semibold text-uppercase text-color-heading whitespace-normal'
 
       widget-owner='solid-form-dropdown-autocompletion-label'
-      widget-description='solid-form-textarea'
 
       partial=''
 
@@ -65,10 +66,10 @@ div.segment.padding-large
       data-trans='label-status=circle.edit.labelStatus;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit'
     )
 
-  h3.segment.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.edit.subTitle')
+  h3.segment.lg-full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.edit.subTitle')
 
   solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
-    solid-form.block.segment.margin-bottom-xlarge.clearfix.button-register(
+    solid-form.block.segment.margin-bottom-xlarge.form(
       bind-resources 
       nested-field='members'
       fields='user'
@@ -84,37 +85,39 @@ div.segment.padding-large
   .table-wrapper
     .table
       div.table-header.bg-color-third.text-color-heading
-        div.table-cell.w280(data-trans='circle.edit.tableHeader1')
-        div.table-cell.w162(data-trans='circle.edit.tableHeader2')
+        div.table-cell.w66(data-trans='circle.edit.tableHeader1')
+        div.table-cell.w33(data-trans='circle.edit.tableHeader2')
 
       solid-display(
         class='table-body'
         bind-resources
         nested-field='members'
-        fields='classGroup(classGrid(user.account.picture, content(name-and-icon(user.name, user.groups), sub(atom, user.communities)))), self'
+        fields='cell(segment1(user.account.picture), segment2(line1(user.name, is_admin), line2(atom, user.communities))), self'
         loader-id='loader-circle-edit'
 
-        class-classGroup='table-cell w-280'
-        class-self='table-cell w-162'
-        class-classGrid='segment margin-left-xlarge user-thumb'
-        class-user.account.picture='user-thumb-avatar'
-        class-content='user-thumb-content'
-        class-name-and-icon='user-thumb-content__name-and-icon'
-        class-user.name='name'
-        class-user.groups='tag color-primary'
-        class-sub='user-thumb-content__sub-text community'
-        class-atom='icon icon-primary mdi-atom'
+        class-cell='table-cell w66 labelled-avatar two-lines text-left'
+        class-self='table-cell w33'
+
+        class-segment1='segment'
+        class-user.account.picture='avatar'
+
+        class-segment2='segment lg-three-quarter margin-left-xsmall'
+        class-line1='block'
+        class-user.name='text-semibold text-color-heading text-sub'
+        class-is_admin='segment margin-left-medium tag color-primary'
+        class-line2='block'
+        class-atom='icon icon-large icon-third mdi-atom margin-right-xxsmall'
+        class-user.communities='lg-full'
+
         multiple-user.communities
         multiple-user.communities-fields="community.name"
 
         widget-user.account.picture='hubl-user-avatar'
-
-        multiple-user.groups
-        multiple-user.groups-fields='name'
+        widget-is_admin='hubl-circle-edit-admin'
 
         action-self='self'
         widget-self='circle-edit-members-delete'
       )
 
       //- Only to show the table grid
-      div.table-cell.w162
+      div.table-cell.w33
diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug
index 3f774693..5b975aa9 100644
--- a/src/views/partials/circle/page-circle-profile.pug
+++ b/src/views/partials/circle/page-circle-profile.pug
@@ -34,8 +34,6 @@ solid-router(default-route='circle-profile', hidden)
         fields='creationDateSet(title, creationDate)'
         loader-id='loader-circle-profile'
 
-        class-title='word-spacing-right'
-
         value-title=''
         data-trans='value-title=circle.profile.creationDate'
 
@@ -96,7 +94,7 @@ solid-router(default-route='circle-profile', hidden)
         hubl-inherit-user-id="search-value-user"
       )
 
-    h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.profile.subTitle')
+    h3.text-color-heading.text-bold.text-uppercase.text-letter-spacing-large(data-trans='circle.profile.subTitle')
 
     solid-widget(name='hubl-circle-user-admin')
       template ${value ? "Administrateur" : ""}
diff --git a/src/views/partials/menu-left.pug b/src/views/partials/menu-left.pug
index 93a78f8d..35faf054 100644
--- a/src/views/partials/menu-left.pug
+++ b/src/views/partials/menu-left.pug
@@ -10,7 +10,9 @@ solid-widget(name='hubl-menu-jabberid')
 
 solid-widget(name='hubl-menu-publicprivate')
   template
-    div ${value == 'Public' ? '#' : 'î‚Ž'}
+    div.text-simple-line-icons(
+      class="${value == 'Public' ? 'text-large': 'text-xsmall'}"
+    ) ${value == 'Public' ? '#' : 'î‚Ž'}
 
 solid-widget(name='hubl-create-contact')
   template
@@ -50,13 +52,13 @@ solid-widget(name='hubl-menu-fix-url-circle')
       solid-display.segment.lg-full.text-color-white.heading-active.bg-color-heading.hover.active(
         data-src='${value}'
         fields='segment(status, circle(name, jabberID), badge)'
-        class-segment="segment lg-full padding-top-xxsmall padding-right-small padding-left-medium"
+        class-segment="segment lg-full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
 
         class-status='segment text-top sub-menu-icon'
 
         class-circle='segment lg-three-quarter sub-menu-name'
 
-        class-name='segment ellipsis-content'
+        class-name='ellipsis-content'
 
         class-badge='segment badge'
 
@@ -74,14 +76,14 @@ solid-widget(name='hubl-menu-fix-url-project')
       solid-display.segment.lg-full.text-color-white.heading-active.bg-color-heading.hover.active(
         data-src='${value}'
         fields='segment(status, project(customer.name, name, jabberID), badge)'
-        class-segment="segment lg-full padding-top-xxsmall padding-right-small padding-left-medium"
+        class-segment="segment lg-full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
 
         class-status='segment text-top sub-menu-icon'
 
         class-project='segment lg-three-quarter sub-menu-name'
 
-        class-customer.name='segment ellipsis-content'
-        class-name='segment ellipsis-content'
+        class-customer.name='ellipsis-content'
+        class-name='ellipsis-content'
 
         class-badge='segment badge text-top'
 
-- 
GitLab