Skip to content

Commit 8a1d674

Browse files
committed
feat: replace bottom panel + button with Tools label and icon
Replace the confusing + button with app-drawer icon and "Tools" text matching the Tools panel tab. Use inline HTML with relative icon path instead of programmatic icon injection. Also change status bar panel toggle from chevron to angles-up/angles-down icons.
1 parent b50d417 commit 8a1d674

4 files changed

Lines changed: 19 additions & 18 deletions

File tree

src/styles/Extn-BottomPanelTabs.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,15 @@
200200
display: flex;
201201
align-items: center;
202202
justify-content: center;
203-
width: 1.9rem;
203+
padding: 0 8px;
204204
height: 2rem;
205+
line-height: 2rem;
206+
overflow: hidden;
205207
cursor: pointer;
206208
color: #888;
207209
font-size: 0.82rem;
208210
flex: 0 0 auto;
211+
white-space: nowrap;
209212
transition: color 0.12s ease, background-color 0.12s ease;
210213

211214
.dark & {

src/view/DefaultPanelView.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ define(function (require, exports, module) {
3131
CommandManager = require("command/CommandManager"),
3232
Strings = require("strings"),
3333
WorkspaceManager = require("view/WorkspaceManager"),
34-
PanelView = require("view/PanelView"),
35-
ExtensionUtils = require("utils/ExtensionUtils");
34+
PanelView = require("view/PanelView");
3635

3736
/**
3837
* Descriptors for each launcher button.
@@ -178,7 +177,8 @@ define(function (require, exports, module) {
178177
}
179178
});
180179

181-
const iconURL = ExtensionUtils.getModulePath(module, "../styles/images/app-drawer.svg");
180+
const iconHTML = '<img class="app-drawer-tab-icon" src="styles/images/app-drawer.svg"'
181+
+ ' style="width:12px;height:12px;vertical-align:middle;margin-right:4px">';
182182

183183
/**
184184
* Inject the app-drawer icon into the Quick Access tab title.
@@ -188,12 +188,7 @@ define(function (require, exports, module) {
188188
const $tabTitle = $('#bottom-panel-tab-bar .bottom-panel-tab[data-panel-id="'
189189
+ WorkspaceManager.DEFAULT_PANEL_ID + '"] .bottom-panel-tab-title');
190190
if ($tabTitle.length && !$tabTitle.find(".app-drawer-tab-icon").length) {
191-
$tabTitle.prepend($('<img class="app-drawer-tab-icon">').attr("src", iconURL).css({
192-
"width": "12px",
193-
"height": "12px",
194-
"vertical-align": "middle",
195-
"margin-right": "4px"
196-
}));
191+
$tabTitle.prepend(iconHTML);
197192
}
198193
}
199194

src/view/PanelView.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,12 @@ define(function (require, exports, module) {
512512
_recomputeLayout = recomputeLayoutFn;
513513
_defaultPanelId = defaultPanelId;
514514

515-
// Create the "+" button inside the tabs overflow area (after all tabs)
516-
_$addBtn = $('<span class="bottom-panel-add-btn"><i class="fa-solid fa-plus"></i></span>')
517-
.attr('title', Strings.BOTTOM_PANEL_OPEN_PANEL);
515+
// Create the "Tools" button inside the tabs overflow area (after all tabs)
516+
// This opens the default/quick-access panel when clicked.
517+
_$addBtn = $('<span class="bottom-panel-add-btn" title="' + Strings.BOTTOM_PANEL_DEFAULT_TITLE + '">'
518+
+ '<img class="app-drawer-tab-icon" src="styles/images/app-drawer.svg"'
519+
+ ' style="width:12px;height:12px;vertical-align:middle;margin-right:4px">'
520+
+ Strings.BOTTOM_PANEL_DEFAULT_TITLE + '</span>');
518521
_$tabsOverflow.append(_$addBtn);
519522

520523
// Tab bar click handlers

src/view/WorkspaceManager.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ define(function (require, exports, module) {
389389
$editorHolder, recomputeLayout, DEFAULT_PANEL_ID);
390390

391391
// Create status bar chevron toggle for bottom panel
392-
$statusBarPanelToggle = $('<div id="status-panel-toggle" class="indicator global-indicator"><i class="fa-solid fa-chevron-up"></i></div>')
392+
$statusBarPanelToggle = $('<div id="status-panel-toggle" class="indicator global-indicator"><i class="fa-solid fa-angles-up"></i></div>')
393393
.attr('title', Strings.BOTTOM_PANEL_SHOW);
394394
$("#status-indicators").prepend($statusBarPanelToggle);
395395

@@ -419,8 +419,8 @@ define(function (require, exports, module) {
419419

420420
$bottomPanelContainer.on("panelCollapsed", function () {
421421
$statusBarPanelToggle.find("i")
422-
.removeClass("fa-chevron-down")
423-
.addClass("fa-chevron-up");
422+
.removeClass("fa-angles-down")
423+
.addClass("fa-angles-up");
424424
$statusBarPanelToggle.attr("title", Strings.BOTTOM_PANEL_SHOW);
425425
if (!_statusBarToggleInProgress) {
426426
AnimationUtils.animateUsingClass($statusBarPanelToggle[0], "flash", 800);
@@ -436,8 +436,8 @@ define(function (require, exports, module) {
436436

437437
$bottomPanelContainer.on("panelExpanded", function () {
438438
$statusBarPanelToggle.find("i")
439-
.removeClass("fa-chevron-up")
440-
.addClass("fa-chevron-down");
439+
.removeClass("fa-angles-up")
440+
.addClass("fa-angles-down");
441441
$statusBarPanelToggle.attr("title", Strings.BOTTOM_PANEL_HIDE_TOGGLE);
442442
if (!_statusBarToggleInProgress) {
443443
AnimationUtils.animateUsingClass($statusBarPanelToggle[0], "flash", 800);

0 commit comments

Comments
 (0)