Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e7192d4
feat: close all unpinned tabs using keyboard shortcut
santhosh-chinnasamy Oct 8, 2025
38d8761
feat: use toast instead of prompt
santhosh-chinnasamy Oct 9, 2025
9ff9fd5
feat: add toolbarbutton to close all unpinned tabs in a workspace
santhosh-chinnasamy Oct 10, 2025
4113fe4
feat: Fix bootstraping and other small nitpicks, b=no-bug, c=common, …
mr-cheffy Oct 11, 2025
d895a48
feat: improve the site popup ui, p=#10765
reizumii Oct 10, 2025
381a29f
chore: Better organize preferences files, b=no-bug, c=compact-mode, f…
mr-cheffy Oct 10, 2025
0903aad
feat: improve the site popup ui (part 2), p=#10768
reizumii Oct 10, 2025
ba36210
feat: Add a bounce to the glance element float and format, b=no-bug, …
mr-cheffy Oct 10, 2025
c0b4a13
chore: Update workflows to use macos 26 SDK, b=no-bug, c=workflows
mr-cheffy Oct 11, 2025
e04af9f
New Crowdin updates, p=#10769
mr-cheffy Oct 11, 2025
447a422
list shortcut in settings page, refactor code based on PR review
santhosh-chinnasamy Oct 11, 2025
afaf94c
feat: show restore tabs shortcut in toast message
santhosh-chinnasamy Oct 12, 2025
16037f5
feat: Add toggle compact mode to the default placements, b=no-bug, c=…
mr-cheffy Oct 11, 2025
769a6d9
chore: Only run autopep8 if python files changed, b=no-bug, c=workflows
mr-cheffy Oct 12, 2025
54d1761
chore: Revert to the new folder animation, p=#10783, c=folders
mr-cheffy Oct 12, 2025
2a074ae
feat: Use close icon for pinned reset if the preference says so, p=#1…
mr-cheffy Oct 12, 2025
2a65ed1
feat: Improve glance animation, p=#10790, c=glance
mr-cheffy Oct 12, 2025
efe3f46
Merge branch 'dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 12, 2025
aa85ac7
update l10n string
santhosh-chinnasamy Oct 13, 2025
de6e8fc
Merge branch 'dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 14, 2025
b059fec
Merge branch 'dev' into feat/close-all-shortcut
mr-cheffy Oct 15, 2025
1c5bc2d
Merge branch 'dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 17, 2025
be9516e
Merge branch 'dev' into feat/close-all-shortcut
mr-cheffy Oct 19, 2025
420e218
Merge branch 'zen-browser:dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 20, 2025
746a54c
Merge branch 'zen-browser:dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 21, 2025
2fce747
Merge branch 'dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 22, 2025
6882f1c
Merge branch 'dev' into feat/close-all-shortcut
santhosh-chinnasamy Oct 26, 2025
dfe64b2
feat: Finished UI, b=no-bug, c=workspaces, common, tabs
mr-cheffy Oct 28, 2025
f652578
chore: Fix lint, b=no-bug, c=workspaces
mr-cheffy Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,4 @@ zen-devtools-toggle-performance-shortcut = Toggle Performance
zen-devtools-toggle-storage-shortcut = Toggle Storage
zen-devtools-toggle-dom-shortcut = Toggle DOM
zen-devtools-toggle-accessibility-shortcut = Toggle Accessibility
zen-close-all-unpinned-tabs-shortcut = Close All Unpinned Tabs
7 changes: 7 additions & 0 deletions locales/en-US/browser/browser/zen-workspaces.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,10 @@ zen-workspace-creation-label = Spaces are used to organize your tabs and session

zen-workspaces-delete-workspace-title = Delete Space?
zen-workspaces-delete-workspace-body = Are you sure you want to delete { $name }? This action cannot be undone.

# Note that the html tag MUST not be changed or removed, as it is used to better
# display the shortcut in the toast notification.
zen-workspaces-close-all-unpinned-tabs-toast = Tabs Closed! Use <span>{ $shortcut }</span> to undo.
zen-workspaces-close-all-unpinned-tabs-title =
.label = Clear
.tooltiptext = Close all unpinned tabs
1 change: 1 addition & 0 deletions src/browser/base/content/zen-commands.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@
<command id="cmd_zenOpenFolderCreation" />

<command id="cmd_zenTogglePinTab" />
<command id="cmd_zenCloseUnpinnedTabs" />
</commandset>
7 changes: 6 additions & 1 deletion src/browser/themes/shared/zen-icons/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

.subviewbutton,
#zen-welcome-start-button,
.zen-toast button {
.zen-toast button,
.pinned-tabs-container-separator toolbarbutton {
-moz-context-properties: fill, fill-opacity !important;
fill: currentColor !important;
}
Expand Down Expand Up @@ -392,6 +393,10 @@
list-style-image: url('arrow-down.svg') !important;
}

.zen-workspace-close-unpinned-tabs-button {
list-style-image: url('dart-down.svg') !important;
}

.zen-workspace-actions-reorder-icon,
.zen-tab-rearrange-button {
list-style-image: url('drag-indicator.svg') !important;
Expand Down
3 changes: 3 additions & 0 deletions src/browser/themes/shared/zen-icons/jar.inc.mn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
Expand Down Expand Up @@ -181,6 +182,7 @@
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
Expand Down Expand Up @@ -333,6 +335,7 @@
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
Expand Down
5 changes: 5 additions & 0 deletions src/browser/themes/shared/zen-icons/lin/dart-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/zen/common/styles/zen-omnibox.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
visibility 0.15s;
}

#navigator-toolbox:hover &,
#navigator-toolbox[zen-has-hover='true'] &,
&[open],
#urlbar[has-popup-open='true'] &,
#identity-box[pageproxystate='invalid'] & {
Expand Down
10 changes: 10 additions & 0 deletions src/zen/common/styles/zen-popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@ menuseparator {

& label {
margin: 0 4px;

& span {
background: light-dark(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
border-radius: 4px;
padding: 5px 7px;
font-size: 12px;
font-weight: 600;
margin: 0 2px;
word-spacing: 2px;
}
}

& button {
Expand Down
3 changes: 3 additions & 0 deletions src/zen/common/zen-sets.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ document.addEventListener(
}
break;
}
case 'cmd_zenCloseUnpinnedTabs':
gZenWorkspaces.closeAllUnpinnedTabs();
break;
case 'cmd_zenUnloadWorkspace': {
gZenWorkspaces.unloadWorkspace();
break;
Expand Down
17 changes: 16 additions & 1 deletion src/zen/kbs/ZenKeyboardShortcuts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const defaultKeyboardGroups = {
'zen-key-enter-full-screen',
'zen-key-exit-full-screen',
'zen-quit-app-shortcut',
'zen-close-all-unpinned-tabs-shortcut',
'zen-close-tab-shortcut',
'zen-close-shortcut',
'id:key_selectTab1',
Expand Down Expand Up @@ -799,7 +800,7 @@ class nsZenKeyboardShortcutsLoader {
}

class nsZenKeyboardShortcutsVersioner {
static LATEST_KBS_VERSION = 12;
static LATEST_KBS_VERSION = 13;

constructor() {}

Expand Down Expand Up @@ -1081,6 +1082,20 @@ class nsZenKeyboardShortcutsVersioner {
data = data.filter((shortcut) => shortcut.getID() != 'zen-compact-mode-show-toolbar');
}

if (version < 13) {
data.push(
new KeyShortcut(
'zen-close-all-unpinned-tabs',
'K',
'',
ZEN_WORKSPACE_SHORTCUTS_GROUP,
nsKeyShortcutModifiers.fromObject({ accel: true, shift: true }),
'cmd_zenCloseUnpinnedTabs',
'zen-close-all-unpinned-tabs-shortcut'
)
);
}

return data;
}
}
Expand Down
69 changes: 57 additions & 12 deletions src/zen/tabs/zen-tabs/vertical-tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,31 +130,76 @@
Pinned Tabs Separator
========================================================================== */
.pinned-tabs-container-separator {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
margin: 8px auto;
height: 24px;
border: none;
height: 1px;
max-height: 1px;
width: 98%;
transition:
margin 0.1s ease-in-out,
background 0.1s ease-in-out,
max-height 0.1s ease-in-out;
height 0.08s ease-in-out,
opacity 0.08s ease-in-out;
overflow: hidden;
position: relative;
opacity: 1;
align-items: center;

& toolbarseparator {
height: 1px;
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
padding: 0;
margin: auto 4px;

&::before {
border-inline-start: none;
}
}

#tabbrowser-tabs[movingtab] & {
transition:
margin 0.1s ease-in-out,
background 0.1s ease-in-out,
max-height 0.1s ease-in-out,
height 0.08s ease-in-out,
opacity 0.08s ease-in-out,
transform 0.1s ease-in-out;
}

.zen-workspace-pinned-tabs-section[hide-separator] & {
max-height: 0;
margin: 0 auto;
height: 0px;
opacity: 0;
}

& toolbarbutton {
appearance: none;
opacity: 0;
visibility: collapse;
transition:
opacity 0.15s,
visibility 0.15s;
font-size: 10px;
font-weight: 500;
gap: 2px;

#navigator-toolbox[zen-has-hover='true'] & {
visibility: visible;
opacity: 0.5;
}

&:hover {
opacity: 1 !important;
}

:root:not([zen-sidebar-expanded='true']) & {
display: none;
}

& .toolbarbutton-text {
display: flex;
}

& .toolbarbutton-icon {
width: 10px;
transition: transform 0.15s ease-in-out;
}

&:active:hover .toolbarbutton-icon {
transform: translateY(2px);
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion src/zen/workspaces/ZenWorkspace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
</vbox>
<arrowscrollbox orient="vertical" class="workspace-arrowscrollbox">
<vbox class="zen-workspace-tabs-section zen-workspace-pinned-tabs-section" hide-separator="true">
<html:div class="pinned-tabs-container-separator"></html:div>
<hbox class="pinned-tabs-container-separator">
<toolbarseparator flex="1" />
<toolbarbutton command="cmd_zenCloseUnpinnedTabs"
tooltip="dynamic-shortcut-tooltip"
data-l10n-id="zen-workspaces-close-all-unpinned-tabs-title"
class="zen-workspace-close-unpinned-tabs-button" />
</hbox>
</vbox>
<vbox class="zen-workspace-tabs-section zen-workspace-normal-tabs-section">
<!-- Let it as an ID to mantain compatibility with firefox's tabbrowser -->
Expand Down
32 changes: 32 additions & 0 deletions src/zen/workspaces/ZenWorkspaces.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,19 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
});
}

unpinnedTabsInWorkspace(workspaceID) {
return Array.from(this.allStoredTabs).filter(
(tab) => tab.getAttribute('zen-workspace-id') === workspaceID && tab.visible && !tab.pinned
);
}

#deleteAllUnpinnedTabsInWorkspace(tabs) {
gBrowser.removeTabs(tabs, {
animate: false,
closeWindowWithLastTab: false,
});
}

async unloadWorkspace() {
const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace;

Expand Down Expand Up @@ -2654,6 +2667,25 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
this.tabContainer._invalidateCachedTabs();
}

async closeAllUnpinnedTabs() {
const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace;
const unpinnedTabs = await this.unpinnedTabsInWorkspace(workspaceId);

if (!unpinnedTabs.length) return;

this.#deleteAllUnpinnedTabsInWorkspace(unpinnedTabs);

const restoreClosedTabsShortcut = gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand(
'History:RestoreLastClosedTabOrWindowOrSession'
);

gZenUIManager.showToast('zen-workspaces-close-all-unpinned-tabs-toast', {
l10nArgs: {
shortcut: restoreClosedTabsShortcut,
},
});
}

async contextDeleteWorkspace() {
const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace;
const [title, body] = await document.l10n.formatValues([
Expand Down
1 change: 1 addition & 0 deletions src/zen/zen.globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default [
'gZenStartup',

'gZenWorkspaces',
'gZenKeyboardShortcutsManager',
'ZenWorkspacesEngine',
'ZenWorkspacesStorage',
'ZenWorkspaceBookmarksStorage',
Expand Down