From 42661ac03f4bae15c9eeb2bfc772336771a6bf43 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 10:17:58 +0100 Subject: [PATCH 01/18] use flexbox to align items vertically in widget container --- las2peer-frontend-statusbar.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index a416451..7e6c3ef 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -24,10 +24,6 @@ render() { width:${this.displayWidth}; } #widget-container { - margin-left: auto; - margin-top: 0; - margin-bottom: 0; - padding: 25px 25px 10px 10px; cursor: pointer; } #widget-container:hover { @@ -36,6 +32,12 @@ render() { .inline{ display:inline-block; } + .flex{ + display:flex; + } + .align-vertical{ + align-items:center; + } .center-vertical { margin-top: auto; margin-bottom: auto; @@ -43,10 +45,7 @@ render() { h1{ margin-left: 25px; } - h3 { - margin-left: 60px; - margin-top: -30px; - } +
@@ -58,7 +57,7 @@ render() {
-
+
Date: Wed, 8 Dec 2021 10:50:42 +0100 Subject: [PATCH 02/18] align to end --- las2peer-frontend-statusbar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index 7e6c3ef..487469d 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -25,6 +25,7 @@ render() { } #widget-container { cursor: pointer; + align-self:end; } #widget-container:hover { background: #5691f5; From eebb8545f13da97d15e09df4afb67e8e6385ce5a Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:02:12 +0100 Subject: [PATCH 03/18] remove slot #8 --- las2peer-frontend-statusbar.js | 127 +++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 55 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index 487469d..baa8a3b 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -11,65 +11,82 @@ class Las2peerFrontendStatusbar extends LitElement { render() { return html` -
- - -
-

${this.service}

-
${this.subtitle}
-
-
- -
- -

${this._getUsername()}

-
+
+ + +
+

${this.service}

+
+ ${this.subtitle} +
+
+
+ +
+ +

${this._getUsername()}

+
- - `; + `; } static get properties() { From 99d97f8424dd475cd8bfea18295ff7c90a3618aa Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:11:28 +0100 Subject: [PATCH 04/18] align widget, move styles to style --- las2peer-frontend-statusbar.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index baa8a3b..2b56e30 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -25,9 +25,8 @@ render() { } #widget-container { cursor: pointer; - align-self: end; - margin-left: 5px; - margin-right: 5px; + margin-left: 10px; + margin-right: 10px; } #widget-container:hover { background: #5691f5; @@ -48,9 +47,13 @@ render() { h1 { margin-left: 25px; } + #innercontainer { + display: flex; + justify-content: space-between; + } -
+
From 8c11785394a83373960403abbad0c4ae789426fd Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:13:45 +0100 Subject: [PATCH 05/18] use equil margin on first and last child of statusbar --- las2peer-frontend-statusbar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index 2b56e30..febb464 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -44,13 +44,14 @@ render() { margin-top: auto; margin-bottom: auto; } - h1 { - margin-left: 25px; - } #innercontainer { display: flex; justify-content: space-between; } + #innercontainer:first-child, + #innercontainer:last-child { + margin-left: 25px; + }
From c6e803498da302e00474ecf7e7a77da7c22c5614 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:21:34 +0100 Subject: [PATCH 06/18] m --- las2peer-frontend-statusbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index febb464..123bb5a 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -48,7 +48,9 @@ render() { display: flex; justify-content: space-between; } - #innercontainer:first-child, + #innercontainer:first-child { + margin-left: 25px; + } #innercontainer:last-child { margin-left: 25px; } From 75093b2ef7c340084da5fff9df2f5f236a55c7f2 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:26:56 +0100 Subject: [PATCH 07/18] fix margin on last element --- las2peer-frontend-statusbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index 123bb5a..a35ff1b 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -52,7 +52,7 @@ render() { margin-left: 25px; } #innercontainer:last-child { - margin-left: 25px; + margin-right: 25px; } From 4aebd3a73f3bca78e4113dcf0f96c0f236972369 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:43:53 +0100 Subject: [PATCH 08/18] use widget fix branch for widgt component --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ec433b..c3a8796 100644 --- a/package-lock.json +++ b/package-lock.json @@ -431,14 +431,14 @@ } }, "@webcomponents/shadycss": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.10.2.tgz", - "integrity": "sha512-9Iseu8bRtecb0klvv+WXZOVZatsRkbaH7M97Z+f+Pt909R4lDfgUODAnra23DOZTpeMTAkVpf4m/FZztN7Ox1A==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.11.0.tgz", + "integrity": "sha512-L5O/+UPum8erOleNjKq6k58GVl3fNsEQdSOyh0EUhNmi7tHUyRuCJy1uqJiWydWcLARE5IPsMoPYMZmUGrz1JA==" }, "@webcomponents/webcomponentsjs": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.5.0.tgz", - "integrity": "sha512-C0l51MWQZ9kLzcxOZtniOMohpIFdCLZum7/TEHv3XWFc1Fvt5HCpbSX84x8ltka/JuNKcuiDnxXFkiB2gaePcg==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.6.0.tgz", + "integrity": "sha512-Moog+Smx3ORTbWwuPqoclr+uvfLnciVd6wdCaVscHPrxbmQ/IJKm3wbB7hpzJtXWjAq2l/6QMlO85aZiOdtv5Q==" }, "acorn": { "version": "7.4.1", @@ -461,8 +461,8 @@ "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" }, "las2peer-frontend-user-widget": { - "version": "github:rwth-acis/las2peer-frontend-user-widget#63ad251f95b323938b78e0d68b14ec67a1a05511", - "from": "github:rwth-acis/las2peer-frontend-user-widget#0.3.0", + "version": "github:rwth-acis/las2peer-frontend-user-widget#8d98f79917eac4ba6c5ded0ec810308041ed8cd2", + "from": "github:rwth-acis/las2peer-frontend-user-widget#widget-position-fix", "requires": { "@polymer/iron-ajax": "^3.0.1", "@polymer/iron-dropdown": "^3.0.1", diff --git a/package.json b/package.json index a982a3f..2c85637 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A polymer widget which uses the las2peer Contact and UserInformation Service as well as the openId connect service", "main": "las2peer-frontend-statusbar.js", "dependencies": { - "las2peer-frontend-user-widget": "github:rwth-acis/las2peer-frontend-user-widget#0.3.0", + "las2peer-frontend-user-widget": "github:rwth-acis/las2peer-frontend-user-widget#widget-position-fix", "lit-element": "^2.5.1", "openidconnect-signin": "github:rwth-acis/openidconnect-signin" } From bee36aab92dd8c3a26a04aba1ea58ab896663def Mon Sep 17 00:00:00 2001 From: lakhoune Date: Wed, 8 Dec 2021 11:53:00 +0100 Subject: [PATCH 09/18] use padding instead of margin --- las2peer-frontend-statusbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index a35ff1b..ebce12c 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -25,8 +25,8 @@ render() { } #widget-container { cursor: pointer; - margin-left: 10px; - margin-right: 10px; + padding-left: 10px; + padding-right: 10px; } #widget-container:hover { background: #5691f5; From 7feca19e3c2f74749e45c1b01810eb5e23c8c318 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Thu, 9 Dec 2021 14:21:52 +0100 Subject: [PATCH 10/18] Revert "remove slot #8" This reverts commit eebb8545f13da97d15e09df4afb67e8e6385ce5a. --- las2peer-frontend-statusbar.js | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index ebce12c..d6776ee 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -11,13 +11,13 @@ class Las2peerFrontendStatusbar extends LitElement { render() { return html`
- +

${this.service}

@@ -86,13 +86,8 @@ render() { >

${this._getUsername()}

-
- - `; + `; } static get properties() { From 9294cbf4da4543da409e99b8950e43773758b34c Mon Sep 17 00:00:00 2001 From: lakhoune Date: Thu, 9 Dec 2021 20:53:54 +0100 Subject: [PATCH 11/18] Only last item right aligned, spacing between inline items --- las2peer-frontend-statusbar.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/las2peer-frontend-statusbar.js b/las2peer-frontend-statusbar.js index d6776ee..1073f66 100644 --- a/las2peer-frontend-statusbar.js +++ b/las2peer-frontend-statusbar.js @@ -34,6 +34,9 @@ render() { .inline { display: inline-block; } + .inline + .inline { + margin-left: 5px; + } .flex { display: flex; } @@ -46,13 +49,13 @@ render() { } #innercontainer { display: flex; - justify-content: space-between; } #innercontainer:first-child { margin-left: 25px; } #innercontainer:last-child { margin-right: 25px; + margin-left: auto; } @@ -87,7 +90,9 @@ render() {

${this._getUsername()}

-