Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
fix toolbar alignment and parent container's fixed size so that title can use available space on phones (screen width < 700px) (#294)
Anas Bouzidad186052625a
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex 24b21305..3f786ffe 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -346,6 +346,8 @@ export class Editor {slidesB.classList.add('ed-phone-only')const formatB = btn(ICONS.panelRight, t('Format'), () => this.togglePanel('right'), t('Format — show or hide the properties panel'))formatB.classList.add('ed-phone-only')+ const phoneTools = div('ed-phone-tools')+ phoneTools.append(slidesB, insertD, history)this.syncWindowTitle()@@ -357,7 +359,7 @@ export class Editor {authored: new Map(), homeOf: new Map(),}- bar.append(logo, this.updatesB, title, this.fileChip, slidesB, insertD, history, insert, actions, moreD)+ bar.append(logo, this.updatesB, title, this.fileChip, phoneTools, insert, actions, moreD)// main areaconst main = div('ed-main')diff --git a/slides/src/styles.css b/slides/src/styles.cssindex 095cbb17..adc3955a 100644--- a/slides/src/styles.css+++ b/slides/src/styles.css@@ -2096,6 +2096,7 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }/* the phone-only controls exist in the DOM at every width; only the fold classshows them, so applyPhoneChrome never has to create or destroy anything */.ed-phone-only { display: none; }+.ed-phone-tools { display: contents; }.ed-topbar.ed-bar-fold .ed-phone-only { display: inline-flex; }/* Save stays one tap; its save-AS caret does not fit beside the fold's smallset of buttons and is the least-used half. The list it opens is not lost —@@ -2167,7 +2168,20 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }/* HIG touch targets — a 36px icon is a mis-tap on glass */.ed-topbar .ed-btn { min-width: 44px; min-height: 44px; justify-content: center; }.ed-topbar .ed-menu .ed-btn { min-width: 0; } /* menu rows are text, not targets */- .ed-title { flex: 0 1 90px; }+ .ed-title { flex: 0 1 220px; }+ .ed-phone-tools {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 4px;+ flex: 1 1 auto;+ min-inline-size: max-content;+ }+ .ed-topbar .ed-group-right {+ margin-inline-start: 0;+ inline-size: fit-content;+ flex: 0 0 auto;+ }/* Panels become OVERLAY DRAWERS. As flex siblings the 188px sidebar left a214px canvas on a 402px screen — the thing you are editing became the