From d1c2044c616075032ea4071426c359ffdec93598 Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Tue, 6 Apr 2021 17:42:28 +0200 Subject: [PATCH 01/34] bugfix: sib-ressource endpoints values --- src/views/page-resources.pug | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/page-resources.pug b/src/views/page-resources.pug index 0c98992..f90d0f2 100644 --- a/src/views/page-resources.pug +++ b/src/views/page-resources.pug @@ -1,7 +1,10 @@ div.whitespace-normal - solid-resource(data-src=`${component.endpoints.resources}` - range-resource-type=`${component.endpoints.resourcestypes}` - range-resource-keyword=`${component.endpoints.resourceskeywords}` + solid-resource(data-src=`${component.endpoints.get}` + post-data-src=`${component.endpoints.post}` + range-resource-type=`${component.endpoints.types}` + post-data-type-src=`${component.endpoints.postTypes}` + range-resource-keyword=`${component.endpoints.keywords}` + post-data-keyword-src=`${component.endpoints.postKeywords}` range-resource-circle=`${getComponent('circles').endpoints.get}/` associated-circle-label="" data-trans=`associated-circle-label=${component.parameters && component.parameters.associatedName ? component.parameters.associatedName : 'circle.extensions.associated'}` From bb21fae82a21be35d31fab53bb2fd46ac29a68c0 Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Tue, 6 Apr 2021 17:45:26 +0200 Subject: [PATCH 02/34] doc: update config.json sample for resource --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c58877a..68c35ea 100644 --- a/README.md +++ b/README.md @@ -525,12 +525,13 @@ Module declaration, on `config.json`: { "type": "resources", "endpoints": { - "get": "http://server.url/resources/", - "post": "http://server.url/resources/", - "types": "http://server.url/keywords/", - "keywords": "http://server.url/types/", - "postTypes": "http://server.url/keywords/", - "postKeywords": "http://server.url/types/" + "get": "https://api.test4.startinblox.com/resources/", + "post": "https://api.test4.startinblox.com/resources/", + "types": "https://api.test4.startinblox.com/types/", + "keywords": "https://api.test4.startinblox.com/keywords/", + "postTypes": "https://api.test4.startinblox.com/types/", + "postKeywords": "https://api.test4.startinblox.com/keywords/", + "uploads": "https://api.test4.startinblox.com/upload/" } } ``` From 35136e8b0ad9ec1299610bb2048002a40e700167 Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Tue, 6 Apr 2021 17:54:19 +0200 Subject: [PATCH 03/34] doc: update config.json sample for resource with https://server.url --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 68c35ea..497490c 100644 --- a/README.md +++ b/README.md @@ -525,13 +525,13 @@ Module declaration, on `config.json`: { "type": "resources", "endpoints": { - "get": "https://api.test4.startinblox.com/resources/", - "post": "https://api.test4.startinblox.com/resources/", - "types": "https://api.test4.startinblox.com/types/", - "keywords": "https://api.test4.startinblox.com/keywords/", - "postTypes": "https://api.test4.startinblox.com/types/", - "postKeywords": "https://api.test4.startinblox.com/keywords/", - "uploads": "https://api.test4.startinblox.com/upload/" + "get": "https://server.url/resources/", + "post": "https://server.url/resources/", + "types": "https://server.url/types/", + "keywords": "https://server.url/keywords/", + "postTypes": "https://server.url/types/", + "postKeywords": "https://server.url/keywords/", + "uploads": "https://server.url/upload/" } } ``` From afd6092014439ee308312d4b15c64e7a3aa34ddf Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 6 Apr 2021 16:05:56 +0000 Subject: [PATCH 04/34] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 497490c..5ab7d75 100644 --- a/README.md +++ b/README.md @@ -525,13 +525,13 @@ Module declaration, on `config.json`: { "type": "resources", "endpoints": { - "get": "https://server.url/resources/", - "post": "https://server.url/resources/", - "types": "https://server.url/types/", - "keywords": "https://server.url/keywords/", - "postTypes": "https://server.url/types/", - "postKeywords": "https://server.url/keywords/", - "uploads": "https://server.url/upload/" + "get": "http://server.url/resources/", + "post": "http://server.url/resources/", + "types": "http://server.url/types/", + "keywords": "http://server.url/keywords/", + "postTypes": "http://server.url/types/", + "postKeywords": "http://server.url/keywords/", + "uploads": "http://server.url/upload/" } } ``` From 9222c8d94990fca51cfcad10435001abb1db6efc Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Wed, 7 Apr 2021 06:50:58 +0200 Subject: [PATCH 05/34] update: bump resource to valid version 3.1 --- src/dependencies.pug | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index 283c1a3..d530a0f 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -43,9 +43,8 @@ if componentSet.has("profileDirectory") script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@5.1" defer) //- script(type="module" src="/lib/solid-directory/dist/index.js" defer) -//- Disabled - Not in core@0.16 if componentSet.has("resources") - script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.0", defer) + script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.1", defer) //- script(type="module" src="/lib/solid-resource/solid-resource.js" defer) if componentSet.has("themeChecker") From 5e345427627142acd11be6275c510adb6f58c579 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Tue, 13 Apr 2021 12:26:35 +0200 Subject: [PATCH 06/34] feature: New right menu on mobile - styles added --- src/styles/content/_index.scss | 32 ++++++++++++++++++++++---------- src/views/page-admin.pug | 2 +- src/views/page-circle.pug | 2 +- src/views/page-project.pug | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 40aed50..0a38228 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -55,7 +55,7 @@ main { vertical-align: middle; } - >solid-route { + /*>solid-route { &[active]>li { background-color: var(--color-heading); @@ -64,16 +64,30 @@ main { &:hover:not([active])>li { background: #E4E4E4; } - } + }*/ } /* Styles use with JS to open/close the sidebar */ &.jsRightMenu { display: block; + + @media (max-width: 768px) { + position: fixed; + top: 101px; + right: 3px; + height: auto; + box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.14); + } + solid-link[active] { color: white; background: var(--color-heading); + + >li { + border-bottom: 1px solid var(--color-heading); + } } + solid-link:not([active]):hover { background: #e4e4e4; } @@ -85,12 +99,12 @@ main { } /* Quick fix. When you got time, use animation on the span instead */ - @media (max-width: 768px) { + /*@media (max-width: 768px) { ul>li:first-child>span, ul>li:first-child>a { visibility: hidden; } - } + }*/ } &.jsRightMenu[open] { @@ -98,13 +112,13 @@ main { bottom: 0; right: 0; - @media(max-width: 768px) { + /*@media(max-width: 768px) { box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.12); min-width: 60%; position: fixed; top: 50px; z-index: 3000; - } + }*/ } } } @@ -122,7 +136,7 @@ main { height: 100vh; } -/* Custom scrollbar of the left-menu*/ +/* Custom scrollbar of the right-menu */ /* Works on Firefox*/ .scrollbar-nav { scrollbar-width: thin; @@ -146,9 +160,6 @@ main { } } - - - /* Custom scrollbar of the content */ /* Works on Firefox */ .scrollbar-content { @@ -172,6 +183,7 @@ main { border: 3px solid white; /* creates padding around scroll thumb */ } } +/* End scrollbar*/ solid-display-value-markdown { diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index a715eee..04198be 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -60,7 +60,7 @@ nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') .segment.whitespace-normal.text-color-heading.text-bold ul - li.segment.full.padding-small.text-normal.jsOffsiteToggle + li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.segment.full.text-right(hidden) span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall diff --git a/src/views/page-circle.pug b/src/views/page-circle.pug index f2ecede..a3a0868 100644 --- a/src/views/page-circle.pug +++ b/src/views/page-circle.pug @@ -44,7 +44,7 @@ nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`) ul - li.segment.full.padding-small.text-normal.jsOffsiteToggle + li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.segment.full.text-right(hidden) span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall diff --git a/src/views/page-project.pug b/src/views/page-project.pug index b79b4e9..834c13f 100644 --- a/src/views/page-project.pug +++ b/src/views/page-project.pug @@ -25,7 +25,7 @@ nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`) ul - li.segment.full.padding-small.text-normal.jsOffsiteToggle + li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.segment.full.text-right(hidden) span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall From 50f7d49810c72508036c9dabee4fd016b9656ce4 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Tue, 13 Apr 2021 16:11:28 +0200 Subject: [PATCH 07/34] patch: New right menu on mobile - JS added --- src/scripts/navigate-event.js | 37 +++++++++++++++++++ src/views/page-admin.pug | 2 +- .../partials/admin/page-admin-projects.pug | 5 ++- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index d2fc2e7..d7b8212 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -35,6 +35,43 @@ function openRightMenu() { ); } +const controls = document.querySelectorAll('.jsMobileSidebarControl'); +Array.from(controls).forEach(control => { + const button = control.querySelector('.jsMobileRightMenuButton'); + const rightMenu = control.querySelector('.jsRightMenu'); + + button.addEventListener("click", () => { + if (button.classList.contains('icon-close')) { + button.classList.remove('icon-close'); + button.classList.add('icon-options-vertical'); + console.log(rightMenu); + rightMenu.setAttribute('hidden', ''); + } + else { + button.classList.remove('icon-options-vertical'); + button.classList.add('icon-close'); + rightMenu.removeAttribute('hidden'); + } + }); +}); + + +/*const buttons = document.querySelectorAll(".jsMobileToggleRightMenu"); +Array.from(buttons).forEach(el => el.addEventListener("click", () => { + if (el.classList.contains('icon-close')) { + el.classList.remove('icon-close'); + el.classList.add('icon-options-vertical'); + const rightMenu = document.querySelectorAll(".jsRightMenu"); + rightMenu.classList.add("block"); + } + else { + el.classList.remove('icon-options-vertical'); + el.classList.add('icon-close'); + const rightMenu = document.querySelectorAll(".jsRightMenu"); + rightMenu.classList.add("sm-hidden"); + }; +}));*/ + document.addEventListener("DOMContentLoaded", function () { const componentSet = new Set(window.hubl.components.map(c => c.type)); diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index 04198be..8e06f40 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -1,4 +1,4 @@ -.with-sidebar.whitespace-normal.bg-color-white.only-on-admin(hidden) +.with-sidebar.jsMobileSidebarControl.whitespace-normal.bg-color-white.only-on-admin(hidden) .scrollbar-content.views-container.sidebar-is-closed for component of components if component.route diff --git a/src/views/partials/admin/page-admin-projects.pug b/src/views/partials/admin/page-admin-projects.pug index e7bdc26..6953b7c 100644 --- a/src/views/partials/admin/page-admin-projects.pug +++ b/src/views/partials/admin/page-admin-projects.pug @@ -1,5 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.list.title') + div.segment.full.sm-three-quarter + h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.list.title') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal From 38e9ab1d7be361b8180c2bc0bc7bff6a613a4932 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 14 Apr 2021 13:56:34 +0200 Subject: [PATCH 08/34] patch: New right menu on mobile - JS fixed + extended through admin --- src/scripts/navigate-event.js | 28 +++++++++++++++++-- .../partials/admin/page-admin-chat-create.pug | 6 ++-- src/views/partials/admin/page-admin-chat.pug | 5 +++- .../admin/page-admin-circles-create.pug | 6 ++-- .../partials/admin/page-admin-circles.pug | 5 +++- .../admin/page-admin-projects-create.pug | 6 ++-- 6 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index d7b8212..0e9f171 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -35,8 +35,30 @@ function openRightMenu() { ); } -const controls = document.querySelectorAll('.jsMobileSidebarControl'); -Array.from(controls).forEach(control => { +const control = document.querySelector('.jsMobileSidebarControl'); +const buttons = control.querySelectorAll('.jsMobileRightMenuButton'); +const rightMenu = control.querySelector('.jsRightMenu'); + +Array.from(buttons).forEach(button => + button.addEventListener("click", () => { + if (button.classList.contains('icon-close')) { + button.classList.remove('icon-close'); + button.classList.add('icon-options-vertical'); + rightMenu.setAttribute('hidden', ''); + } + else { + button.classList.remove('icon-options-vertical'); + button.classList.add('icon-close'); + rightMenu.removeAttribute('hidden'); + }; + }) +) + + + + + +/*Array.from(controls).forEach(control => { const button = control.querySelector('.jsMobileRightMenuButton'); const rightMenu = control.querySelector('.jsRightMenu'); @@ -53,7 +75,7 @@ Array.from(controls).forEach(control => { rightMenu.removeAttribute('hidden'); } }); -}); +});*/ /*const buttons = document.querySelectorAll(".jsMobileToggleRightMenu"); diff --git a/src/views/partials/admin/page-admin-chat-create.pug b/src/views/partials/admin/page-admin-chat-create.pug index 85ce2ff..ce0335c 100644 --- a/src/views/partials/admin/page-admin-chat-create.pug +++ b/src/views/partials/admin/page-admin-chat-create.pug @@ -1,8 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.padding-large.border-bottom.border-color-grey - div.segment.half.sm-full + div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') - div.segment.half.sm-hidden.text-right - solid-link(class="backlink", next=`admin-${getRoute('chat', true)}` data-trans='circle.create.backlink') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div#loader-users-title.loader.loader diff --git a/src/views/partials/admin/page-admin-chat.pug b/src/views/partials/admin/page-admin-chat.pug index 0d7fdf0..32a3a93 100644 --- a/src/views/partials/admin/page-admin-chat.pug +++ b/src/views/partials/admin/page-admin-chat.pug @@ -1,5 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') + div.segment.full.sm-three-quarter + h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal diff --git a/src/views/partials/admin/page-admin-circles-create.pug b/src/views/partials/admin/page-admin-circles-create.pug index ad90c8f..17f4f2f 100644 --- a/src/views/partials/admin/page-admin-circles-create.pug +++ b/src/views/partials/admin/page-admin-circles-create.pug @@ -1,8 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey - div.segment.half.sm-full + div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.create.title') - div.segment.half.sm-hidden.text-right - solid-link(class="backlink", next=`admin-${getRoute('circles', true)}` data-trans='circle.create.backlink') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.loader.loader-top(id=`loader-admin-${getComponent('circles').uniq}`) diff --git a/src/views/partials/admin/page-admin-circles.pug b/src/views/partials/admin/page-admin-circles.pug index 9aae27b..788532f 100644 --- a/src/views/partials/admin/page-admin-circles.pug +++ b/src/views/partials/admin/page-admin-circles.pug @@ -1,5 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title') + div.segment.full.sm-three-quarter + h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-padding-xsmall.sm-padding-top-xxsmall.whitespace-normal diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index 662b5e0..89e76cb 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -1,8 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey - div.segment.half.sm-full + div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.create.title') - div.segment.half.sm-hidden.text-right - solid-link(class="backlink", next=`admin-${getRoute('projects', true)}` data-trans='project.create.backlink') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.loader.loader-top(id=`loader-admin-${getComponent('projects').uniq}`) From 5084e21d1f24e98136845a39a142dd9c46c061f0 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 14 Apr 2021 18:33:54 +0200 Subject: [PATCH 09/34] patch: New right menu on mobile - JS fixed + extended through circle and project pages --- src/index.pug | 4 +-- src/scripts/navigate-event.js | 30 +++++++++++++++++-- src/styles/content/_index.scss | 5 ++-- src/views/page-admin.pug | 2 +- .../partials/circle/page-circle-chat.pug | 17 ++++++----- .../partials/circle/page-circle-edit.pug | 4 ++- .../partials/circle/page-circle-profile.pug | 17 ++++++----- .../partials/project/page-project-chat.pug | 25 +++++++++------- .../partials/project/page-project-edit.pug | 4 ++- .../partials/project/page-project-profile.pug | 25 +++++++++------- 10 files changed, 87 insertions(+), 46 deletions(-) diff --git a/src/index.pug b/src/index.pug index bbcaf98..fd4c073 100644 --- a/src/index.pug +++ b/src/index.pug @@ -99,7 +99,7 @@ html(lang="en") include views/page-messages.pug if component.type == "circles" - .with-sidebar.whitespace-normal + .with-sidebar.whitespace-normal.jsMobileContentSidebarControl hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.circles") hubl-reactivity(bind-user nested-field="circles" target-src="store://user") hubl-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`) @@ -141,7 +141,7 @@ html(lang="en") include views/page-polls.pug if component.type == "projects" - .with-sidebar.whitespace-normal + .with-sidebar.whitespace-normal.jsMobileContentSidebarControl hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.projects") hubl-reactivity(bind-user nested-field="projects" target-src="store://user") hubl-reactivity(data-src=`${component.endpoints.post}joinable/` target-src=`${component.endpoints.get}`) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index 0e9f171..7aa43d9 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -35,9 +35,9 @@ function openRightMenu() { ); } -const control = document.querySelector('.jsMobileSidebarControl'); -const buttons = control.querySelectorAll('.jsMobileRightMenuButton'); -const rightMenu = control.querySelector('.jsRightMenu'); +const adminControl = document.querySelector('.jsMobileSidebarAdminControl'); +const buttons = adminControl.querySelectorAll('.jsMobileRightMenuButton'); +const rightMenu = adminControl.querySelector('.jsRightMenu'); Array.from(buttons).forEach(button => button.addEventListener("click", () => { @@ -54,6 +54,30 @@ Array.from(buttons).forEach(button => }) ) +const contentControls = Array.from(document.querySelectorAll('.jsMobileContentSidebarControl')); + +contentControls.forEach( + contentControl => { + const contentSidebar = contentControl.querySelector('.jsRightMenu'); + const contentButtons = contentControl.querySelectorAll('.jsMobileRightMenuButton'); + + Array.from(contentButtons).forEach(contentButton => + contentButton.addEventListener('click', () => { + if (contentButton.classList.contains('icon-close')) { + contentButton.classList.remove('icon-close'); + contentButton.classList.add('icon-options-vertical'); + totosidebar.setAttribute('hidden', ''); + } + else { + contentButton.classList.remove('icon-options-vertical'); + contentButton.classList.add('icon-close'); + totosidebar.removeAttribute('hidden'); + }; + }) + ) + } +); + diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 0a38228..a65f419 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -55,7 +55,7 @@ main { vertical-align: middle; } - /*>solid-route { + >solid-route { &[active]>li { background-color: var(--color-heading); @@ -64,7 +64,7 @@ main { &:hover:not([active])>li { background: #E4E4E4; } - }*/ + } } /* Styles use with JS to open/close the sidebar */ @@ -76,6 +76,7 @@ main { top: 101px; right: 3px; height: auto; + z-index: 2999; box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.14); } diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index 8e06f40..81fb335 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -1,4 +1,4 @@ -.with-sidebar.jsMobileSidebarControl.whitespace-normal.bg-color-white.only-on-admin(hidden) +.with-sidebar.jsMobileSidebarAdminControl.whitespace-normal.bg-color-white.only-on-admin(hidden) .scrollbar-content.views-container.sidebar-is-closed for component of components if component.route diff --git a/src/views/partials/circle/page-circle-chat.pug b/src/views/partials/circle/page-circle-chat.pug index 16a1ebf..8d55b39 100644 --- a/src/views/partials/circle/page-circle-chat.pug +++ b/src/views/partials/circle/page-circle-chat.pug @@ -1,13 +1,16 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - solid-display.text-xxlarge.text-letter-spacing-large( - bind-resources - fields='name, dash, subtitle' + div.segment.full.sm-three-quarter + solid-display.text-xxlarge.text-letter-spacing-large( + bind-resources + fields='name, dash, subtitle' - value-dash=' - ' + value-dash=' - ' - class-name='text-color-heading text-bold' - class-dash='text-color-heading text-bold' - ) + class-name='text-color-heading text-bold' + class-dash='text-color-heading text-bold' + ) + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading .chat-view.segment.full.whitespace-normal solid-xmpp-chat( diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug index 7249a40..8e4bbd7 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.full.padding-large.border-bottom.border-color-grey - div.segment.half.sm-full + div.segment.half.sm-three-quarter solid-display.text-xxlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' @@ -12,6 +12,8 @@ solid-ac-checker(permission='acl:Read', bind-resources) ) div.segment.half.sm-hidden.text-right solid-link(class="backlink", bind-resources, next=`${component.route}-profile` data-trans='circle.edit.backlink') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.whitespace-normal diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug index 30a5b43..4a35005 100644 --- a/src/views/partials/circle/page-circle-profile.pug +++ b/src/views/partials/circle/page-circle-profile.pug @@ -9,15 +9,18 @@ div( ) solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - solid-display.text-xxlarge.text-letter-spacing-large( - bind-resources - fields='name, dash, subtitle' + div.segment.full.sm-three-quarter + solid-display.text-xxlarge.text-letter-spacing-large( + bind-resources + fields='name, dash, subtitle' - value-dash=' - ' + value-dash=' - ' - class-name='text-color-heading text-bold' - class-dash='text-color-heading text-bold' - ) + class-name='text-color-heading text-bold' + class-dash='text-color-heading text-bold' + ) + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.loader(id=`loader-${component.route}-profile-1`) diff --git a/src/views/partials/project/page-project-chat.pug b/src/views/partials/project/page-project-chat.pug index 6130ed1..e458583 100644 --- a/src/views/partials/project/page-project-chat.pug +++ b/src/views/partials/project/page-project-chat.pug @@ -1,17 +1,20 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - solid-display.text-xxlarge.text-letter-spacing-large( - bind-resources - fields='const-title1, number, customer.name, dash, name' + div.segment.full.sm-three-quarter + solid-display.text-xxlarge.text-letter-spacing-large( + bind-resources + fields='const-title1, number, customer.name, dash, name' - class-const-title1='text-color-heading text-bold text-uppercase' - class-number='text-color-heading text-bold text-uppercase word-spacing-right' - class-customer.name='text-color-heading text-bold text-uppercase' - class-dash='text-color-heading text-bold text-xlarge' - class-name='' + class-const-title1='text-color-heading text-bold text-uppercase' + class-number='text-color-heading text-bold text-uppercase word-spacing-right' + class-customer.name='text-color-heading text-bold text-uppercase' + class-dash='text-color-heading text-bold text-xlarge' + class-name='' - value-const-title1='N°' - value-dash=' - ' - ) + value-const-title1='N°' + value-dash=' - ' + ) + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading .chat-view.segment.full.whitespace-normal solid-xmpp-chat( diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index 325ff6b..b70343b 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -1,6 +1,6 @@ solid-ac-checker(permission='acl:Read', bind-resources) div.segment.full.padding-large.border-bottom.border-color-grey - div.segment.half.sm-full + div.segment.half.sm-three-quarter solid-display.text-xxlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' @@ -16,6 +16,8 @@ solid-ac-checker(permission='acl:Read', bind-resources) ) div.segment.half.sm-hidden.text-right solid-link(class='backlink', bind-resources, next=`${component.route}-profile` data-trans='project.edit.backlink') + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.whitespace-normal diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index 9620c6d..0a9f023 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -9,19 +9,22 @@ div( ) solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - solid-display.text-xxlarge.text-letter-spacing-large( - bind-resources - fields='const-title1, number, customer.name, dash, name' + div.segment.full.sm-three-quarter + solid-display.text-xxlarge.text-letter-spacing-large( + bind-resources + fields='const-title1, number, customer.name, dash, name' - class-const-title1='text-color-heading text-bold text-uppercase' - class-number='text-color-heading text-bold text-uppercase word-spacing-right' - class-customer.name='text-color-heading text-bold text-uppercase' - class-dash='text-color-heading text-bold text-xlarge' - class-name='' + class-const-title1='text-color-heading text-bold text-uppercase' + class-number='text-color-heading text-bold text-uppercase word-spacing-right' + class-customer.name='text-color-heading text-bold text-uppercase' + class-dash='text-color-heading text-bold text-xlarge' + class-name='' - value-const-title1='N°' - value-dash=' - ' - ) + value-const-title1='N°' + value-dash=' - ' + ) + div.segment.lg-hidden.sm-quarter.text-right + div.jsMobileRightMenuButton.icon.icon-close.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.loader(id=`loader-${component.route}-profile`) From 2c048943a6eb67ba6ca0e3f0bc5499268cbb8b79 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 15 Apr 2021 09:00:21 +0200 Subject: [PATCH 10/34] patch: New right menu on mobile - clean up --- src/scripts/navigate-event.js | 44 ++--------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index 7aa43d9..c847392 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -66,58 +66,18 @@ contentControls.forEach( if (contentButton.classList.contains('icon-close')) { contentButton.classList.remove('icon-close'); contentButton.classList.add('icon-options-vertical'); - totosidebar.setAttribute('hidden', ''); + contentSidebar.setAttribute('hidden', ''); } else { contentButton.classList.remove('icon-options-vertical'); contentButton.classList.add('icon-close'); - totosidebar.removeAttribute('hidden'); + contentSidebar.removeAttribute('hidden'); }; }) ) } ); - - - - -/*Array.from(controls).forEach(control => { - const button = control.querySelector('.jsMobileRightMenuButton'); - const rightMenu = control.querySelector('.jsRightMenu'); - - button.addEventListener("click", () => { - if (button.classList.contains('icon-close')) { - button.classList.remove('icon-close'); - button.classList.add('icon-options-vertical'); - console.log(rightMenu); - rightMenu.setAttribute('hidden', ''); - } - else { - button.classList.remove('icon-options-vertical'); - button.classList.add('icon-close'); - rightMenu.removeAttribute('hidden'); - } - }); -});*/ - - -/*const buttons = document.querySelectorAll(".jsMobileToggleRightMenu"); -Array.from(buttons).forEach(el => el.addEventListener("click", () => { - if (el.classList.contains('icon-close')) { - el.classList.remove('icon-close'); - el.classList.add('icon-options-vertical'); - const rightMenu = document.querySelectorAll(".jsRightMenu"); - rightMenu.classList.add("block"); - } - else { - el.classList.remove('icon-options-vertical'); - el.classList.add('icon-close'); - const rightMenu = document.querySelectorAll(".jsRightMenu"); - rightMenu.classList.add("sm-hidden"); - }; -}));*/ - document.addEventListener("DOMContentLoaded", function () { const componentSet = new Set(window.hubl.components.map(c => c.type)); From 4399ed4a42068890696fdc501e781863829d27fb Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 15 Apr 2021 10:06:06 +0200 Subject: [PATCH 11/34] patch: New right menu on mobile - paddings and font sizes realigned --- src/styles/content/_index.scss | 4 ++-- src/views/partials/circle/page-circle-chat.pug | 2 +- src/views/partials/circle/page-circle-edit.pug | 2 +- src/views/partials/circle/page-circle-profile.pug | 2 +- src/views/partials/project/page-project-chat.pug | 2 +- src/views/partials/project/page-project-edit.pug | 4 ++-- src/views/partials/project/page-project-profile.pug | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index a65f419..c3509ce 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -73,8 +73,8 @@ main { @media (max-width: 768px) { position: fixed; - top: 101px; - right: 3px; + top: 99px; + right: 0; height: auto; z-index: 2999; box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.14); diff --git a/src/views/partials/circle/page-circle-chat.pug b/src/views/partials/circle/page-circle-chat.pug index 8d55b39..4bff338 100644 --- a/src/views/partials/circle/page-circle-chat.pug +++ b/src/views/partials/circle/page-circle-chat.pug @@ -1,6 +1,6 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug index 8e4bbd7..80e9842 100644 --- a/src/views/partials/circle/page-circle-edit.pug +++ b/src/views/partials/circle/page-circle-edit.pug @@ -1,7 +1,7 @@ solid-ac-checker(permission='acl:Read', bind-resources) div.segment.full.padding-large.border-bottom.border-color-grey div.segment.half.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug index 4a35005..2e612a1 100644 --- a/src/views/partials/circle/page-circle-profile.pug +++ b/src/views/partials/circle/page-circle-profile.pug @@ -10,7 +10,7 @@ div( solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/project/page-project-chat.pug b/src/views/partials/project/page-project-chat.pug index e458583..8007660 100644 --- a/src/views/partials/project/page-project-chat.pug +++ b/src/views/partials/project/page-project-chat.pug @@ -1,6 +1,6 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index b70343b..ec72b5e 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -1,7 +1,7 @@ solid-ac-checker(permission='acl:Read', bind-resources) - div.segment.full.padding-large.border-bottom.border-color-grey + div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.half.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index 0a9f023..28c1372 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -10,7 +10,7 @@ div( solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.sm-three-quarter - solid-display.text-xxlarge.text-letter-spacing-large( + solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' From c4e3e6a2ce8230c13f30f75fe6493ac080e65a07 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 15 Apr 2021 10:39:05 +0200 Subject: [PATCH 12/34] patch: New right menu on mobile - whitespace added --- src/styles/content/_index.scss | 16 ---------------- .../partials/admin/page-admin-chat-create.pug | 2 ++ .../partials/admin/page-admin-circles-create.pug | 2 ++ .../admin/page-admin-projects-create.pug | 2 ++ src/views/partials/circle/page-circle-chat.pug | 2 +- src/views/partials/circle/page-circle-edit.pug | 2 +- .../partials/circle/page-circle-profile.pug | 2 +- src/views/partials/project/page-project-chat.pug | 2 +- src/views/partials/project/page-project-edit.pug | 2 +- .../partials/project/page-project-profile.pug | 2 +- 10 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index c3509ce..71b14af 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -98,28 +98,12 @@ main { @media (min-width: 768.01px) { transform: translate(152px); } - - /* Quick fix. When you got time, use animation on the span instead */ - /*@media (max-width: 768px) { - ul>li:first-child>span, - ul>li:first-child>a { - visibility: hidden; - } - }*/ } &.jsRightMenu[open] { display: block; bottom: 0; right: 0; - - /*@media(max-width: 768px) { - box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.12); - min-width: 60%; - position: fixed; - top: 50px; - z-index: 3000; - }*/ } } } diff --git a/src/views/partials/admin/page-admin-chat-create.pug b/src/views/partials/admin/page-admin-chat-create.pug index ce0335c..e6b4207 100644 --- a/src/views/partials/admin/page-admin-chat-create.pug +++ b/src/views/partials/admin/page-admin-chat-create.pug @@ -1,6 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.padding-large.border-bottom.border-color-grey div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') + div.segment.half.sm-hidden.text-right + solid-link(class="backlink", next=`admin-${getRoute('chat', true)}` data-trans='circle.create.backlink') div.segment.lg-hidden.sm-quarter.text-right div.jsMobileRightMenuButton.icon.icon-close.icon-heading diff --git a/src/views/partials/admin/page-admin-circles-create.pug b/src/views/partials/admin/page-admin-circles-create.pug index 17f4f2f..d5b7e6c 100644 --- a/src/views/partials/admin/page-admin-circles-create.pug +++ b/src/views/partials/admin/page-admin-circles-create.pug @@ -1,6 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.create.title') + div.segment.half.sm-hidden.text-right + solid-link(class="backlink", next=`admin-${getRoute('circles', true)}` data-trans='circle.create.backlink') div.segment.lg-hidden.sm-quarter.text-right div.jsMobileRightMenuButton.icon.icon-close.icon-heading diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index 89e76cb..8dd66fe 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -1,6 +1,8 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.create.title') + div.segment.half.sm-hidden.text-right + solid-link(class="backlink", next=`admin-${getRoute('projects', true)}` data-trans='project.create.backlink') div.segment.lg-hidden.sm-quarter.text-right div.jsMobileRightMenuButton.icon.icon-close.icon-heading diff --git a/src/views/partials/circle/page-circle-chat.pug b/src/views/partials/circle/page-circle-chat.pug index 4bff338..c2a5a48 100644 --- a/src/views/partials/circle/page-circle-chat.pug +++ b/src/views/partials/circle/page-circle-chat.pug @@ -1,5 +1,5 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - div.segment.full.sm-three-quarter + div.segment.full.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug index 80e9842..fbad418 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.full.padding-large.border-bottom.border-color-grey - div.segment.half.sm-three-quarter + div.segment.half.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug index 2e612a1..d4f92fd 100644 --- a/src/views/partials/circle/page-circle-profile.pug +++ b/src/views/partials/circle/page-circle-profile.pug @@ -9,7 +9,7 @@ div( ) solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - div.segment.full.sm-three-quarter + div.segment.full.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='name, dash, subtitle' diff --git a/src/views/partials/project/page-project-chat.pug b/src/views/partials/project/page-project-chat.pug index 8007660..8357e17 100644 --- a/src/views/partials/project/page-project-chat.pug +++ b/src/views/partials/project/page-project-chat.pug @@ -1,5 +1,5 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - div.segment.full.sm-three-quarter + div.segment.full.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index ec72b5e..659f552 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -1,6 +1,6 @@ solid-ac-checker(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - div.segment.half.sm-three-quarter + div.segment.half.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index 28c1372..ceb5ffa 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -9,7 +9,7 @@ div( ) solid-ac-checker.segment.block(permission='acl:Read', bind-resources) div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal - div.segment.full.sm-three-quarter + div.segment.full.sm-three-quarter.whitespace-normal solid-display.text-xlarge.text-letter-spacing-large( bind-resources fields='const-title1, number, customer.name, dash, name' From db3d1581163b9bc37114854bbbc10d0c3ee44761 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Thu, 15 Apr 2021 13:13:48 +0200 Subject: [PATCH 13/34] patch: New right menu on mobile - default behavior fixed --- src/scripts/navigate-event.js | 8 ++++---- src/styles/content/_index.scss | 4 +++- src/views/page-admin.pug | 2 +- src/views/page-circle.pug | 2 +- src/views/page-project.pug | 2 +- src/views/partials/admin/page-admin-chat-create.pug | 2 +- src/views/partials/admin/page-admin-chat.pug | 2 +- src/views/partials/admin/page-admin-circles-create.pug | 2 +- src/views/partials/admin/page-admin-circles.pug | 2 +- src/views/partials/admin/page-admin-projects-create.pug | 2 +- src/views/partials/admin/page-admin-projects.pug | 2 +- src/views/partials/circle/page-circle-chat.pug | 2 +- src/views/partials/circle/page-circle-edit.pug | 2 +- src/views/partials/circle/page-circle-profile.pug | 2 +- src/views/partials/project/page-project-chat.pug | 2 +- src/views/partials/project/page-project-edit.pug | 2 +- src/views/partials/project/page-project-profile.pug | 2 +- 17 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index c847392..739df7a 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -44,12 +44,12 @@ Array.from(buttons).forEach(button => if (button.classList.contains('icon-close')) { button.classList.remove('icon-close'); button.classList.add('icon-options-vertical'); - rightMenu.setAttribute('hidden', ''); + rightMenu.classList.add('sm-hidden'); } else { button.classList.remove('icon-options-vertical'); button.classList.add('icon-close'); - rightMenu.removeAttribute('hidden'); + rightMenu.classList.remove('sm-hidden'); }; }) ) @@ -66,12 +66,12 @@ contentControls.forEach( if (contentButton.classList.contains('icon-close')) { contentButton.classList.remove('icon-close'); contentButton.classList.add('icon-options-vertical'); - contentSidebar.setAttribute('hidden', ''); + contentSidebar.classList.add('sm-hidden'); } else { contentButton.classList.remove('icon-options-vertical'); contentButton.classList.add('icon-close'); - contentSidebar.removeAttribute('hidden'); + contentSidebar.classList.remove('sm-hidden'); }; }) ) diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 71b14af..8ca009f 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -69,7 +69,9 @@ main { /* Styles use with JS to open/close the sidebar */ &.jsRightMenu { - display: block; + @media (min-width: 768,01px) { + display: block; + } @media (max-width: 768px) { position: fixed; diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index 81fb335..f7adb47 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -57,7 +57,7 @@ ) include partials/admin/page-admin-chat-create.pug - nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') + nav.jsRightMenu.segment.sm-hidden.text-disable-selection.sidebar.whitespace-normal(role='navigation') .segment.whitespace-normal.text-color-heading.text-bold ul li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle diff --git a/src/views/page-circle.pug b/src/views/page-circle.pug index a3a0868..dbb98ef 100644 --- a/src/views/page-circle.pug +++ b/src/views/page-circle.pug @@ -41,7 +41,7 @@ ) include partials/circle/page-circle-polls.pug -nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') +nav.jsRightMenu.segment.sm-hidden.text-disable-selection.sidebar.whitespace-normal(role='navigation') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`) ul li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle diff --git a/src/views/page-project.pug b/src/views/page-project.pug index 834c13f..43e415a 100644 --- a/src/views/page-project.pug +++ b/src/views/page-project.pug @@ -22,7 +22,7 @@ ) include partials/project/page-project-picture.pug -nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') +nav.jsRightMenu.segment.sm-hidden.text-disable-selection.sidebar.whitespace-normal(role='navigation') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`) ul li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle diff --git a/src/views/partials/admin/page-admin-chat-create.pug b/src/views/partials/admin/page-admin-chat-create.pug index e6b4207..b59d8a1 100644 --- a/src/views/partials/admin/page-admin-chat-create.pug +++ b/src/views/partials/admin/page-admin-chat-create.pug @@ -4,7 +4,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.half.sm-hidden.text-right solid-link(class="backlink", next=`admin-${getRoute('chat', true)}` data-trans='circle.create.backlink') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div#loader-users-title.loader.loader diff --git a/src/views/partials/admin/page-admin-chat.pug b/src/views/partials/admin/page-admin-chat.pug index 32a3a93..8af7019 100644 --- a/src/views/partials/admin/page-admin-chat.pug +++ b/src/views/partials/admin/page-admin-chat.pug @@ -2,7 +2,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal diff --git a/src/views/partials/admin/page-admin-circles-create.pug b/src/views/partials/admin/page-admin-circles-create.pug index d5b7e6c..696e627 100644 --- a/src/views/partials/admin/page-admin-circles-create.pug +++ b/src/views/partials/admin/page-admin-circles-create.pug @@ -4,7 +4,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.half.sm-hidden.text-right solid-link(class="backlink", next=`admin-${getRoute('circles', true)}` data-trans='circle.create.backlink') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.loader.loader-top(id=`loader-admin-${getComponent('circles').uniq}`) diff --git a/src/views/partials/admin/page-admin-circles.pug b/src/views/partials/admin/page-admin-circles.pug index 788532f..e9c9843 100644 --- a/src/views/partials/admin/page-admin-circles.pug +++ b/src/views/partials/admin/page-admin-circles.pug @@ -2,7 +2,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-padding-xsmall.sm-padding-top-xxsmall.whitespace-normal diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index 8dd66fe..467b7ae 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -4,7 +4,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.half.sm-hidden.text-right solid-link(class="backlink", next=`admin-${getRoute('projects', true)}` data-trans='project.create.backlink') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.loader.loader-top(id=`loader-admin-${getComponent('projects').uniq}`) diff --git a/src/views/partials/admin/page-admin-projects.pug b/src/views/partials/admin/page-admin-projects.pug index 6953b7c..1258c55 100644 --- a/src/views/partials/admin/page-admin-projects.pug +++ b/src/views/partials/admin/page-admin-projects.pug @@ -2,7 +2,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p div.segment.full.sm-three-quarter h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.list.title') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal diff --git a/src/views/partials/circle/page-circle-chat.pug b/src/views/partials/circle/page-circle-chat.pug index c2a5a48..80ad844 100644 --- a/src/views/partials/circle/page-circle-chat.pug +++ b/src/views/partials/circle/page-circle-chat.pug @@ -10,7 +10,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p class-dash='text-color-heading text-bold' ) div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading .chat-view.segment.full.whitespace-normal solid-xmpp-chat( diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug index fbad418..a7154f0 100644 --- a/src/views/partials/circle/page-circle-edit.pug +++ b/src/views/partials/circle/page-circle-edit.pug @@ -13,7 +13,7 @@ solid-ac-checker(permission='acl:Read', bind-resources) div.segment.half.sm-hidden.text-right solid-link(class="backlink", bind-resources, next=`${component.route}-profile` data-trans='circle.edit.backlink') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.whitespace-normal diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug index d4f92fd..cf29c68 100644 --- a/src/views/partials/circle/page-circle-profile.pug +++ b/src/views/partials/circle/page-circle-profile.pug @@ -20,7 +20,7 @@ div( class-dash='text-color-heading text-bold' ) div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.loader(id=`loader-${component.route}-profile-1`) diff --git a/src/views/partials/project/page-project-chat.pug b/src/views/partials/project/page-project-chat.pug index 8357e17..0af8628 100644 --- a/src/views/partials/project/page-project-chat.pug +++ b/src/views/partials/project/page-project-chat.pug @@ -14,7 +14,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p value-dash=' - ' ) div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading .chat-view.segment.full.whitespace-normal solid-xmpp-chat( diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index 659f552..08ff1a7 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -17,7 +17,7 @@ solid-ac-checker(permission='acl:Read', bind-resources) div.segment.half.sm-hidden.text-right solid-link(class='backlink', bind-resources, next=`${component.route}-profile` data-trans='project.edit.backlink') div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.whitespace-normal diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index ceb5ffa..ca86e47 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -24,7 +24,7 @@ div( value-dash=' - ' ) div.segment.lg-hidden.sm-quarter.text-right - div.jsMobileRightMenuButton.icon.icon-close.icon-heading + div.jsMobileRightMenuButton.icon.icon-options-vertical.icon-heading div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.loader(id=`loader-${component.route}-profile`) From a752e44e066c5df9fb9b2a0522589155af3be914 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Thu, 15 Apr 2021 21:49:06 +0200 Subject: [PATCH 14/34] fix: js right menu handler --- src/scripts/navigate-event.js | 97 ++++++++++--------- src/styles/content/_index.scss | 4 + src/views/page-admin.pug | 2 +- .../partials/admin/page-admin-chat-create.pug | 12 +-- 4 files changed, 62 insertions(+), 53 deletions(-) diff --git a/src/scripts/navigate-event.js b/src/scripts/navigate-event.js index 739df7a..9fb041a 100644 --- a/src/scripts/navigate-event.js +++ b/src/scripts/navigate-event.js @@ -19,13 +19,27 @@ function closeRightMenu() { el.querySelector('.text-right').setAttribute('hidden', ''); el.querySelector('.text-left').removeAttribute('hidden'); }); - Array.from(rightMenu).forEach(el => el.removeAttribute("open")); + Array.from(rightMenu).forEach(el => { + el.removeAttribute("open"); + el.classList.add('sm-hidden'); + Array.from(el.parentElement.querySelectorAll('.jsMobileRightMenuButton')).forEach(ac => { + ac.classList.remove('icon-close'); + ac.classList.add('icon-options-vertical'); + }); + }); } } function openRightMenu() { let rightMenu = document.querySelectorAll(".jsRightMenu"); - Array.from(rightMenu).forEach(el => el.setAttribute("open", "")); + Array.from(rightMenu).forEach(el => { + el.setAttribute("open", ""); + el.classList.remove('sm-hidden'); + Array.from(el.parentElement.querySelectorAll('.jsMobileRightMenuButton')).forEach(ac => { + ac.classList.remove('icon-options-vertical'); + ac.classList.add('icon-close'); + }); + }); Array.from(document.querySelectorAll(".jsOffsiteToggle")).forEach(el => { el.querySelector('.text-left').setAttribute('hidden', ''); el.querySelector('.text-right').removeAttribute('hidden'); @@ -35,48 +49,31 @@ function openRightMenu() { ); } -const adminControl = document.querySelector('.jsMobileSidebarAdminControl'); -const buttons = adminControl.querySelectorAll('.jsMobileRightMenuButton'); -const rightMenu = adminControl.querySelector('.jsRightMenu'); - -Array.from(buttons).forEach(button => - button.addEventListener("click", () => { - if (button.classList.contains('icon-close')) { - button.classList.remove('icon-close'); - button.classList.add('icon-options-vertical'); - rightMenu.classList.add('sm-hidden'); - } - else { - button.classList.remove('icon-options-vertical'); - button.classList.add('icon-close'); - rightMenu.classList.remove('sm-hidden'); - }; - }) -) - -const contentControls = Array.from(document.querySelectorAll('.jsMobileContentSidebarControl')); - -contentControls.forEach( - contentControl => { - const contentSidebar = contentControl.querySelector('.jsRightMenu'); - const contentButtons = contentControl.querySelectorAll('.jsMobileRightMenuButton'); - - Array.from(contentButtons).forEach(contentButton => - contentButton.addEventListener('click', () => { - if (contentButton.classList.contains('icon-close')) { - contentButton.classList.remove('icon-close'); - contentButton.classList.add('icon-options-vertical'); - contentSidebar.classList.add('sm-hidden'); - } - else { - contentButton.classList.remove('icon-options-vertical'); - contentButton.classList.add('icon-close'); - contentSidebar.classList.remove('sm-hidden'); - }; - }) - ) +function closeRightMobileMenu() { + let rightMenu = document.querySelectorAll(".jsRightMenu"); + if (Array.from(rightMenu).filter(el => el.hasAttribute("mobile-open")).length > 0) { + Array.from(rightMenu).forEach(el => { + el.removeAttribute("mobile-open"); + el.classList.add('sm-hidden'); + Array.from(el.parentElement.querySelectorAll('.jsMobileRightMenuButton')).forEach(ac => { + ac.classList.remove('icon-close'); + ac.classList.add('icon-options-vertical'); + }); + }); } -); +} + +function openRightMobileMenu() { + let rightMenu = document.querySelectorAll(".jsRightMenu"); + Array.from(rightMenu).forEach(el => { + el.setAttribute("mobile-open", ""); + el.classList.remove('sm-hidden'); + Array.from(el.parentElement.querySelectorAll('.jsMobileRightMenuButton')).forEach(ac => { + ac.classList.remove('icon-options-vertical'); + ac.classList.add('icon-close'); + }); + }); +} document.addEventListener("DOMContentLoaded", function () { const componentSet = new Set(window.hubl.components.map(c => c.type)); @@ -155,9 +152,11 @@ document.addEventListener("DOMContentLoaded", function () { closeLeftMenu(); } if ( - !event.target.closest(".jsOffsiteToggle") + !event.target.closest(".jsOffsiteToggle") && + !event.target.classList.contains('jsMobileRightMenuButton') ) { closeRightMenu(); + closeRightMobileMenu(); } }); @@ -168,6 +167,7 @@ document.addEventListener("DOMContentLoaded", function () { closeUserControls(); closeLeftMenu(); closeRightMenu(); + closeRightMobileMenu(); } }; @@ -195,10 +195,15 @@ document.addEventListener("DOMContentLoaded", function () { }); }); - Array.from(document.querySelectorAll(".jsMobileSidebarOpenButton")).forEach( + + Array.from(document.querySelectorAll(".jsMobileRightMenuButton")).forEach( el => { el.addEventListener("click", () => { - openRightMenu(); + if (el.closest('.jsMobileContentSidebarControl').querySelector('nav.jsRightMenu').hasAttribute("mobile-open")) { + closeRightMobileMenu(); + } else { + openRightMobileMenu(); + } }); } ); diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 8ca009f..782105b 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -108,6 +108,10 @@ main { right: 0; } } + + .jsMobileRightMenuButton { + float: right; + } } /* Add scrollbar to the left menu and to the content */ diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index f7adb47..6e715bf 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -1,4 +1,4 @@ -.with-sidebar.jsMobileSidebarAdminControl.whitespace-normal.bg-color-white.only-on-admin(hidden) +.with-sidebar.jsMobileContentSidebarControl.whitespace-normal.bg-color-white.only-on-admin(hidden) .scrollbar-content.views-container.sidebar-is-closed for component of components if component.route diff --git a/src/views/partials/admin/page-admin-chat-create.pug b/src/views/partials/admin/page-admin-chat-create.pug index b59d8a1..a2a70bb 100644 --- a/src/views/partials/admin/page-admin-chat-create.pug +++ b/src/views/partials/admin/page-admin-chat-create.pug @@ -13,12 +13,6 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac div div - div#loader-users-create.loader.loader-top - div - div - div - div - div.segment.margin-bottom-medium div.segment solid-display.text-color-heading.text-semibold.text-xlarge.text-letter-spacing-large( @@ -29,6 +23,12 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac loader-id='loader-users-title' ) + div#loader-users-create.loader.loader-top + div + div + div + div + solid-form.form#selected-community( bind-resources nested-field='members' From 781930e59d579654e7a56dad8d8bf6670abdc418 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Thu, 15 Apr 2021 21:58:19 +0200 Subject: [PATCH 15/34] feature: implement ctrl+k --- src/scripts/keyboard-shortcuts.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/scripts/keyboard-shortcuts.js diff --git a/src/scripts/keyboard-shortcuts.js b/src/scripts/keyboard-shortcuts.js new file mode 100644 index 0000000..561c41d --- /dev/null +++ b/src/scripts/keyboard-shortcuts.js @@ -0,0 +1,9 @@ +document.addEventListener("keydown", function (e) { + /* + CTRL + K : Focus on the user search + */ + if(e.ctrlKey && e.key == "k") { + document.querySelector('#general-search input[type="text"]').focus(); + e.preventDefault(); + } +}); From 311bffcc1b8c8ec506038c75bd945ece926ec521 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 16 Apr 2021 17:23:00 +0200 Subject: [PATCH 16/34] fix: circle creation and edition --- .../admin/page-admin-circles-create.pug | 17 +++++++++-------- src/views/partials/circle/page-circle-edit.pug | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/views/partials/admin/page-admin-circles-create.pug b/src/views/partials/admin/page-admin-circles-create.pug index 696e627..c5e5f70 100644 --- a/src/views/partials/admin/page-admin-circles-create.pug +++ b/src/views/partials/admin/page-admin-circles-create.pug @@ -16,33 +16,34 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac solid-form.form( data-src=`${getComponent('circles').endpoints.post}` - fields='status, community, name, subtitle, description, help' + fields='status, community.community, name, subtitle, description, help' required-status - required-community + required-community.community required-name required-subtitle loader-id=`loader-admin-${getComponent('circles').uniq}` class-status='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' - class-community='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' + class-community.community='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' class-name='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-subtitle='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-description='segment margin-bottom-xxsmall full text-small text-semibold text-uppercase text-color-heading' class-help='segment full text-small margin-bottom-medium padding-left-small' label-status='' - label-community='' + label-community.community='' label-name='' label-subtitle='' label-description='' label-help='' - range-community='store://user.communities' - option-label-community="community.name" + range-community.community='store://user.communities' + option-label-community.community="community.name" + option-value-community.community="community" widget-status='solid-form-dropdown-autocompletion-label' enum-status="" - widget-community='solid-form-dropdown-autocompletion-label' + widget-community.community='solid-form-dropdown-autocompletion-label' widget-linebreak='solid-form-hidden' widget-description='solid-form-richtext-label' @@ -53,5 +54,5 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac submit-button='' submit-widget="button" - data-trans='enum-status=hublStatus;label-status=circle.create.labelStatus;label-community=circle.create.labelCommunity;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp' + data-trans='enum-status=hublStatus;label-status=circle.create.labelStatus;label-community.community=circle.create.labelCommunity;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp' ) diff --git a/src/views/partials/circle/page-circle-edit.pug b/src/views/partials/circle/page-circle-edit.pug index a7154f0..1e0bfcd 100644 --- a/src/views/partials/circle/page-circle-edit.pug +++ b/src/views/partials/circle/page-circle-edit.pug @@ -27,12 +27,12 @@ div.segment.full.padding-large.whitespace-normal solid-form.form( bind-resources - fields='name, subtitle, description, status, community, owner' + fields='name, subtitle, description, status, community.community, owner' required-status required-name required-owner required-subtitle - required-community + required-community.community range-owner=`${component.endpoints.owners}` label-name='' @@ -40,14 +40,14 @@ div.segment.full.padding-large.whitespace-normal label-description='' label-subtitle='' label-status='' - label-community='' + label-community.community='' label-help='' class-name='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-subtitle='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-description='segment margin-bottom-medium full text-small text-semibold text-uppercase text-color-heading' class-status='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' - class-community='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' + class-community.community='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' class-owner='hidden' class-help='segment full text-small margin-bottom-medium padding-left-small' @@ -55,11 +55,12 @@ div.segment.full.padding-large.whitespace-normal enum-status="" widget-description='solid-form-richtext-label' widget-help='solid-form-hidden-label' - widget-community='solid-form-dropdown-autocompletion-label' + widget-community.community='solid-form-dropdown-autocompletion-label' widget-owner='solid-form-dropdown-autocompletion-label' - range-community='store://user.communities' - option-label-community="community.name" + range-community.community='store://user.communities' + option-label-community.community="community.name" + option-value-community.community="community" partial='' @@ -67,7 +68,7 @@ div.segment.full.padding-large.whitespace-normal submit-widget="button" next=`${component.route}-information` - data-trans='enum-status=hublStatus;label-status=circle.edit.labelStatus;label-community=circle.edit.labelCommunity;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp' + data-trans='enum-status=hublStatus;label-status=circle.edit.labelStatus;label-community.community=circle.edit.labelCommunity;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp' ) h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.edit.subTitle') From 9d958954095ff9a46e5f6297be178a54cf7c6057 Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Mon, 19 Apr 2021 15:47:25 +0200 Subject: [PATCH 17/34] update: component update --- src/dependencies.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index 1ede7e9..d5f332a 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -53,7 +53,7 @@ if componentSet.has("profileDirectory") //- script(type="module" src="/lib/solid-directory/dist/index.js" defer) if componentSet.has("resources") - script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.1", defer) + script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.2", defer) //- script(type="module" src="/lib/solid-resource/solid-resource.js" defer) if componentSet.has("themeChecker") From 657c471df7d2732f72861b4389c91fa9fecc0ecd Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Mon, 19 Apr 2021 16:18:24 +0200 Subject: [PATCH 18/34] patch: icons for project, circle and community harmonized --- package-lock.json | 6 +++--- package.json | 2 +- src/styles/content/_index.scss | 17 +++++------------ src/views/page-admin.pug | 20 ++++++++++---------- src/views/partials/header.pug | 2 +- 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 01b4a7d..18ad18a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1615,9 +1615,9 @@ } }, "@startinblox/hubl-styling-framework": { - "version": "1.8.21", - "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.21.tgz", - "integrity": "sha512-4T0sqL7rqqe8uFmH4f8geigxZ4pIxI1ze3sycM762CQFtM5fXadAI9tl7wwAOQbY15y6xfZfDcPoK0YEjv0v9g==" + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.22.tgz", + "integrity": "sha512-00P0hIXjecgryh41Abq8ViVm18Aployr5TRbK/KDpNPAQqQ5x2to6z0of8oeeJeSm/srippfGdHLrJ7nyd1emg==" }, "@types/q": { "version": "1.5.4", diff --git a/package.json b/package.json index 5bd7775..bf92dd5 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "clearDist": false }, "dependencies": { - "@startinblox/hubl-styling-framework": "^1.8.21", + "@startinblox/hubl-styling-framework": "^1.8.22", "cross-env": "^7.0.3", "fs-extra": "^9.0.1", "normalize.css": "^8.0.1", diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 782105b..0bca0a6 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -22,8 +22,8 @@ main { &.sidebar-is-closed { @media(min-width: 768.01px) { - margin-left: -152px; - transform: translate(152px); + margin-left: -157px; + transform: translate(157px); } } } @@ -39,18 +39,11 @@ main { width: 217px; @media (max-width: 768px) { - width: 65px; + width: 60px; } ul { - - li { - border-bottom: 1px solid #D6CECE; - - &>a { - vertical-align: super; - } - } + &>li:first-child>a { vertical-align: middle; } @@ -98,7 +91,7 @@ main { &.jsRightMenu:not([open]) { @media (min-width: 768.01px) { - transform: translate(152px); + transform: translate(157px); } } diff --git a/src/views/page-admin.pug b/src/views/page-admin.pug index 6e715bf..2e33722 100644 --- a/src/views/page-admin.pug +++ b/src/views/page-admin.pug @@ -60,7 +60,7 @@ nav.jsRightMenu.segment.sm-hidden.text-disable-selection.sidebar.whitespace-normal(role='navigation') .segment.whitespace-normal.text-color-heading.text-bold ul - li.segment.full.sm-hidden.padding-small.text-normal.jsOffsiteToggle + li.segment.full.sm-hidden.padding-small.text-normal.border-bottom.border-color-grey.jsOffsiteToggle span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.segment.full.text-right(hidden) span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall @@ -69,16 +69,16 @@ if component.route if component.type == "circles" solid-link.segment.full(next=`admin-${component.route}`) - li.segment.full.padding-medium - span.icon.ci-bubble-add.icon-xlarge.margin-right-medium - a(data-trans='admin.menuRight.circles') + li.segment.full.padding-medium.border-bottom.border-color-grey + span.icon.icon-globe.icon-large.margin-right-medium + a.text-baseline(data-trans='admin.menuRight.circles') if component.type == "projects" solid-link.segment.full(next=`admin-${component.route}`) - li.segment.full.padding-medium - span.icon.ci-add.icon-xlarge.margin-right-medium - a(data-trans='admin.menuRight.projects') + li.segment.full.padding-medium.border-bottom.border-color-grey + span.icon.icon-folder-alt.icon-large.margin-right-medium + a.text-baseline(data-trans='admin.menuRight.projects') if component.type == "chat" solid-link.segment.full(next=`admin-${component.route}`) - li.segment.full.padding-medium - span.icon.ci-networking.icon-xlarge.margin-right-medium - a(data-trans='admin.menuRight.community') + li.segment.full.padding-medium.border-bottom.border-color-grey + span.icon.icon-grid.icon-large.margin-right-medium + a.text-baseline(data-trans='admin.menuRight.community') diff --git a/src/views/partials/header.pug b/src/views/partials/header.pug index 6a4f0c9..a31802f 100644 --- a/src/views/partials/header.pug +++ b/src/views/partials/header.pug @@ -48,7 +48,7 @@ div if componentSet.has("communities") && getComponent("chat").route solid-link.text-hover(next=`admin-${getRoute("chat", true)}`) li.segment.padding-top-small - a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community') + a.icon.icon-grid.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community') if componentSet.has("circles") && getComponent("circles").route solid-link.text-hover(next=`admin-${getRoute("circles", true)}`) li.segment.padding-top-small From 5bf30385f2f0cec97e3d970e77e3c84ced9a9cec Mon Sep 17 00:00:00 2001 From: antoine37120 Date: Mon, 19 Apr 2021 17:41:45 +0200 Subject: [PATCH 19/34] update: minor version for component --- src/dependencies.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index d5f332a..728526b 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -53,7 +53,7 @@ if componentSet.has("profileDirectory") //- script(type="module" src="/lib/solid-directory/dist/index.js" defer) if componentSet.has("resources") - script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.2", defer) + script(type="module", src="https://cdn.skypack.dev/@startinblox/component-resource@3.3", defer) //- script(type="module" src="/lib/solid-resource/solid-resource.js" defer) if componentSet.has("themeChecker") From 79635b4e7bf08da1219b467ee0a31c09c5956e8e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 20 Apr 2021 16:46:59 +0000 Subject: [PATCH 20/34] patch: bump chat https://git.startinblox.com/components/solid-xmpp-chat/merge_requests/136 --- src/dependencies.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index 728526b..c4b8fb3 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -17,7 +17,7 @@ if componentSet.has("autoLogin") || componentSet.has("registering") //- script(type="module" src="/lib/sib-auth/index.js" defer) if componentSet.has("chat") || componentSet.has("circles") || componentSet.has("projects") - script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@5.2" defer) + script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@5.3" defer) //- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer) if componentSet.has("communities") From 19671ae96f84d997590344cbc2d2ddbd2c8b42a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Wed, 21 Apr 2021 11:02:04 +0000 Subject: [PATCH 21/34] fix: larger timeout and locale fix --- src/locales/en.json | 2 +- src/scripts/timeout-goeswrong.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 955cc4f..9bf13b5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -280,7 +280,7 @@ "hublStatus": "Public = Public, Private = Private", "success": "Success!", "errors": { - "somethingGoesWrong": "Something goes wrong, try to", + "somethingGoesWrong": "Something went wrong, try to", "reload": "reload" }, "goButton": "GO", diff --git a/src/scripts/timeout-goeswrong.js b/src/scripts/timeout-goeswrong.js index 8df7662..0464b84 100644 --- a/src/scripts/timeout-goeswrong.js +++ b/src/scripts/timeout-goeswrong.js @@ -8,4 +8,4 @@ setTimeout(() => { } } } -}, 10000); \ No newline at end of file +}, 15000); \ No newline at end of file From fbedd4e3e612e0ab71c50da62fb7de3104de7288 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 23 Apr 2021 14:44:40 +0200 Subject: [PATCH 22/34] fix: router --- src/views/partials/admin/page-admin-projects.pug | 2 +- src/views/partials/menu-left.pug | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/partials/admin/page-admin-projects.pug b/src/views/partials/admin/page-admin-projects.pug index 1258c55..831516e 100644 --- a/src/views/partials/admin/page-admin-projects.pug +++ b/src/views/partials/admin/page-admin-projects.pug @@ -13,7 +13,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac solid-ac-checker(data-src=`${getComponent('projects').endpoints.post}`, permission='acl:Append') solid-link( class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-plus' - next='admin-projects-create' + next=`admin-${getRoute('projects', true)}-create` data-trans='project.list.buttonCreate' ) diff --git a/src/views/partials/menu-left.pug b/src/views/partials/menu-left.pug index b16a1d8..2704573 100644 --- a/src/views/partials/menu-left.pug +++ b/src/views/partials/menu-left.pug @@ -81,6 +81,7 @@ solid-router#navbar-router(default-route=defaultRoute) solid-link.segment.block.menu-icon.icon.icon-small.icon-user-follow(next=getRoute('profileDirectory', true)) solid-badge.badge(data-type="Message") solid-route(name=`admin-${component.route}`, hidden) + solid-route(name=`admin-${component.route}-create` hidden) solid-route(name=component.route, rdf-type='foaf:user', use-id='', hidden) div.sub-menu.menu-notification.padding-bottom-xxsmall.jsMenuSub div.loader.loader-menu(id=`loader-${component.route}`) From 6b25cc6cb78f1a9565a51cb0765c147daccb8fa3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 17:53:33 +0200 Subject: [PATCH 23/34] fix: community route issue --- src/views/partials/menu-left.pug | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/partials/menu-left.pug b/src/views/partials/menu-left.pug index 2704573..1464866 100644 --- a/src/views/partials/menu-left.pug +++ b/src/views/partials/menu-left.pug @@ -29,7 +29,6 @@ solid-router#navbar-router(default-route=defaultRoute) div.segment.margin-right-xxsmall div.segment.icon.icon-small.icon-grid div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.communities") - solid-route(name=`${component.route}-profile`) div.divider if component.type == "circles" From 52e5de6c9d4af24c539cf9604d9ee875ece08dd9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:02:11 +0200 Subject: [PATCH 24/34] fix: border color grey --- src/styles/admin-circles/_index.scss | 2 +- src/styles/content/_index.scss | 8 ++++---- src/styles/header/_index.scss | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 7ac883d..3fc6e8a 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -287,7 +287,7 @@ } .community-profile-logo { - border-bottom: 1px solid #D6CECE; + border-bottom: 1px solid #E4E9F1; } hubl-communities-profile-logo { diff --git a/src/styles/content/_index.scss b/src/styles/content/_index.scss index 0bca0a6..115f927 100644 --- a/src/styles/content/_index.scss +++ b/src/styles/content/_index.scss @@ -124,7 +124,7 @@ main { /* Works on Firefox*/ .scrollbar-nav { scrollbar-width: thin; - scrollbar-color:#D6CECE var(--color-heading); + scrollbar-color:#E4E9F1 var(--color-heading); } /* Works on Chrome, Edge, and Safari */ @@ -138,7 +138,7 @@ main { } &::-webkit-scrollbar-thumb { - background-color:#D6CECE; /* color of the scroll thumb */ + background-color:#E4E9F1; /* color of the scroll thumb */ border-radius: 6px; /* roundness of the scroll thumb */ border: 3px solid var(--color-heading); /* creates padding around scroll thumb */ } @@ -148,7 +148,7 @@ main { /* Works on Firefox */ .scrollbar-content { scrollbar-width: thin; - scrollbar-color:#D6CECE white; /* scroll thumb and track */ + scrollbar-color:#E4E9F1 white; /* scroll thumb and track */ } /* Works on Chrome, Edge, and Safari */ @@ -162,7 +162,7 @@ main { } &::-webkit-scrollbar-thumb { - background-color:#D6CECE; /* color of the scroll thumb */ + background-color:#E4E9F1; /* color of the scroll thumb */ border-radius: 6px; /* roundness of the scroll thumb */ border: 3px solid white; /* creates padding around scroll thumb */ } diff --git a/src/styles/header/_index.scss b/src/styles/header/_index.scss index 4865079..44e490f 100644 --- a/src/styles/header/_index.scss +++ b/src/styles/header/_index.scss @@ -393,7 +393,7 @@ header { box-shadow: none; >ul>li:last-child { - border-bottom: 1px solid #d6cece; + border-bottom: 1px solid #E4E9F1; } } } From eeb4b28283ad3c2d7ff014ca41c80af1c8e4e482 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:03:38 +0200 Subject: [PATCH 25/34] fix: input full on community directory --- src/views/partials/communities/page-community-directory.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/partials/communities/page-community-directory.pug b/src/views/partials/communities/page-community-directory.pug index 1076af9..982065f 100644 --- a/src/views/partials/communities/page-community-directory.pug +++ b/src/views/partials/communities/page-community-directory.pug @@ -8,7 +8,7 @@ fields='name' placeholder-name='' widget-name='solid-form-placeholder-text' - class-name="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" + class-name="segment margin-bottom-medium sm-margin-bottom-none full sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" submit-button="" submit-widget="button" data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton' From d9e52e9968d55ac6b6c8789fa3cc59b7672a1122 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:05:21 +0200 Subject: [PATCH 26/34] fix: hover on community links --- src/views/partials/widgets/hubl-communities-profile-email.pug | 2 +- src/views/partials/widgets/hubl-communities-profile-phone.pug | 2 +- src/views/partials/widgets/hubl-communities-profile-website.pug | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/partials/widgets/hubl-communities-profile-email.pug b/src/views/partials/widgets/hubl-communities-profile-email.pug index f5b762a..c8cb2c6 100644 --- a/src/views/partials/widgets/hubl-communities-profile-email.pug +++ b/src/views/partials/widgets/hubl-communities-profile-email.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-email') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-phone.pug b/src/views/partials/widgets/hubl-communities-profile-phone.pug index 67b5ded..3b6f0ea 100644 --- a/src/views/partials/widgets/hubl-communities-profile-phone.pug +++ b/src/views/partials/widgets/hubl-communities-profile-phone.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-phone') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-website.pug b/src/views/partials/widgets/hubl-communities-profile-website.pug index 4b481d1..ea5c8b2 100644 --- a/src/views/partials/widgets/hubl-communities-profile-website.pug +++ b/src/views/partials/widgets/hubl-communities-profile-website.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-website') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} From f6bf963ca6821105d08623628208e9fdc576026d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:12:44 +0200 Subject: [PATCH 27/34] fix: community profile link --- src/styles/index.scss | 11 +++++++++++ .../widgets/hubl-communities-profile-email.pug | 2 +- .../widgets/hubl-communities-profile-phone.pug | 2 +- .../widgets/hubl-communities-profile-website.pug | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/styles/index.scss b/src/styles/index.scss index a5fc667..8ae3a07 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -92,3 +92,14 @@ hubl-menu-empty+hubl-menu-empty { .two-lines-ellipsis { display: -webkit-box !important; } + +.link-hover { + text-decoration: underline; + &:before { + text-decoration: none; + } + + &:hover { + text-decoration: none; + } +} \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-profile-email.pug b/src/views/partials/widgets/hubl-communities-profile-email.pug index c8cb2c6..09e3eac 100644 --- a/src/views/partials/widgets/hubl-communities-profile-email.pug +++ b/src/views/partials/widgets/hubl-communities-profile-email.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-email') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-phone.pug b/src/views/partials/widgets/hubl-communities-profile-phone.pug index 3b6f0ea..2fb95db 100644 --- a/src/views/partials/widgets/hubl-communities-profile-phone.pug +++ b/src/views/partials/widgets/hubl-communities-profile-phone.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-phone') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-website.pug b/src/views/partials/widgets/hubl-communities-profile-website.pug index ea5c8b2..0a760d0 100644 --- a/src/views/partials/widgets/hubl-communities-profile-website.pug +++ b/src/views/partials/widgets/hubl-communities-profile-website.pug @@ -1,3 +1,3 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-website') - template ${value != "" ? `${value}` : ""} + template ${value != "" ? `${value}` : ""} From 56c40fa1e38c32eed43fe114e76584f4459ef7e7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:12:57 +0200 Subject: [PATCH 28/34] fix: community picture cover --- src/styles/admin-circles/_index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 3fc6e8a..7752f3d 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -173,7 +173,7 @@ height: 100%; background-position: center; background-repeat: no-repeat; - background-size: contain; + background-size: cover; } } } From 08f63b84a0ae1d11eb036a2957b6254be70ec713 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:13:53 +0200 Subject: [PATCH 29/34] fix: community description line-height --- src/views/partials/communities/page-community-profile.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 59dcc9b..4352dae 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -37,7 +37,7 @@ div.community-profile.padding-medium.sm-padding-none class-profile.phone="segment block" class-segment9="segment full" - class-profile.description="segment full whitespace-normal" + class-profile.description="segment full whitespace-normal line-xlarge" class-segment10="segment full text-right" From 4d1af2a89ac8e76d59f2e88d38b47a67a2f63d28 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:16:56 +0200 Subject: [PATCH 30/34] fix: community profile mobile --- .../partials/communities/page-community-profile.pug | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 4352dae..029020b 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -17,19 +17,19 @@ div.community-profile.padding-medium.sm-padding-none class-segment0="segment full padding-xlarge sm-padding-none whitespace-normal" class-segment1="community-profile-logo segment quarter sm-full margin-top-medium padding-top-medium padding-right-medium sm-margin-top-xsmall sm-padding-medium text-center" - class-segment2="segment three-quarter sm-full sm-padding-top-medium sm-padding-right-xsmall sm-padding-bottom-medium sm-padding-left-xsmall text-top sm-text-center whitespace-normal" + class-segment2="segment three-quarter sm-full sm-padding-top-medium sm-padding-right-xsmall sm-padding-bottom-medium sm-padding-left-xsmall text-top whitespace-normal" - class-segment3="segment full sm-two-third" - class-segment4="segment half sm-two-third padding-top-xsmall" + class-segment3="segment full sm-full" + class-segment4="segment half sm-full padding-top-xsmall" class-name="segment block text-color-heading text-xxlarge text-bold sm-text-center margin-bottom-xxsmall whitespace-normal" class-segment5="segment half text-right sm-hidden" class-segment6="segment two-third sm-full padding-top-xsmall sm-text-center" class-profile.shortDescription="segment block sm-text-center margin-bottom-large whitespace-normal" - class-segment7="segment lg-hidden sm-full" + class-segment7="segment lg-hidden sm-full sm-text-center" - class-segment8="segment two-third sm-full padding-bottom-large padding-bottom-xxsmall sm-text-left" + class-segment8="segment two-third sm-full padding-bottom-large sm-padding-top-large padding-bottom-xxsmall sm-text-left" class-addresses="segment block margin-bottom-xsmall" class-members="segment block margin-bottom-xsmall" class-profile.website="segment block" From 5c4c3443c2732cc6e3b3d6fd3c8777ed9510e7e8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:23:41 +0200 Subject: [PATCH 31/34] patch: bump css framework version --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18ad18a..7ed745c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1615,9 +1615,9 @@ } }, "@startinblox/hubl-styling-framework": { - "version": "1.8.22", - "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.22.tgz", - "integrity": "sha512-00P0hIXjecgryh41Abq8ViVm18Aployr5TRbK/KDpNPAQqQ5x2to6z0of8oeeJeSm/srippfGdHLrJ7nyd1emg==" + "version": "1.8.23", + "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.23.tgz", + "integrity": "sha512-BpjTIK/wcleOV0M4TpepfN3EPh+cUaSHlAFnkKZVk9FmK81o1xlmDeBxeKqW+vnG+J77FckD0kWPQ+KBVEKj8g==" }, "@types/q": { "version": "1.5.4", diff --git a/package.json b/package.json index bf92dd5..400931b 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "clearDist": false }, "dependencies": { - "@startinblox/hubl-styling-framework": "^1.8.22", + "@startinblox/hubl-styling-framework": "^1.8.23", "cross-env": "^7.0.3", "fs-extra": "^9.0.1", "normalize.css": "^8.0.1", From c7fa17ca228f661c6d2b4e5c38ced1dee89a4078 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 18:27:28 +0200 Subject: [PATCH 32/34] fix: icon float --- src/views/partials/communities/page-community-directory.pug | 2 +- src/views/partials/communities/page-community-map.pug | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/partials/communities/page-community-directory.pug b/src/views/partials/communities/page-community-directory.pug index 982065f..fd4d529 100644 --- a/src/views/partials/communities/page-community-directory.pug +++ b/src/views/partials/communities/page-community-directory.pug @@ -13,7 +13,7 @@ submit-widget="button" data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton' ) - div.segment.three-quarter.sm-full.text-right + div.segment.sm-full.text-right(style='float:right') solid-link.segment.children-link-rounded.children-icon-map.children-link-reversed.color-secondary.bordered(next=`${component.route}-map`) span diff --git a/src/views/partials/communities/page-community-map.pug b/src/views/partials/communities/page-community-map.pug index daf0ac7..62affce 100644 --- a/src/views/partials/communities/page-community-map.pug +++ b/src/views/partials/communities/page-community-map.pug @@ -9,13 +9,13 @@ search-filter='community.name, address_line1, address_line2' placeholder-filter='' widget-filter='solid-form-placeholder-text' - class-filter="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" + class-filter="segment margin-bottom-medium sm-margin-bottom-none full sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" submit-button="" submit-widget="button" data-trans='placeholder-filter=communities.list.searchBy;submit-button=communities.list.searchButton' ) - div.segment.three-quarter.sm-full.text-right + div.segment.sm-full.text-right(style='float:right') solid-link.segment.children-link-rounded.children-icon-grid.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`) span From 725b11e270e777dd0dd52d0f09cf491fa8ea80df Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 26 Apr 2021 20:13:43 +0200 Subject: [PATCH 33/34] fix: change icon on community profile --- package-lock.json | 6 +++--- package.json | 2 +- .../widgets/hubl-communities-profile-members-counter.pug | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ed745c..c2b89b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1615,9 +1615,9 @@ } }, "@startinblox/hubl-styling-framework": { - "version": "1.8.23", - "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.23.tgz", - "integrity": "sha512-BpjTIK/wcleOV0M4TpepfN3EPh+cUaSHlAFnkKZVk9FmK81o1xlmDeBxeKqW+vnG+J77FckD0kWPQ+KBVEKj8g==" + "version": "1.8.24", + "resolved": "https://registry.npmjs.org/@startinblox/hubl-styling-framework/-/hubl-styling-framework-1.8.24.tgz", + "integrity": "sha512-eYrFaNG9iD3dskQcID7eEXabQZaE1u6QKuhJ8HTcnEKUFCo2DQhMe1F15zwYtxVeGE7KTrbGlGPGxfRQ2r8hig==" }, "@types/q": { "version": "1.5.4", diff --git a/package.json b/package.json index 400931b..5f8fc94 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "clearDist": false }, "dependencies": { - "@startinblox/hubl-styling-framework": "^1.8.23", + "@startinblox/hubl-styling-framework": "^1.8.24", "cross-env": "^7.0.3", "fs-extra": "^9.0.1", "normalize.css": "^8.0.1", diff --git a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug index 7bf2e5e..2c2bc8b 100644 --- a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug +++ b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug @@ -2,7 +2,7 @@ if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-members-counter') template span - span.icon.icon-people.icon-third.icon-large.margin-right-xsmall + span.margin-bottom-xsmall.icon.mdi-account-multiple.icon-third.icon-large.icon-margin-right-xsmall solid-display.text-medium( data-src="${src || value}" fields='' From a905ab96d4bb4e31601ddc90ce2aba37b3862738 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 27 Apr 2021 13:35:55 +0200 Subject: [PATCH 34/34] patch: hide circle join button --- src/views/partials/circle/page-circle-profile.pug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/partials/circle/page-circle-profile.pug b/src/views/partials/circle/page-circle-profile.pug index cf29c68..39980dc 100644 --- a/src/views/partials/circle/page-circle-profile.pug +++ b/src/views/partials/circle/page-circle-profile.pug @@ -70,8 +70,9 @@ div( search-fields='user' search-widget-user='solid-form-hidden' search-value-user='store://user.@id' - empty-widget='hubl-circle-join-button' + disabled-empty-widget='hubl-circle-join-button' ) + //- https://git.startinblox.com/management/startinblox-feature-requests/issues/263 solid-ac-checker.segment.margin-left-small(permission='acl:Delete', bind-resources) solid-delete( class='segment sm-full text-xsmall text-center children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'