From e16c9c95a2c03d93c8ae5e0ca67b83ad913b0cb6 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 24 Oct 2024 18:59:19 +0530 Subject: [PATCH 1/5] Fix popup display downward Signed-off-by: Aditya --- js/popup.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/popup.js b/js/popup.js index ab9d01fab..54c0ea0d7 100644 --- a/js/popup.js +++ b/js/popup.js @@ -95,9 +95,15 @@ enyo.kind({ // Popup will overflow window, prepare to shift menu this.overflowY = true; } + var screenHeight = document.getElementById("canvas").offsetHeight; + var popupTopPosition = mouse.position.y + this.margin.top; + var popupBottomPosition = mouse.position.x + this.margin.left; + if (mouse.position.y + popupSize > screenHeight) { + popupTopPosition -= (popupSize + 10); + } this.setStyle("bottom", ""); - this.applyStyle("top", (mouse.position.y+this.margin.top)+"px"); - this.applyStyle("left", (mouse.position.x+this.margin.left)+"px"); + this.applyStyle("top", (popupTopPosition) + "px"); + this.applyStyle("left", (popupBottomPosition) + "px"); this.show(); this.timer = window.setInterval(enyo.bind(this, "showContent"), 0); }, From 5f770849edd8781aca45ea2831c9866b60bb99c9 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 29 Oct 2024 13:07:24 +0530 Subject: [PATCH 2/5] Fix: Popup display downward increase the page length Signed-off-by: Aditya --- js/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/popup.js b/js/popup.js index 54c0ea0d7..d6913aa44 100644 --- a/js/popup.js +++ b/js/popup.js @@ -99,7 +99,7 @@ enyo.kind({ var popupTopPosition = mouse.position.y + this.margin.top; var popupBottomPosition = mouse.position.x + this.margin.left; if (mouse.position.y + popupSize > screenHeight) { - popupTopPosition -= (popupSize + 10); + popupTopPosition = screenHeight+this.margin.top-popupSize; } this.setStyle("bottom", ""); this.applyStyle("top", (popupTopPosition) + "px"); From 024496e1f5edc7a8ccebb601e0a38e254b4aa95b Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Dec 2024 00:02:35 +0530 Subject: [PATCH 3/5] FIX: journal popup increasing page length Signed-off-by: Aditya --- js/journal.js | 12 +++++++++++- js/popup.js | 10 ++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/js/journal.js b/js/journal.js index 372e1dcd6..a04401ff7 100644 --- a/js/journal.js +++ b/js/journal.js @@ -703,7 +703,17 @@ enyo.kind({ this.$.activityPopup.setFooter(items); // Show popup - this.$.activityPopup.setMargin({left: 0, top: (icon.owner.index*60)+20-mouse.position.y}); + // Get the popup's size dynamically + var popupSize = 50; // Base header size + popupSize += (items.length * 42); // Add height for each item + var leftPostion = 0; + var topPosition = (icon.owner.index * 60) + 20 - mouse.position.y; + var bottomOverflow = mouse.position.y + popupSize - window.innerHeight+55; + if (bottomOverflow > 0) { + // If the popup overflows the bottom, adjust upwards + topPosition -= bottomOverflow; + } + this.$.activityPopup.setMargin({ left: leftPostion, top: topPosition }); this.$.activityPopup.showPopup(); }, diff --git a/js/popup.js b/js/popup.js index d6913aa44..ab9d01fab 100644 --- a/js/popup.js +++ b/js/popup.js @@ -95,15 +95,9 @@ enyo.kind({ // Popup will overflow window, prepare to shift menu this.overflowY = true; } - var screenHeight = document.getElementById("canvas").offsetHeight; - var popupTopPosition = mouse.position.y + this.margin.top; - var popupBottomPosition = mouse.position.x + this.margin.left; - if (mouse.position.y + popupSize > screenHeight) { - popupTopPosition = screenHeight+this.margin.top-popupSize; - } this.setStyle("bottom", ""); - this.applyStyle("top", (popupTopPosition) + "px"); - this.applyStyle("left", (popupBottomPosition) + "px"); + this.applyStyle("top", (mouse.position.y+this.margin.top)+"px"); + this.applyStyle("left", (mouse.position.x+this.margin.left)+"px"); this.show(); this.timer = window.setInterval(enyo.bind(this, "showContent"), 0); }, From 8c741cfe0cb3360780658947b1eee1dacbbdc9dc Mon Sep 17 00:00:00 2001 From: Aditya Date: Fri, 13 Dec 2024 12:26:55 +0530 Subject: [PATCH 4/5] Fix: jornal popup increasing page length (add changes for when footer in not present) Signed-off-by: Aditya --- js/journal.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/journal.js b/js/journal.js index a04401ff7..bf610dfe3 100644 --- a/js/journal.js +++ b/js/journal.js @@ -712,6 +712,9 @@ enyo.kind({ if (bottomOverflow > 0) { // If the popup overflows the bottom, adjust upwards topPosition -= bottomOverflow; + if(!this.$.footer.getShowing()){ + topPosition += 55; // HACK: 55 is the footer height + } } this.$.activityPopup.setMargin({ left: leftPostion, top: topPosition }); this.$.activityPopup.showPopup(); From 84ffd4de2a3cc96a8e070e2d0eff7c4c5d416aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lionel=20Lask=C3=A9?= Date: Sun, 15 Dec 2024 22:22:50 +0100 Subject: [PATCH 5/5] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a07b68ec2..9e654cd7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Missing flag handling in ColorMyWorld #1603 - Position of Sugar Icon in Popup on homescreen is toward bottom right #1662 - Recording video doesn't work on Windows #1203 +- Activity Description opening downwards in Journal #1407 ## [1.8.0] - 2024-04-10 ### Added