Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
Slideshow nudge: remove the first-load particle circles
nyblnet0178a4dffb7b
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex b3981fe5..78949a30 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -331,10 +331,6 @@ export class Editor {this.restorePanelWidths()this.canvas = new SlideCanvas(canvasWrap, this.store)- // First-load flourish: peach circles drift from across the canvas toward the- // Slideshow pill while the neon-runner nudge is active. Deferred so layout- // (pill + canvas rects) is settled before we trajectory the stream.- requestAnimationFrame(() => this.startSlideshowHintParticles(pill, canvasWrap))this.canvas.onCommentModeChange = (on) => commentB.classList.toggle('ed-btn-armed', on)this.canvas.onSlideNav = (dir) => this.store.goToLinear(dir)this.panel = new PropsPanel(this.props, this.store)@@ -1409,66 +1405,6 @@ export class Editor {if (!w) this.toast(t('Couldn’t open the speaker view — allow pop-ups for this site.'))}- /** First-load flourish: while the neon-runner nudge is active, stream- * translucent peach circles from across the whole canvas so they drift down- * and converge on the Slideshow pill — a second, softer "look here" cue.- * Runs only when the hint is showing; skipped under reduced-motion. */- private startSlideshowHintParticles(pill: HTMLElement, host: HTMLElement) {- if (!pill.classList.contains('ed-hint-pulse')) return- try { if (matchMedia('(prefers-reduced-motion: reduce)').matches) return } catch { /* no matchMedia */ }- // wait for layout so the pill has real coordinates to aim at- if (!pill.getBoundingClientRect().width) {- requestAnimationFrame(() => this.startSlideshowHintParticles(pill, host))- return- }- const layer = document.createElement('div')- layer.className = 'ed-hint-particles'- host.appendChild(layer)-- // a "magic" palette — heavily muted, near-grey pastels (just a hint of hue)- const PALETTE = [- '221 190 184', // peach (wordmark slash, muted)- '221 178 191', // rose- '221 204 178', // amber- '198 187 221', // lavender- '179 203 221', // sky- '180 213 203', // mint- '212 184 218', // magenta- ]- const spawn = () => {- const hostR = host.getBoundingClientRect()- const pillR = pill.getBoundingClientRect()- const tx = pillR.left + pillR.width / 2 - hostR.left- const ty = pillR.top + pillR.height / 2 - hostR.top- const sx = Math.random() * hostR.width // anywhere across the width- const sy = Math.random() * Math.max(40, ty - 40) // above the button- const size = 16 + Math.random() * 42- const rgb = PALETTE[Math.floor(Math.random() * PALETTE.length)]- const c = document.createElement('div')- c.className = 'ed-hint-particle'- c.style.left = `${sx}px`- c.style.top = `${sy}px`- c.style.width = c.style.height = `${size}px`- c.style.background = `radial-gradient(circle at center, rgb(${rgb} / 0.9), rgb(${rgb} / 0) 70%)`- layer.appendChild(c)- const a = c.animate([- { transform: 'translate(-50%,-50%) scale(0.35)', opacity: 0 },- { transform: 'translate(-50%,-50%) scale(1)', opacity: 0.85, offset: 0.25 },- { opacity: 0.7, offset: 0.6 },- { transform: `translate(${tx - sx}px, ${ty - sy}px) translate(-50%,-50%) scale(0.1)`, opacity: 0 },- ], { duration: 1600 + Math.random() * 1000, easing: 'cubic-bezier(.35,0,.6,1)' })- a.onfinish = () => c.remove()- }-- const stop = () => { clearInterval(iv); setTimeout(() => layer.remove(), 2800) }- const iv = setInterval(() => {- if (!pill.isConnected || !pill.classList.contains('ed-hint-pulse')) stop()- else { spawn(); if (Math.random() < 0.6) spawn() } // denser stream- }, 120)- // hard stop after the runner's window even if the class lingers (e.g. hover)- setTimeout(stop, 6000)- }-present(fromStart = false, fullscreen = true) {if (this.presenting) return// They've started a slideshow — retire the first-run nudge for good.diff --git a/slides/src/styles.css b/slides/src/styles.cssindex 7fc8944b..0873eb04 100644--- a/slides/src/styles.css+++ b/slides/src/styles.css@@ -1592,23 +1592,6 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }opacity: 1;}}-/* first-load flourish: translucent peach circles drift from across the whole- canvas toward the Slideshow pill while the neon runner is active. The stream- is built + trajected in editor.ts (startSlideshowHintParticles); it sits below- the pill cluster (z 11) so circles fall in behind the button. */-.ed-hint-particles {- position: absolute;- inset: 0;- overflow: hidden;- pointer-events: none;- z-index: 6;-}-.ed-hint-particle {- position: absolute;- border-radius: 50%;- background: radial-gradient(circle at center, rgb(255 158 138 / 0.5), rgb(255 158 138 / 0) 70%);- will-change: transform, opacity;-}.ed-present-pill .ed-pill-main {border-radius: 999px 0 0 999px;padding: 6px 10px 6px 14px;