Skip to content

Commit 3995996

Browse files
committed
feat: git panel always on desktop, shell dropdown fix, tools cleanup
- Git panel tab now always visible on desktop apps even for non-git projects, showing Init/Clone buttons - Removed Find in Files button from the Tools default panel launcher - Shell dropdown now appended to terminal body to avoid overflow clipping from the tab bar
1 parent 38ade6e commit 3995996

4 files changed

Lines changed: 28 additions & 14 deletions

File tree

src/extensions/default/Git/src/Panel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,11 @@ define(function (require, exports) {
13891389
$gitPanel.find(".git-not-available").show();
13901390
Utils.enableCommand(Constants.CMD_GIT_INIT, true);
13911391
Utils.enableCommand(Constants.CMD_GIT_CLONE, true);
1392+
// On desktop, always show the git panel tab so users can
1393+
// init/clone even when the project is not a git repo.
1394+
if (Phoenix.isNativeApp) {
1395+
gitPanel.setVisible(true);
1396+
}
13921397
} else {
13931398
Main.$icon.addClass("warning");
13941399
toggle(false);

src/extensionsIntegrated/Terminal/main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@ define(function (require, exports, module) {
251251
* Show/hide the shell dropdown
252252
*/
253253
function _showShellDropdown() {
254+
// Move dropdown out of the flyout and append to the terminal body
255+
// so it isn't clipped by the tab bar's overflow: hidden.
256+
// Position it above the actions row, aligned to the right.
257+
const $body = $panel.find(".terminal-body");
258+
const $actions = $panel.find(".terminal-flyout-actions");
259+
const actionsRect = $actions[0].getBoundingClientRect();
260+
const bodyRect = $body[0].getBoundingClientRect();
261+
262+
$shellDropdown.appendTo($body);
263+
$shellDropdown.css({
264+
position: "absolute",
265+
bottom: (bodyRect.bottom - actionsRect.top) + "px",
266+
right: "0",
267+
left: "auto",
268+
top: "auto"
269+
});
254270
$shellDropdown.removeClass("forced-hidden");
255271
// Close on outside click
256272
setTimeout(function () {

src/styles/Extn-Terminal.less

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,8 @@
314314
display: inline;
315315
}
316316

317-
/* ─── Shell dropdown (pops above the actions row) ─── */
317+
/* ─── Shell dropdown (positioned on $panel to avoid flyout overflow clip) ─── */
318318
.terminal-shell-dropdown {
319-
position: absolute;
320-
bottom: 100%;
321-
right: 0;
322319
min-width: 180px;
323320
background: var(--terminal-tab-bg);
324321
border: 1px solid var(--terminal-border);

src/view/DefaultPanelView.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,12 @@ define(function (require, exports, module) {
4343
label: Strings.CMD_VIEW_TOGGLE_PROBLEMS || "Problems",
4444
commandID: Commands.VIEW_TOGGLE_PROBLEMS
4545
},
46-
{
47-
id: "search",
48-
icon: "fa-solid fa-magnifying-glass",
49-
label: Strings.CMD_FIND_IN_FILES || "Find in Files",
50-
commandID: Commands.CMD_FIND_IN_FILES
51-
},
5246
{
5347
id: "git",
5448
icon: "fa-solid fa-code-branch",
5549
label: Strings.GIT_PANEL_TITLE || "Git",
56-
commandID: Commands.CMD_GIT_TOGGLE_PANEL
50+
commandID: Commands.CMD_GIT_TOGGLE_PANEL,
51+
nativeOnly: true
5752
},
5853
{
5954
id: "snippets",
@@ -130,15 +125,16 @@ define(function (require, exports, module) {
130125

131126
/**
132127
* Show or hide buttons based on current state.
133-
* The Problems button is always shown since the panel now displays
134-
* meaningful content regardless of error state.
128+
* On desktop, Git is always shown. On browser, it depends on availability.
135129
* @private
136130
*/
137131
function _updateButtonVisibility() {
138132
if (!_$panel) {
139133
return;
140134
}
141-
_$panel.find('.default-panel-btn[data-btn-id="git"]').toggle(_isGitAvailable());
135+
if (!Phoenix.isNativeApp) {
136+
_$panel.find('.default-panel-btn[data-btn-id="git"]').toggle(_isGitAvailable());
137+
}
142138
}
143139

144140
/**

0 commit comments

Comments
 (0)