Skip to content

Feat/resizable panes#1

Merged
agarzon merged 4 commits into
mainfrom
feat/resizable-panes
Jun 15, 2026
Merged

Feat/resizable panes#1
agarzon merged 4 commits into
mainfrom
feat/resizable-panes

Conversation

@agarzon

@agarzon agarzon commented Jun 15, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 15, 2026 04:02
@agarzon agarzon merged commit a527a31 into main Jun 15, 2026
1 check passed
@agarzon agarzon deleted the feat/resizable-panes branch June 15, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds drag-resizable left (tree) and right (preview) panes to the FileManaty fullscreen overlay, persisting widths per-browser and allowing quick reset to defaults.

Changes:

  • Introduces a new web/resize.js module implementing pointer-driven gutter resizing with min-width clamps and localStorage persistence.
  • Integrates resizable gutters into the overlay layout/CSS and initializes the behavior on overlay init.
  • Updates documentation and bumps version/changelog for the new feature.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web/resize.js New drag-to-resize implementation for tree/preview panes with persistence and reset behavior.
web/filemanaty.js Hooks the resizer into the overlay and adds gutter styling; adjusts pane borders to use gutters.
README.md Documents drag-resizable panes feature.
filemanaty/init.py Bumps package version to 0.10.0.
CHANGELOG.md Adds v0.10.0 entry describing resizable panes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/resize.js
Comment on lines +23 to +26
function readStored(key) {
const v = parseInt(localStorage.getItem(key), 10);
return Number.isFinite(v) && v > 0 ? v : null;
}
Comment thread web/resize.js
Comment on lines +28 to +31
export function initPaneResize(bodyEl) {
const treeEl = bodyEl.querySelector("#fm-tree");
const previewEl = bodyEl.querySelector("#fm-preview");

Comment thread web/resize.js
Comment on lines +107 to +116
gutTree.addEventListener("dblclick", () => {
localStorage.removeItem(LS_TREE);
treeCol = DEFAULT_TREE;
applyColumns(bodyEl, treeCol, previewCol);
});
gutPreview.addEventListener("dblclick", () => {
localStorage.removeItem(LS_PREVIEW);
previewCol = DEFAULT_PREVIEW;
applyColumns(bodyEl, treeCol, previewCol);
});
Comment thread web/resize.js
Comment on lines +76 to +93
function onUp() {
document.removeEventListener("pointermove", onMove);
document.removeEventListener("pointerup", onUp);
document.body.style.userSelect = prevUserSelect;
document.body.style.cursor = "";
if (!moved) return; // a plain click should not freeze a % default to px
if (which === "tree") {
localStorage.setItem(
LS_TREE, String(Math.round(treeEl.getBoundingClientRect().width)));
} else {
localStorage.setItem(
LS_PREVIEW, String(Math.round(previewEl.getBoundingClientRect().width)));
}
}

document.addEventListener("pointermove", onMove);
document.addEventListener("pointerup", onUp);
}
Comment thread web/resize.js
Comment on lines +82 to +88
if (which === "tree") {
localStorage.setItem(
LS_TREE, String(Math.round(treeEl.getBoundingClientRect().width)));
} else {
localStorage.setItem(
LS_PREVIEW, String(Math.round(previewEl.getBoundingClientRect().width)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants