Skip to content

Commit c21f927

Browse files
santhosh-chinnasamymr-cheffyreizumii
authored
feat: close all unpinned tabs in active workspace, p=#10739
* feat: close all unpinned tabs using keyboard shortcut * feat: use toast instead of prompt * feat: add toolbarbutton to close all unpinned tabs in a workspace * feat: Fix bootstraping and other small nitpicks, b=no-bug, c=common, tabs, workspaces * feat: improve the site popup ui, p=#10765 * style: improve site popup top buttons * feat: add filled icons for permissions * style: align and resize items in the site popup * feat: site popup ui improvements and more permission icons * chore: Better organize preferences files, b=no-bug, c=compact-mode, folders, glance, kbs, media, mods, split-view, welcome, workspaces * feat: improve the site popup ui (part 2), p=#10768 * feat: Add a bounce to the glance element float and format, b=no-bug, c=common, glance * chore: Update workflows to use macos 26 SDK, b=no-bug, c=workflows * New Crowdin updates, p=#10769 * New translations zen-preferences.ftl (French) * New translations zen-preferences.ftl (Lithuanian) * New translations zen-workspaces.ftl (Lithuanian) * New translations zen-general.ftl (Lithuanian) * list shortcut in settings page, refactor code based on PR review * feat: show restore tabs shortcut in toast message * feat: Add toggle compact mode to the default placements, b=no-bug, c=common, glance * chore: Only run autopep8 if python files changed, b=no-bug, c=workflows * chore: Revert to the new folder animation, p=#10783, c=folders * feat: Use close icon for pinned reset if the preference says so, p=#10786, c=no-component * feat: Improve glance animation, p=#10790, c=glance * update l10n string * feat: Finished UI, b=no-bug, c=workspaces, common, tabs * chore: Fix lint, b=no-bug, c=workspaces --------- Co-authored-by: mr. m <[email protected]> Co-authored-by: reizumi <[email protected]> Co-authored-by: mr. m <[email protected]>
1 parent 8bce5c1 commit c21f927

File tree

14 files changed

+150
-16
lines changed

14 files changed

+150
-16
lines changed

locales/en-US/browser/browser/preferences/zen-preferences.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,4 @@ zen-devtools-toggle-performance-shortcut = Toggle Performance
337337
zen-devtools-toggle-storage-shortcut = Toggle Storage
338338
zen-devtools-toggle-dom-shortcut = Toggle DOM
339339
zen-devtools-toggle-accessibility-shortcut = Toggle Accessibility
340+
zen-close-all-unpinned-tabs-shortcut = Close All Unpinned Tabs

locales/en-US/browser/browser/zen-workspaces.ftl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,10 @@ zen-workspace-creation-label = Spaces are used to organize your tabs and session
7373
7474
zen-workspaces-delete-workspace-title = Delete Space?
7575
zen-workspaces-delete-workspace-body = Are you sure you want to delete { $name }? This action cannot be undone.
76+
77+
# Note that the html tag MUST not be changed or removed, as it is used to better
78+
# display the shortcut in the toast notification.
79+
zen-workspaces-close-all-unpinned-tabs-toast = Tabs Closed! Use <span>{ $shortcut }</span> to undo.
80+
zen-workspaces-close-all-unpinned-tabs-title =
81+
.label = Clear
82+
.tooltiptext = Close all unpinned tabs

src/browser/base/content/zen-commands.inc.xhtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@
6060
<command id="cmd_zenOpenFolderCreation" />
6161

6262
<command id="cmd_zenTogglePinTab" />
63+
<command id="cmd_zenCloseUnpinnedTabs" />
6364
</commandset>

src/browser/themes/shared/zen-icons/icons.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
.subviewbutton,
88
#zen-welcome-start-button,
9-
.zen-toast button {
9+
.zen-toast button,
10+
.pinned-tabs-container-separator toolbarbutton {
1011
-moz-context-properties: fill, fill-opacity !important;
1112
fill: currentColor !important;
1213
}
@@ -392,6 +393,10 @@
392393
list-style-image: url('arrow-down.svg') !important;
393394
}
394395

396+
.zen-workspace-close-unpinned-tabs-button {
397+
list-style-image: url('dart-down.svg') !important;
398+
}
399+
395400
.zen-workspace-actions-reorder-icon,
396401
.zen-tab-rearrange-button {
397402
list-style-image: url('drag-indicator.svg') !important;

src/browser/themes/shared/zen-icons/jar.inc.mn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
3030
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
3131
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
32+
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
3233
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
3334
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
3435
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
@@ -181,6 +182,7 @@
181182
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
182183
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
183184
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
185+
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
184186
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
185187
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
186188
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
@@ -333,6 +335,7 @@
333335
* skin/classic/browser/zen-icons/container-tab.svg (../shared/zen-icons/lin/container-tab.svg)
334336
* skin/classic/browser/zen-icons/cookies-fill.svg (../shared/zen-icons/lin/cookies-fill.svg)
335337
* skin/classic/browser/zen-icons/customize.svg (../shared/zen-icons/lin/customize.svg)
338+
* skin/classic/browser/zen-icons/dart-down.svg (../shared/zen-icons/lin/dart-down.svg)
336339
* skin/classic/browser/zen-icons/desktop-notification-blocked.svg (../shared/zen-icons/lin/desktop-notification-blocked.svg)
337340
* skin/classic/browser/zen-icons/desktop-notification-fill.svg (../shared/zen-icons/lin/desktop-notification-fill.svg)
338341
* skin/classic/browser/zen-icons/desktop-notification.svg (../shared/zen-icons/lin/desktop-notification.svg)
Lines changed: 5 additions & 0 deletions
Loading

src/zen/common/styles/zen-omnibox.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
visibility 0.15s;
148148
}
149149

150-
#navigator-toolbox:hover &,
150+
#navigator-toolbox[zen-has-hover='true'] &,
151151
&[open],
152152
#urlbar[has-popup-open='true'] &,
153153
#identity-box[pageproxystate='invalid'] & {

src/zen/common/styles/zen-popup.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,16 @@ menuseparator {
381381

382382
& label {
383383
margin: 0 4px;
384+
385+
& span {
386+
background: light-dark(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
387+
border-radius: 4px;
388+
padding: 5px 7px;
389+
font-size: 12px;
390+
font-weight: 600;
391+
margin: 0 2px;
392+
word-spacing: 2px;
393+
}
384394
}
385395

386396
& button {

src/zen/common/zen-sets.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ document.addEventListener(
122122
}
123123
break;
124124
}
125+
case 'cmd_zenCloseUnpinnedTabs':
126+
gZenWorkspaces.closeAllUnpinnedTabs();
127+
break;
125128
case 'cmd_zenUnloadWorkspace': {
126129
gZenWorkspaces.unloadWorkspace();
127130
break;

src/zen/kbs/ZenKeyboardShortcuts.mjs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const defaultKeyboardGroups = {
4949
'zen-key-enter-full-screen',
5050
'zen-key-exit-full-screen',
5151
'zen-quit-app-shortcut',
52+
'zen-close-all-unpinned-tabs-shortcut',
5253
'zen-close-tab-shortcut',
5354
'zen-close-shortcut',
5455
'id:key_selectTab1',
@@ -799,7 +800,7 @@ class nsZenKeyboardShortcutsLoader {
799800
}
800801

801802
class nsZenKeyboardShortcutsVersioner {
802-
static LATEST_KBS_VERSION = 12;
803+
static LATEST_KBS_VERSION = 13;
803804

804805
constructor() {}
805806

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

1085+
if (version < 13) {
1086+
data.push(
1087+
new KeyShortcut(
1088+
'zen-close-all-unpinned-tabs',
1089+
'K',
1090+
'',
1091+
ZEN_WORKSPACE_SHORTCUTS_GROUP,
1092+
nsKeyShortcutModifiers.fromObject({ accel: true, shift: true }),
1093+
'cmd_zenCloseUnpinnedTabs',
1094+
'zen-close-all-unpinned-tabs-shortcut'
1095+
)
1096+
);
1097+
}
1098+
10841099
return data;
10851100
}
10861101
}

0 commit comments

Comments
 (0)