(core) Making side bars a bit more usable for narrow screen

Summary:
 - closes side bars when tapping content area
 - opens left panel when tapping the page name

Test Plan: Includes browser tests.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2705
This commit is contained in:
Cyprien P
2021-01-19 10:28:07 +01:00
parent 3ad9b18ddf
commit 4cd9a2d740
3 changed files with 15 additions and 4 deletions

View File

@@ -117,6 +117,10 @@ export function pagePanels(page: PageContents) {
),
cssContentOverlay(
dom.show((use) => use(left.panelOpen) || Boolean(right && use(right.panelOpen))),
dom.on('click', () => {
left.panelOpen.set(false);
if (right) { right.panelOpen.set(false); }
}),
testId('overlay'))
), (
!optimizeNarrowScreen ? null :