Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
583acbc
feat: tabbed bottom panel initial architecture
devvaannsh Feb 17, 2026
8405463
feat: improve bottom panel tab bar styling
devvaannsh Feb 17, 2026
942ba1e
feat: remove redundant box shadow color between panel and tabbar
devvaannsh Feb 17, 2026
40592bf
refactor: reduce height of active tab styling
devvaannsh Feb 17, 2026
76f54be
feat: better support for bottom panel tab bar title
devvaannsh Feb 17, 2026
74a50f2
feat: better support for tab naming using dom lookup
devvaannsh Feb 17, 2026
9944854
feat: prevent full tab bar dom rebuild on panel switch
devvaannsh Feb 17, 2026
628e53c
feat: deprecate min size param from bottom panel
devvaannsh Feb 17, 2026
76a8926
refactor: improve bottom panel tab bar styling
devvaannsh Feb 17, 2026
49990a8
fix: redundant duplicated jsdoc
devvaannsh Feb 18, 2026
cc61c7a
feat: add single close button that hides panel
devvaannsh Feb 18, 2026
24ae62d
feat: hide the bottom panel and don’t destroy any active ones
devvaannsh Feb 18, 2026
b0720bd
feat: add button to toggle the bottom panel via status bar
devvaannsh Feb 18, 2026
55049bd
feat: animate buttons when panel toggles its state via non status bar…
devvaannsh Feb 18, 2026
5204327
refactor: better styling for the hide panel button in bottom panel ta…
devvaannsh Feb 18, 2026
234e293
chore: localize the strings
devvaannsh Feb 18, 2026
a42ff5c
fix: some panel content getting cut off and not taking full available…
devvaannsh Feb 18, 2026
85bc0d7
refactor: update shortcuts panel styles to make it consistent with th…
devvaannsh Feb 18, 2026
17bc95e
refactor: update custom snippets style as per new tabbed panel archit…
devvaannsh Feb 18, 2026
32b09d2
feat: update git panel styles to fit new architecture
devvaannsh Feb 18, 2026
d026cec
feat: update problems panel style to match new architecture
devvaannsh Feb 18, 2026
ad27732
feat: update test builder styles
devvaannsh Feb 18, 2026
832b5c2
feat: update search panel styles
devvaannsh Feb 18, 2026
f5694a2
feat: move the tabbed bottom panel logic to panel view
devvaannsh Feb 19, 2026
787f26a
feat: set title and attribute using the functions
devvaannsh Feb 19, 2026
3e78258
refactor: set title and attr using functions
devvaannsh Feb 19, 2026
3a4e6f0
fix: escape key destroying non-visible panels
devvaannsh Feb 19, 2026
5a4d95a
feat: update the title only on setTitle instead of full dom rebuild
devvaannsh Feb 19, 2026
9a8f526
feat: hide all open bottom panels at once instead of closing them ind…
devvaannsh Feb 19, 2026
cc6189c
fix: event shown event not firing
devvaannsh Feb 19, 2026
92f92a5
feat: remove snippets count tracking from the title
devvaannsh Feb 19, 2026
1dc06c3
fix: git more options button appearing at incorrect position due to r…
devvaannsh Feb 19, 2026
53a7533
feat: open quick access panel when on other panel is opened
devvaannsh Feb 19, 2026
8a908ed
feat: remove read more from the quick access panel for better accessi…
devvaannsh Feb 19, 2026
a64a705
feat: show no results page when no results match in find in files
devvaannsh Feb 19, 2026
d5254a4
feat: only show no results page when modal has valid query
devvaannsh Feb 19, 2026
77aabdb
feat: escape key hides the bottom panel instead of destroying a panel
devvaannsh Feb 19, 2026
295dac6
fix: checkmark/active indicators not getting removed when tab is closed
devvaannsh Feb 19, 2026
a3f1266
feat: only show the buttons available in the quick access panel
devvaannsh Feb 19, 2026
557df1d
fix: find in files buttons getting misplaced with empty input boxes
devvaannsh Feb 20, 2026
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
1 change: 1 addition & 0 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ define(function (require, exports, module) {
require("utils/NodeUtils");
require("utils/ColorUtils");
require("view/ThemeManager");
require("view/DefaultPanelView");
require("thirdparty/lodash");
require("language/XMLUtils");
require("language/JSONUtils");
Expand Down
19 changes: 7 additions & 12 deletions src/extensions/default/DebugCommands/testBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ define(function (require, exports, module) {
function toggleTestBuilder() {
if(!$panel){
$panel = $(panelHTML);
builderPanel = WorkspaceManager.createBottomPanel("phcode-test-builder-panel", $panel, 100);
builderPanel = WorkspaceManager.createBottomPanel("phcode-test-builder-panel", $panel, 100, "Test Builder");
builderPanel.hide();
_setupPanel().then(()=>{
builderPanel.setVisible(!builderPanel.isVisible());
Expand All @@ -49,23 +49,19 @@ define(function (require, exports, module) {
}
const panelHTML = `
<div id="test-builder-panel-phcode" class="bottom-panel vert-resizable top-resizer">
<div class="toolbar" style="display: flex; justify-content: space-between;">
<div style="display: flex">
<div class="title">Test Builder</div>
<div class="toolbar" style="display: flex; justify-content: space-between; align-items: center; padding: 5px 8px;">
<div style="display: flex; gap: 4px;">
<button class="btn btn-mini no-focus save-test-builder">Save</button>
<button class="btn btn-mini primary no-focus run-test-builder">Run</button>
<button class="btn btn-mini no-focus run-selected">Run Selected</button>
</div>
<div>
<div style="display: flex; gap: 4px;">
<button class="btn btn-mini no-focus mark-validate" title="Validate marks at cursor">Marks</button>
<button class="btn btn-mini no-focus cursor-locate">cursor</button>
<button class="btn btn-mini no-focus text-validate" title="validate text" style="margin-right: 20px;">
Text</button>
<a href="#" class="close" style="right: 0;margin-right: 10px;">&times;</a>
</div>
<button class="btn btn-mini no-focus text-validate" title="validate text">Text</button>
</div>
</div>
<div style="display: flex; height: 100%; overflow: scroll;">
<!--27 px is status bar height. If this is not set, the preview code mirror editor gives weird layout issues at times-->
<div class="test_builder-editor" style="width: 100%; height: 100%;"></div>
</div>
</div>`;
Expand Down Expand Up @@ -161,7 +157,6 @@ define(function (require, exports, module) {
builderEditor && builderEditor.updateLayout();
}).observe($panel[0]);

$panel.find(".close").click(toggleTestBuilder);
$panel.find(".save-test-builder").click(saveFile);
$panel.find(".run-test-builder").click(()=>{
runTests();
Expand All @@ -177,7 +172,7 @@ define(function (require, exports, module) {
return;
}
$panel = $(panelHTML);
builderPanel = WorkspaceManager.createBottomPanel("phcode-test-builder-panel", $panel, 100);
builderPanel = WorkspaceManager.createBottomPanel("phcode-test-builder-panel", $panel, 100, "Test Builder");
builderPanel.hide();
_setupPanel();
});
Expand Down
16 changes: 13 additions & 3 deletions src/extensions/default/Git/src/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ define(function (require, exports) {
return;
}
const mainToolbarWidth = $mainToolbar.width();
let overFlowWidth = 565;
let overFlowWidth = 540;
const breakpoints = [
{ width: overFlowWidth, className: "hide-when-small" },
{ width: 400, className: "hide-when-x-small" }
Expand Down Expand Up @@ -1240,13 +1240,12 @@ define(function (require, exports) {
var $panelHtml = $(panelHtml);
$panelHtml.find(".git-available, .git-not-available").hide();

gitPanel = WorkspaceManager.createBottomPanel("main-git.panel", $panelHtml, 100);
gitPanel = WorkspaceManager.createBottomPanel("main-git.panel", $panelHtml, 100, Strings.GIT_PANEL_TITLE);
$gitPanel = gitPanel.$panel;
const resizeObserver = new ResizeObserver(_panelResized);
resizeObserver.observe($gitPanel[0]);
$mainToolbar = $gitPanel.find(".mainToolbar");
$gitPanel
.on("click", ".close", toggle)
.on("click", ".check-all", function () {
if ($(this).is(":checked")) {
return Git.stageAll().then(function () {
Expand Down Expand Up @@ -1502,6 +1501,17 @@ define(function (require, exports) {
handleGitCommit(lastCommitMessage[ProjectManager.getProjectRoot().fullPath], false, COMMIT_MODE.DEFAULT);
});

// When the panel tab is closed externally (e.g. via the × button),
// update the toolbar icon and menu checked state to stay in sync.
WorkspaceManager.on(WorkspaceManager.EVENT_WORKSPACE_PANEL_HIDDEN, function (event, panelID) {
if (panelID === "main-git.panel" && gitPanel) {
Main.$icon.toggleClass("on", false);
Main.$icon.toggleClass("selected-button", false);
CommandManager.get(Constants.CMD_GIT_TOGGLE_PANEL).setChecked(false);
Preferences.set("panelEnabled", false);
}
});

exports.init = init;
exports.refresh = refresh;
exports.toggle = toggle;
Expand Down
19 changes: 9 additions & 10 deletions src/extensions/default/Git/styles/git-styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -1013,17 +1013,12 @@

.toolbar {
overflow: visible;
.close {
position: absolute;
top: 22px;
margin-top: -10px;
}
}
.git-more-options-btn {
position: absolute;
right: 25px;
top: 8px;
padding: 4px 8px 2px 8px;
right: 8px;
top: 5px;
padding: 4px 9px 2px 8px;
opacity: .7;
.dark & {
opacity: .5;
Expand Down Expand Up @@ -1070,7 +1065,11 @@
.btn-group {
line-height: 1;
button {
height: 26px;
height: 22px;
margin-top: 2px;
margin-bottom: 2px;
padding-top: 2px;
padding-bottom: 2px;
}
}
}
Expand All @@ -1086,7 +1085,7 @@
}
.git-right-icons {
position:absolute;
right: 55px;
right: 32px;
top: 5px;
}
.octicon:not(:only-child) {
Expand Down
3 changes: 1 addition & 2 deletions src/extensions/default/Git/templates/git-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@
</div>
</div>
<div class="git-more-options-btn btn-alt-quiet"><i class="fa-solid fa-ellipsis-vertical"></i></div>
<a href="#" class="close">&times;</a>

</div>
<div class="table-container" style="height: calc(100% - 42px);"></div>
<div class="table-container" style="height: calc(100% - 36px);"></div>
</div>
47 changes: 26 additions & 21 deletions src/extensionsIntegrated/CustomSnippets/UIHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
/* eslint-disable no-invalid-this */
define(function (require, exports, module) {
const StringUtils = require("utils/StringUtils");
const Global = require("./global");
const Strings = require("strings");

/** @type {Object} Reference to the panel instance, set via init() */
let _panel;

/**
* this is a generic function to show error messages for input fields
*
Expand Down Expand Up @@ -113,7 +115,6 @@ define(function (require, exports, module) {
const $backToListMenuBtn = $("#back-to-list-menu-btn");
const $addNewSnippetBtn = $("#add-new-snippet-btn");
const $filterSnippetsPanel = $("#filter-snippets-panel");
const $toolbarTitle = $(".toolbar-title");

$addSnippetMenu.removeClass("hidden");
$snippetListMenu.addClass("hidden");
Expand All @@ -122,7 +123,9 @@ define(function (require, exports, module) {
$addNewSnippetBtn.addClass("hidden");
$filterSnippetsPanel.addClass("hidden");

$toolbarTitle.html(`${Strings.CUSTOM_SNIPPETS_ADD_PANEL_TITLE} <span id="snippets-count" class="snippets-count"></span>`);
if (_panel) {
_panel.setTitle(Strings.CUSTOM_SNIPPETS_ADD_PANEL_TITLE);
}
}

/**
Expand All @@ -137,7 +140,6 @@ define(function (require, exports, module) {
const $backToListMenuBtn = $("#back-to-list-menu-btn");
const $addNewSnippetBtn = $("#add-new-snippet-btn");
const $filterSnippetsPanel = $("#filter-snippets-panel");
const $toolbarTitle = $(".toolbar-title");

$addSnippetMenu.addClass("hidden");
$editSnippetMenu.addClass("hidden");
Expand All @@ -147,12 +149,9 @@ define(function (require, exports, module) {
$addNewSnippetBtn.removeClass("hidden");
$filterSnippetsPanel.removeClass("hidden");

// add the snippet count in the toolbar (the no. of snippets added)
const snippetCount = Global.SnippetHintsList.length;
const countText = snippetCount > 0 ? `(${snippetCount})` : "";
$toolbarTitle.html(
`${Strings.CUSTOM_SNIPPETS_PANEL_TITLE} <span id="snippets-count" class="snippets-count">${countText}</span>`
);
if (_panel) {
_panel.setTitle(Strings.CUSTOM_SNIPPETS_PANEL_TITLE);
}

$("#filter-snippets-input").val("");
}
Expand All @@ -167,7 +166,6 @@ define(function (require, exports, module) {
const $backToListMenuBtn = $("#back-to-list-menu-btn");
const $addNewSnippetBtn = $("#add-new-snippet-btn");
const $filterSnippetsPanel = $("#filter-snippets-panel");
const $toolbarTitle = $(".toolbar-title");

$editSnippetMenu.removeClass("hidden");
$snippetListMenu.addClass("hidden");
Expand All @@ -176,8 +174,9 @@ define(function (require, exports, module) {
$addNewSnippetBtn.addClass("hidden");
$filterSnippetsPanel.addClass("hidden");

// Update toolbar title
$toolbarTitle.html(`${Strings.CUSTOM_SNIPPETS_EDIT_PANEL_TITLE} <span id="snippets-count" class="snippets-count"></span>`);
if (_panel) {
_panel.setTitle(Strings.CUSTOM_SNIPPETS_EDIT_PANEL_TITLE);
}
}

/**
Expand Down Expand Up @@ -213,18 +212,24 @@ define(function (require, exports, module) {
}

/**
* Initializes the toolbar title for the list view
* This is called when the panel is first opened to ensure the snippet count is displayed
* Resets the tab title back to the default list view title.
* Called when the panel is first opened or toggled visible.
*/
function initializeListViewToolbarTitle() {
const $toolbarTitle = $(".toolbar-title");
const snippetCount = Global.SnippetHintsList.length;
const countText = snippetCount > 0 ? `(${snippetCount})` : "";
$toolbarTitle.html(
`${Strings.CUSTOM_SNIPPETS_PANEL_TITLE} <span id="snippets-count" class="snippets-count">${countText}</span>`
);
if (_panel) {
_panel.setTitle(Strings.CUSTOM_SNIPPETS_PANEL_TITLE);
}
}

/**
* Sets the panel reference so UIHelper can update the tab title.
* @param {Object} panel The Panel instance returned by WorkspaceManager.createBottomPanel
*/
function init(panel) {
_panel = panel;
}

exports.init = init;
exports.showEmptySnippetMessage = showEmptySnippetMessage;
exports.showSnippetsList = showSnippetsList;
exports.clearSnippetsList = clearSnippetsList;
Expand Down
15 changes: 0 additions & 15 deletions src/extensionsIntegrated/CustomSnippets/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,20 +569,6 @@ define(function (require, exports, module) {
$("#edit-file-extn-box").val("");
}

/**
* Updates the snippets count which is displayed in the toolbar at the left side
* @private
*/
function updateSnippetsCount() {
const count = Global.SnippetHintsList.length;
const $countSpan = $("#snippets-count");
if (count > 0) {
$countSpan.text(`(${count})`);
} else {
$countSpan.text("");
}
}

/**
* validates and sanitizes file extension input
*
Expand Down Expand Up @@ -932,7 +918,6 @@ define(function (require, exports, module) {
exports.isSnippetSupportedInFile = isSnippetSupportedInFile;
exports.hasExactMatchingSnippet = hasExactMatchingSnippet;
exports.getMatchingSnippets = getMatchingSnippets;
exports.updateSnippetsCount = updateSnippetsCount;
exports.sanitizeFileExtensionInput = sanitizeFileExtensionInput;
exports.handleFileExtensionInput = handleFileExtensionInput;
exports.handleFileExtensionKeypress = handleFileExtensionKeypress;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div id="custom-snippets-panel" class="custom-snippets-panel bottom-panel vert-resizable top-resizer no-focus">
<div id="custom-snippets-toolbar" class="toolbar simple-toolbar-layout">
<div class="title-wrapper">
<span class="title toolbar-title">{{Strings.CUSTOM_SNIPPETS_PANEL_TITLE}} <span id="snippets-count" class="snippets-count"></span></span>
<div id="add-new-snippet-btn" class="custom-snippet-btn">
<button title="{{Strings.CUSTOM_SNIPPETS_ADD_NEW_TITLE}}">
<i class="fas fa-plus"></i>
<span class="add-btn-text">{{Strings.CUSTOM_SNIPPETS_ADD_BTN_LABEL}}</span>
</button>
</div>
<div id="back-to-list-menu-btn" class="custom-snippet-btn hidden">
Expand All @@ -18,7 +18,6 @@
<div id="filter-snippets-panel" class="filter-snippets-panel">
<input id="filter-snippets-input" type="text" placeholder="{{Strings.CUSTOM_SNIPPETS_FILTER_PLACEHOLDER}}" autocomplete="off" />
</div>
<a href="#" class="close" id="close-custom-snippets-panel-btn">&times;</a>
</div>
</div>

Expand Down
17 changes: 11 additions & 6 deletions src/extensionsIntegrated/CustomSnippets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ define(function (require, exports, module) {
* @private
*/
function _createPanel() {
customSnippetsPanel = WorkspaceManager.createBottomPanel(PANEL_ID, $snippetsPanel, PANEL_MIN_SIZE);
customSnippetsPanel = WorkspaceManager.createBottomPanel(PANEL_ID, $snippetsPanel, PANEL_MIN_SIZE,
Strings.CUSTOM_SNIPPETS_PANEL_TITLE);
UIHelper.init(customSnippetsPanel);
customSnippetsPanel.show();

// also register the handlers
Expand Down Expand Up @@ -129,7 +131,6 @@ define(function (require, exports, module) {
* @private
*/
function _registerHandlers() {
const $closePanelBtn = $("#close-custom-snippets-panel-btn");
const $saveCustomSnippetBtn = $("#save-custom-snippet-btn");
const $cancelCustomSnippetBtn = $("#cancel-custom-snippet-btn");
const $abbrInput = $("#abbr-box");
Expand Down Expand Up @@ -161,10 +162,6 @@ define(function (require, exports, module) {
SnippetsList.showSnippetsList();
});

$closePanelBtn.on("click", function () {
_hidePanel();
});

$saveCustomSnippetBtn.on("click", function () {
Driver.handleSaveBtnClick();
});
Expand Down Expand Up @@ -258,6 +255,14 @@ define(function (require, exports, module) {
});
}

// When the panel tab is closed externally (e.g. via the × button),
// update the menu checked state to stay in sync.
WorkspaceManager.on(WorkspaceManager.EVENT_WORKSPACE_PANEL_HIDDEN, function (event, panelID) {
if (panelID === PANEL_ID && customSnippetsPanel) {
CommandManager.get(MY_COMMAND_ID).setChecked(false);
}
});

AppInit.appReady(function () {
CommandManager.register(MENU_ITEM_NAME, MY_COMMAND_ID, showCustomSnippetsPanel);
// Render template with localized strings
Expand Down
2 changes: 0 additions & 2 deletions src/extensionsIntegrated/CustomSnippets/snippetsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ define(function (require, exports, module) {
console.error("failed to delete custom snippet correctly:", error);
});

// update the snippets count in toolbar
Helper.updateSnippetsCount();
// Refresh the entire list to properly handle filtering
showSnippetsList();
}
Expand Down
Loading
Loading