1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 05:35:29 +02:00

Improve self-hosted runner script execution and enhance ZenCustomizableUI event handling for better UI responsiveness

This commit is contained in:
mr. M 2025-01-21 23:08:27 +01:00
parent a86bb5197d
commit 74c9923f0b
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
3 changed files with 16 additions and 14 deletions

View file

@ -436,13 +436,15 @@ jobs:
sudo ./aws/install --update
- name: Stop self-hosted runner
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Stopping self-hosted runner"
echo "${{ secrets.SELF_HOSTED_RUNNER_STOP_SCRIPT }}" | base64 -d > stop.sh
sudo chmod +x stop.sh
bash ./stop.sh
bash ./stop.sh > /dev/null
- name: Remove self-hosted runner script
if: always() && ${{ inputs.create_release && inputs.update_branch == 'release' }}
run: |
echo "Removing self-hosted runner script"
rm stop.sh || true

View file

@ -125,5 +125,8 @@ export var ZenCustomizableUI = new (class {
registerToolbarNodes(window) {
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
window.addEventListener('DOMContentLoaded', () => {
this._dispatchResizeEvent(window);
}, { once: true });
}
})();

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..bb9568158ddf53801de576af05c50ff9c0f333c6 100644
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23fe2a6ace3 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@ -124,16 +124,12 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..bb9568158ddf53801de576af05c50ff9
/**
* Add a widget to an area.
* If the area to which you try to add is not known to CustomizableUI,
@@ -6370,7 +6369,7 @@ class OverflowableToolbar {
*/
async #getOverflowInfo() {
function getInlineSize(aElement) {
- return aElement.getBoundingClientRect().width;
+ return aElement.getBoundingClientRect().width - ((win.gZenVerticalTabsManager._hasSetSingleToolbar && aElement.closest('#zen-sidebar-top-buttons-customization-target')) ? win.gZenVerticalTabsManager._topButtonsSeparatorElement.getBoundingClientRect().width : 0);
}
function sumChildrenInlineSize(aParent, aExceptChild = null) {
@@ -6412,7 +6411,7 @@ class OverflowableToolbar {
@@ -6408,11 +6407,11 @@ class OverflowableToolbar {
parseFloat(style.paddingLeft) -
parseFloat(style.paddingRight) -
toolbarChildrenWidth;
- targetWidth = getInlineSize(this.#target);
+ targetWidth = getInlineSize(this.#target) - ((win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#target.id == 'zen-sidebar-top-buttons-customization-target') ? win.gZenVerticalTabsManager._topButtonsSeparatorElement.getBoundingClientRect().width : 0);
targetChildrenWidth =
this.#target == this.#toolbar
? toolbarChildrenWidth
@ -142,16 +138,17 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..bb9568158ddf53801de576af05c50ff9
});
lazy.log.debug(
@@ -6422,7 +6421,7 @@ class OverflowableToolbar {
@@ -6422,7 +6421,8 @@ class OverflowableToolbar {
// If the target has min-width: 0, their children might actually overflow
// it, so check for both cases explicitly.
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
- let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
+ if (win.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar == 'nav-bar') return { isOverflowing: false, targetContentWidth, totalAvailWidth };
+ let isOverflowing = Math.floor(targetContentWidth) + (win.gZenVerticalTabsManager._hasSetSingleToolbar ? 0.1 : 0) > totalAvailWidth;
return { isOverflowing, targetContentWidth, totalAvailWidth };
}
@@ -6516,7 +6515,7 @@ class OverflowableToolbar {
@@ -6516,7 +6516,7 @@ class OverflowableToolbar {
}
}
if (!inserted) {