Skip to content

Commit 2786f2b

Browse files
Fix import preview dialog close overlap and merge selection scroll layout
1 parent d3821ec commit 2786f2b

4 files changed

Lines changed: 50 additions & 4 deletions

File tree

209 KB
Binary file not shown.

folderview.plus.plg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
<!ENTITY launch "Settings/FolderViewPlus">
77
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
88
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/main/folderview.plus.plg">
9-
<!ENTITY version "2026.03.08.7">
10-
<!ENTITY md5 "75eb1e22d1cc01b213b7ce34776088b6">
9+
<!ENTITY version "2026.03.08.8">
10+
<!ENTITY md5 "8d2498345e54795abf0112335c888025">
1111
]>
1212

1313
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" icon="folder-open-o" support="https://github.com/alexphillips-dev/FolderView-Plus/issues" min="7.0.0">
1414
<CHANGES>
1515

16+
###2026.03.08.8
17+
- Fix import preview dialog UI polish:
18+
- stabilize import-selection scroll position while toggling items,
19+
- improve selection list layout/overflow styling in merge mode,
20+
- remove conflicting titlebar close button on this dialog to prevent top-right overlap with action controls.
21+
1622
###2026.03.08.7
1723
- Make Docker clone-row matching independent of table IDs/classes:
1824
- treat rows with `folder-preview` as canonical source rows,

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/scripts/folderviewplus.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ const renderOperationSelection = () => {
462462
container.empty();
463463
return;
464464
}
465+
const previousScrollTop = Number(container.scrollTop()) || 0;
465466

466467
const sections = [
467468
{ key: 'creates', title: 'Create', items: importSelectionState.creates },
@@ -479,6 +480,10 @@ const renderOperationSelection = () => {
479480
}).join('');
480481

481482
container.html(html);
483+
if (previousScrollTop > 0) {
484+
const maxScroll = Math.max(0, container.prop('scrollHeight') - container.innerHeight());
485+
container.scrollTop(Math.min(previousScrollTop, maxScroll));
486+
}
482487

483488
container.find('input[data-group-toggle]').off('change.fvimport').on('change.fvimport', (event) => {
484489
const group = String($(event.currentTarget).attr('data-group-toggle') || '');
@@ -546,6 +551,8 @@ const showImportPreviewDialog = (type, parsed) => new Promise((resolve) => {
546551
resizable: false,
547552
width: 760,
548553
modal: true,
554+
dialogClass: 'fv-import-preview-modal',
555+
closeText: '',
549556
show: { effect: 'fade', duration: 120 },
550557
hide: { effect: 'fade', duration: 120 },
551558
close: () => resolve(dialogResult),

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/styles/folderviewplus.css

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,25 +353,50 @@
353353
.import-selection {
354354
margin-bottom: 0.65rem;
355355
max-height: 260px;
356-
overflow: auto;
356+
overflow-y: auto;
357+
overflow-x: hidden;
358+
width: 100%;
357359
border: 1px solid rgba(255, 255, 255, 0.12);
358360
border-radius: 5px;
359361
padding: 0.45rem 0.55rem;
362+
box-sizing: border-box;
360363
}
361364

362365
.import-selection-group {
366+
display: block;
367+
width: 100%;
368+
min-width: 0;
363369
margin-bottom: 0.5rem;
370+
padding: 0.35rem 0.45rem;
371+
border: 1px solid rgba(255, 255, 255, 0.1);
372+
border-radius: 4px;
373+
background: rgba(0, 0, 0, 0.12);
374+
box-sizing: border-box;
375+
}
376+
377+
.import-selection-group:last-child {
378+
margin-bottom: 0;
364379
}
365380

366381
.import-selection-group h4 {
367382
margin: 0 0 0.35rem 0;
368383
font-size: 0.93rem;
369384
}
370385

386+
.import-selection-group h4 > label {
387+
display: flex;
388+
align-items: center;
389+
gap: 0.45rem;
390+
}
391+
371392
.import-selection-item {
372-
display: block;
393+
display: flex;
394+
align-items: center;
395+
gap: 0.45rem;
396+
width: 100%;
373397
font-size: 0.9rem;
374398
margin: 0.2rem 0;
399+
box-sizing: border-box;
375400
}
376401

377402
#import-preview-dialog .preview-meta {
@@ -422,6 +447,14 @@
422447
font-size: 12px;
423448
}
424449

450+
.ui-dialog.fv-import-preview-modal .ui-dialog-titlebar {
451+
padding-right: 14px;
452+
}
453+
454+
.ui-dialog.fv-import-preview-modal .ui-dialog-titlebar-close {
455+
display: none !important;
456+
}
457+
425458
@media (max-width: 1080px) {
426459
.folder-toolbar {
427460
grid-template-columns: 1fr;

0 commit comments

Comments
 (0)