Add vertical tab animations and implement stale issue management workflow

This commit is contained in:
mr. M
2025-01-31 17:26:15 +01:00
parent 773a65a87e
commit 89d1f7a731
2 changed files with 32 additions and 31 deletions

15
.github/workflows/staler.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
days-before-stale: 65
days-before-close: 10

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c58f6765cc 100644 index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..6362493d8ec06aa90cc3425498c0fb749b23d289 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js --- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -406,11 +406,39 @@ @@ -406,11 +406,39 @@
@@ -124,22 +124,20 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
if (insertTab) { if (insertTab) {
// insert the tab into the tab container in the correct position // insert the tab into the tab container in the correct position
this._insertTabAtIndex(t, { this._insertTabAtIndex(t, {
@@ -2885,6 +2931,13 @@ @@ -2885,6 +2931,9 @@
} }
} }
+ if (typeof window.gZenVerticalTabsManager !== "undefined") { + if (typeof window.gZenVerticalTabsManager !== "undefined") {
+ gZenVerticalTabsManager.animateTab(t); + gZenVerticalTabsManager.animateTab(t);
+ } + }
+
// Additionally send pinned tab events // Additionally send pinned tab events
if (pinned) { if (pinned) {
this._notifyPinnedStatus(t); this._notifyPinnedStatus(t);
@@ -3403,6 +3456,23 @@ @@ -3403,6 +3452,21 @@
) { ) {
tabWasReused = true; tabWasReused = true;
tab = this.selectedTab; tab = this.selectedTab;
+
+ if (tabData.zenWorkspace) { + if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace); + tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ } + }
@@ -155,24 +153,22 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
+ if (tabData.zenPinnedEntry) { + if (tabData.zenPinnedEntry) {
+ tab.setAttribute("zen-pinned-entry", tabData.zenPinnedEntry); + tab.setAttribute("zen-pinned-entry", tabData.zenPinnedEntry);
+ } + }
+
if (!tabData.pinned) { if (!tabData.pinned) {
this.unpinTab(tab); this.unpinTab(tab);
} else { } else {
@@ -3416,6 +3486,9 @@ @@ -3416,6 +3480,7 @@
restoreTabsLazily && !select && !tabData.pinned; restoreTabsLazily && !select && !tabData.pinned;
let url = "about:blank"; let url = "about:blank";
+
+ gZenPinnedTabManager.resetPinnedTabData(tabData); + gZenPinnedTabManager.resetPinnedTabData(tabData);
+
if (tabData.entries?.length) { if (tabData.entries?.length) {
let activeIndex = (tabData.index || tabData.entries.length) - 1; let activeIndex = (tabData.index || tabData.entries.length) - 1;
// Ensure the index is in bounds. // Ensure the index is in bounds.
@@ -3452,6 +3525,21 @@ @@ -3451,7 +3516,21 @@
skipLoad: true,
preferredRemoteType, preferredRemoteType,
}); });
-
+ if (tabData.zenWorkspace) { + if (tabData.zenWorkspace) {
+ tab.setAttribute("zen-workspace-id", tabData.zenWorkspace); + tab.setAttribute("zen-workspace-id", tabData.zenWorkspace);
+ } + }
@@ -191,15 +187,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
if (select) { if (select) {
tabToSelect = tab; tabToSelect = tab;
} }
@@ -3505,7 +3593,6 @@ @@ -3729,7 +3808,7 @@
this.tabContainer._invalidateCachedTabs();
}
}
-
tab.initialize();
}
@@ -3715,7 +3799,7 @@
// Ensure we have an index if one was not provided. // Ensure we have an index if one was not provided.
if (typeof index != "number") { if (typeof index != "number") {
// Move the new tab after another tab if needed, to the end otherwise. // Move the new tab after another tab if needed, to the end otherwise.
@@ -208,18 +196,17 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
if ( if (
!bulkOrderedOpen && !bulkOrderedOpen &&
((openerTab && ((openerTab &&
@@ -4070,6 +4154,10 @@ @@ -4095,6 +4174,9 @@
return; return;
} }
+ for (let tab of selectedTabs) { + for (let tab of selectedTabs) {
+ gZenPinnedTabManager._removePinnedAttributes(tab, true); + gZenPinnedTabManager._removePinnedAttributes(tab, true);
+ } + }
+
this.removeTabs(selectedTabs); this.removeTabs(selectedTabs);
} }
@@ -4443,6 +4534,13 @@ @@ -4443,6 +4525,12 @@
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab); TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
} }
@@ -229,11 +216,10 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
+ this.selectedTab = newTab; + this.selectedTab = newTab;
+ } + }
+ } + }
+
// Handle requests for synchronously removing an already // Handle requests for synchronously removing an already
// asynchronously closing tab. // asynchronously closing tab.
if (!animate && aTab.closing) { if (!animate && aTab.closing) {
@@ -4471,7 +4569,10 @@ @@ -4471,7 +4559,10 @@
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab); TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
return; return;
} }
@@ -245,7 +231,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
let lockTabSizing = let lockTabSizing =
!this.tabContainer.verticalMode && !this.tabContainer.verticalMode &&
!aTab.pinned && !aTab.pinned &&
@@ -4610,14 +4711,14 @@ @@ -4610,14 +4701,14 @@
!!this.tabsInCollapsedTabGroups.length; !!this.tabsInCollapsedTabGroups.length;
if ( if (
aTab.visible && aTab.visible &&
@@ -262,7 +248,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
if (closeWindow) { if (closeWindow) {
// We've already called beforeunload on all the relevant tabs if we get here, // We've already called beforeunload on all the relevant tabs if we get here,
@@ -5465,10 +5566,10 @@ @@ -5465,10 +5556,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
} }
@@ -275,7 +261,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
aTab.selected || aTab.selected ||
aTab.closing || aTab.closing ||
// Tabs that are sharing the screen, microphone or camera cannot be hidden. // Tabs that are sharing the screen, microphone or camera cannot be hidden.
@@ -7443,6 +7544,7 @@ @@ -7443,6 +7534,7 @@
aWebProgress.isTopLevel aWebProgress.isTopLevel
) { ) {
this.mTab.setAttribute("busy", "true"); this.mTab.setAttribute("busy", "true");
@@ -283,7 +269,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
gBrowser._tabAttrModified(this.mTab, ["busy"]); gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected; this.mTab._notselectedsinceload = !this.mTab.selected;
gBrowser.syncThrobberAnimations(this.mTab); gBrowser.syncThrobberAnimations(this.mTab);
@@ -8411,7 +8513,7 @@ var TabContextMenu = { @@ -8411,7 +8503,7 @@ var TabContextMenu = {
); );
contextUnpinSelectedTabs.hidden = contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !multiselectionContext; !this.contextTab.pinned || !multiselectionContext;
@@ -292,7 +278,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
// Move Tab items // Move Tab items
let contextMoveTabOptions = document.getElementById( let contextMoveTabOptions = document.getElementById(
"context_moveTabOptions" "context_moveTabOptions"
@@ -8444,7 +8546,7 @@ var TabContextMenu = { @@ -8444,7 +8536,7 @@ var TabContextMenu = {
let contextMoveTabToStart = document.getElementById("context_moveToStart"); let contextMoveTabToStart = document.getElementById("context_moveToStart");
let isFirstTab = let isFirstTab =
tabsToMove[0] == visibleTabs[0] || tabsToMove[0] == visibleTabs[0] ||
@@ -301,7 +287,7 @@ index ff90a70bdad6c94ec4b90027ff102972d0eb28e5..87e68c2a0663a3da3e6d86277ce2f0c5
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent; contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
document.getElementById("context_openTabInWindow").disabled = document.getElementById("context_openTabInWindow").disabled =
@@ -8677,6 +8779,7 @@ var TabContextMenu = { @@ -8677,6 +8769,7 @@ var TabContextMenu = {
if (this.contextTab.multiselected) { if (this.contextTab.multiselected) {
gBrowser.removeMultiSelectedTabs(); gBrowser.removeMultiSelectedTabs();
} else { } else {