From b58b7d8dff9a8bf870398e7139ffb95d2816ff88 Mon Sep 17 00:00:00 2001 From: xbpcb Date: Mon, 6 Jan 2025 22:56:59 +0200 Subject: [PATCH 1/9] Gp: handle tooltip pos --- src/views/pages/globalping/_index.html | 32 +++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index 815b2f377..a0bd341cf 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -132,9 +132,10 @@ gpNotAppliedOpts="{{notAppliedOpts}}" gpUrlHandlerCb="{{@this.applyOptions}}" showIPSwitch="{{mainOptions.type !== 'DNS'}}" - ipVersion="{{mainOptions.ipVersion}}"> + ipVersion="{{mainOptions.ipVersion}}" + ttPos="{{ttPositions.targetTtPos}}"> {{#partial labelIcon}} - @@ -150,9 +151,10 @@ placeholder="Enter location" labelText="Location" classList="gp_map-block_settings-wrapper_settings_location gp_input" - disabled="{{testInProgress}}"> + disabled="{{testInProgress}}" + ttPos="{{ttPositions.locationTtPos}}"> {{#partial labelIcon}} - @@ -168,9 +170,10 @@ labelText="Limit" classList="gp_map-block_settings-wrapper_settings_limit gp_input" hideLabelIcon="{{infiniteSwitchEnabled === false}}" - disabled="{{testInProgress}}"> + disabled="{{testInProgress}}" + ttPos="{{ttPositions.limitTtPos}}"> {{#partial labelIcon}} - @@ -1786,6 +1789,23 @@ } }); + // handle tooltips positions depending on the screen size + this.observe('screenWidth', (screenWidth) => { + let ttPositions = {}; + + if (screenWidth < 768) { + ttPositions.targetTtPos = 'right'; + ttPositions.locationTtPos = 'right'; + ttPositions.limitTtPos = 'right'; + } else { + ttPositions.targetTtPos = 'top'; + ttPositions.locationTtPos = 'top'; + ttPositions.limitTtPos = 'top'; + } + + this.set('ttPositions', ttPositions); + }); + // disable Infinite switch if there is more than one target this.observe('mainOptions.target', (target) => { if (target.split(',').length > 1) { From e90c6c388b0d96dc5d60efbf4c97a8888fc5ca8e Mon Sep 17 00:00:00 2001 From: xbpcb Date: Mon, 6 Jan 2025 23:46:44 +0200 Subject: [PATCH 2/9] Tooltip: add margins to left-right side respectively --- src/assets/less/common.less | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/assets/less/common.less b/src/assets/less/common.less index 75a3b878f..cfbdf672c 100644 --- a/src/assets/less/common.less +++ b/src/assets/less/common.less @@ -419,12 +419,16 @@ body.noscroll { transform: translate(-50%, 100%); } - &-right:before { - left: 0; - top: 50%; - border-left: 0; - border-right: 5px solid rgba(17, 26, 44, .9); - transform: translate(-100%, -50%); + &-right { + margin-right: 20px; + + &:before { + left: 0; + top: 50%; + border-left: 0; + border-right: 5px solid rgba(17, 26, 44, .9); + transform: translate(-100%, -50%); + } } &-bottom:before { @@ -435,12 +439,17 @@ body.noscroll { transform: translate(-50%, -100%); } - &-left:before { - right: 0; - top: 50%; - border-right: 0; - border-left: 5px solid rgba(17, 26, 44, .9); - transform: translate(100%, -50%); + &-left { + margin-left: 20px; + + &:before { + right: 0; + top: 50%; + border-right: 0; + border-left: 5px solid rgba(17, 26, 44, .9); + transform: translate(100%, -50%); + margin-left: 24px; + } } pre { From a12baa82a680a04a07c0eeb1bfe3a62284de273b Mon Sep 17 00:00:00 2001 From: xbpcb Date: Mon, 6 Jan 2025 23:57:28 +0200 Subject: [PATCH 3/9] Gp: fix tooltips positions --- src/views/pages/globalping/_index.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index a0bd341cf..a2ca106dc 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -1793,14 +1793,18 @@ this.observe('screenWidth', (screenWidth) => { let ttPositions = {}; - if (screenWidth < 768) { - ttPositions.targetTtPos = 'right'; - ttPositions.locationTtPos = 'right'; - ttPositions.limitTtPos = 'right'; - } else { + if (screenWidth >= 1272) { ttPositions.targetTtPos = 'top'; ttPositions.locationTtPos = 'top'; ttPositions.limitTtPos = 'top'; + } else if (screenWidth >= 768) { + ttPositions.targetTtPos = 'top'; + ttPositions.locationTtPos = 'right'; + ttPositions.limitTtPos = 'top'; + } else { + ttPositions.targetTtPos = 'right'; + ttPositions.locationTtPos = 'right'; + ttPositions.limitTtPos = 'right'; } this.set('ttPositions', ttPositions); From 0f937846bbdc620b39e5cecc77c0d1395abc78ff Mon Sep 17 00:00:00 2001 From: xbpcb Date: Tue, 7 Jan 2025 18:07:10 +0200 Subject: [PATCH 4/9] Gp: use unified styles for all tooltips on the page --- src/views/pages/globalping/_index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index a2ca106dc..32759f4f0 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -135,7 +135,7 @@ ipVersion="{{mainOptions.ipVersion}}" ttPos="{{ttPositions.targetTtPos}}"> {{#partial labelIcon}} - From 3f233a08de6331cad17b68cc291ee7eed8d20a18 Mon Sep 17 00:00:00 2001 From: xbpcb Date: Tue, 7 Jan 2025 19:46:57 +0200 Subject: [PATCH 5/9] GpCreds,ResTable, ResRaw: use unified tt styles --- src/views/components/gp-credits.html | 2 +- src/views/components/gp-results-raw-output.html | 2 +- src/views/components/gp-results-table-output.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/components/gp-credits.html b/src/views/components/gp-credits.html index 7b58faa09..30a57557e 100644 --- a/src/views/components/gp-credits.html +++ b/src/views/components/gp-credits.html @@ -17,7 +17,7 @@ {{/if}} - diff --git a/src/views/components/gp-results-raw-output.html b/src/views/components/gp-results-raw-output.html index 8c889a97d..937e71bf6 100644 --- a/src/views/components/gp-results-raw-output.html +++ b/src/views/components/gp-results-raw-output.html @@ -65,7 +65,7 @@
diff --git a/src/views/components/gp-results-table-output.html b/src/views/components/gp-results-table-output.html index 10c0f5aab..226c8b5e7 100644 --- a/src/views/components/gp-results-table-output.html +++ b/src/views/components/gp-results-table-output.html @@ -48,7 +48,7 @@
@@ -73,7 +73,7 @@ {{#if this.isFailed}}
{{PROBE_FAILED_TEXT}} -
+
From ff31bd1a590e33afb33699c3b577fa92432d3b55 Mon Sep 17 00:00:00 2001 From: xbpcb Date: Thu, 9 Jan 2025 16:14:40 +0200 Subject: [PATCH 6/9] Gp: show tts as oneliners again --- src/views/components/gp-credits.html | 2 +- src/views/components/gp-results-raw-output.html | 2 +- src/views/components/gp-results-table-output.html | 4 ++-- src/views/pages/globalping/_index.html | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/components/gp-credits.html b/src/views/components/gp-credits.html index 30a57557e..7b58faa09 100644 --- a/src/views/components/gp-credits.html +++ b/src/views/components/gp-credits.html @@ -17,7 +17,7 @@ {{/if}} - diff --git a/src/views/components/gp-results-raw-output.html b/src/views/components/gp-results-raw-output.html index 937e71bf6..8c889a97d 100644 --- a/src/views/components/gp-results-raw-output.html +++ b/src/views/components/gp-results-raw-output.html @@ -65,7 +65,7 @@
diff --git a/src/views/components/gp-results-table-output.html b/src/views/components/gp-results-table-output.html index 226c8b5e7..10c0f5aab 100644 --- a/src/views/components/gp-results-table-output.html +++ b/src/views/components/gp-results-table-output.html @@ -48,7 +48,7 @@
@@ -73,7 +73,7 @@ {{#if this.isFailed}}
{{PROBE_FAILED_TEXT}} -
+
diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index 32759f4f0..2cd86a615 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -135,7 +135,7 @@ ipVersion="{{mainOptions.ipVersion}}" ttPos="{{ttPositions.targetTtPos}}"> {{#partial labelIcon}} - @@ -173,7 +173,7 @@ disabled="{{testInProgress}}" ttPos="{{ttPositions.limitTtPos}}"> {{#partial labelIcon}} - From 5ceda85b256d122673ff596af19846314b1cdb34 Mon Sep 17 00:00:00 2001 From: xbpcb Date: Thu, 9 Jan 2025 16:25:48 +0200 Subject: [PATCH 7/9] Gp: fix limit oneliner tooltip --- src/assets/less/common-globalping.less | 4 ++++ src/views/pages/globalping/_index.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/assets/less/common-globalping.less b/src/assets/less/common-globalping.less index e049d75d0..01dff5e14 100644 --- a/src/assets/less/common-globalping.less +++ b/src/assets/less/common-globalping.less @@ -526,6 +526,10 @@ } } } + + &_tt-limit { + white-space: normal; + } } // hide GoogleMaps InfoWindow close btn diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index 2cd86a615..662f04833 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -173,7 +173,7 @@ disabled="{{testInProgress}}" ttPos="{{ttPositions.limitTtPos}}"> {{#partial labelIcon}} - From 3049e380497ac5a6da803ed639dc6bf430a40eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kol=C3=A1rik?= Date: Thu, 9 Jan 2025 16:09:26 +0100 Subject: [PATCH 8/9] Update nodejs.yml --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 2a854d925..ed588c2e5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,6 +27,6 @@ jobs: run: | npm ci npm run build --if-present - npm test + npm lint env: CI: true From ddb154a593b89112e9776c553e7204a30b864ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kol=C3=A1rik?= Date: Thu, 9 Jan 2025 16:12:08 +0100 Subject: [PATCH 9/9] Update nodejs.yml --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ed588c2e5..f04e0bce3 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,6 +27,6 @@ jobs: run: | npm ci npm run build --if-present - npm lint + npm run lint env: CI: true