Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Modal Layout: Group Shortcuts and Buttons with Responsive Scrolling. Solves #10591 #10612

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -4988,10 +4988,10 @@ img.tile-debug {
flex-direction: column;
}

.modal .content {
/* .modal .content {
overflow-x: hidden;
overflow-y: auto;
}
} */

.modal .loader {
margin-bottom: 10px;
Expand Down Expand Up @@ -5030,6 +5030,12 @@ img.tile-debug {
text-align: center;
}

.content-wrapper {
overflow-x: hidden;
overflow-y: auto;
max-height: calc(90vh - 100px);
}

.modal-section.buttons button {
min-width: 130px;
}
Expand Down
8 changes: 6 additions & 2 deletions modules/ui/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ export function uiConfirm(selection) {
section.append('div')
.attr('class', 'modal-section header');

section.append('div')
// Wrapper for message-text and buttons
var contentWrapper = section.append('div')
.attr('class', 'content-wrapper');

contentWrapper.append('div')
.attr('class', 'modal-section message-text');

var buttons = section.append('div')
var buttons = contentWrapper.append('div')
.attr('class', 'modal-section buttons cf');


Expand Down
6 changes: 5 additions & 1 deletion modules/ui/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ export function uiShortcuts(context) {
.append('h2')
.call(t.append('shortcuts.title'));

// Wrapper for grouping shortcuts list and buttons under content-wrapper
var wrapper = content.append('div')
.attr('class', 'content-wrapper modal-section');

fileFetcher.get('shortcuts')
.then(function(data) {
_dataShortcuts = data;
content.call(render);
wrapper.call(render);
})
.catch(function() { /* ignore */ });
}
Expand Down
Loading