Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
Editor: give the slideshow toggles their own section
nyblnet6b3b16611ec3
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a086767b..14b96012 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,9 +11,10 @@ pre-1.0.## [Unreleased]-- **Hide the slide number or progress bar.** The Slide panel now has toggles- for both, plus Reveal's corner arrows. They're deck-wide and travel in the- file, so a deck you hand to someone else presents the way you designed it.+- **Hide the slide number or progress bar.** A new **Slideshow** section in the+ slide panel has toggles for both, plus the corner navigation arrows. They're+ deck-wide and travel in the file, so a deck you hand to someone else presents+ the way you designed it.- **Fix: presenting on a phone shows the deck, not a scrollable page.** Belowabout 435px wide, the presentation was quietly switching to a scrollingdiff --git a/slides/src/editor/panels.ts b/slides/src/editor/panels.tsindex 42dac1e9..659cd6c8 100644--- a/slides/src/editor/panels.ts+++ b/slides/src/editor/panels.ts@@ -170,7 +170,7 @@ export class PropsPanel {}/** Collapsed by default until the user opens them (persisted per title). */- private static CLOSED_BY_DEFAULT = new Set(['Presenting', 'Interactivity', 'Layout', 'Advanced (JSON)'])+ private static CLOSED_BY_DEFAULT = new Set(['Slideshow', 'Presenting', 'Interactivity', 'Layout', 'Advanced (JSON)'])/*** Retrofit the flat panel into an accordion: every .ed-section header@@ -243,13 +243,34 @@ export class PropsPanel {this.row('Height', this.number(dh, 10, (v, fin) =>this.edit(() => { this.store.doc.size.height = Math.max(320, Math.min(4000, Math.round(v))) }, fin)))}- // Deck-wide presentation chrome. These live in doc.present because they are- // AUDIENCE-facing: what the author designs is what a recipient's audience- // sees. Contrast reduce-motion and locale, which are viewer preferences and- // deliberately never enter the document.+ this.row('Background', this.color(slide.background, (v, fin) =>+ this.edit(() => { this.store.slide.background = v }, fin)))+ this.row('Transition', this.select(+ ['none', 'fade', 'slide', 'zoom', 'morph'],+ slide.transition,+ (v) => this.edit(() => { this.store.slide.transition = v as TransitionKind }, true),+ ))+ if (slide.transition === 'morph') {+ const hint = document.createElement('p')+ hint.className = 'ed-hint'+ hint.innerHTML = t('<b>Morph</b> animates elements that appear on both this slide and the previous one (copy a slide, then move things around).')+ this.host.appendChild(hint)+ }++ // Deck-wide slideshow chrome, in its own section: these are not properties+ // of THIS slide (the section above) but of how the whole deck presents, and+ // mixing them in beside Background and Transition read as per-slide.//- // Each writes `undefined` at its default rather than the default value, so- // a deck that never touches these carries no `present` block at all.+ // "Slideshow" is what the UI already calls present mode on the button, and+ // it avoids colliding with the element panel's own "Presenting" section.+ this.section(t('Slideshow'))+ // These live in doc.present because they are AUDIENCE-facing: what the+ // author designs is what a recipient's audience sees. Contrast reduce-motion+ // and locale, which are viewer preferences and deliberately never enter the+ // document.+ //+ // Each writes `undefined` at its default rather than the default value, so a+ // deck that never touches these carries no `present` block at all.const pres = this.store.doc.present ?? {}const setPresent = (k: 'slideNumber' | 'progress' | 'controls', v: boolean, dflt: boolean) =>this.edit(() => {@@ -267,19 +288,6 @@ export class PropsPanel {this.row('Corner arrows', this.toggle(pres.controls ?? false,(v) => setPresent('controls', v, false)))- this.row('Background', this.color(slide.background, (v, fin) =>- this.edit(() => { this.store.slide.background = v }, fin)))- this.row('Transition', this.select(- ['none', 'fade', 'slide', 'zoom', 'morph'],- slide.transition,- (v) => this.edit(() => { this.store.slide.transition = v as TransitionKind }, true),- ))- if (slide.transition === 'morph') {- const hint = document.createElement('p')- hint.className = 'ed-hint'- hint.innerHTML = t('<b>Morph</b> animates elements that appear on both this slide and the previous one (copy a slide, then move things around).')- this.host.appendChild(hint)- }// interactivity: naming, state-of, hover focusthis.section(t('Interactivity'))