Skip to content

Commit 35247d1

Browse files
allilevineclaude
authored andcommitted
Write: Replace highlight-to-format with persistent top toolbar (#48305)
* feat: replace highlight-to-format toolbar with persistent top toolbar Replace the floating selection-based formatting toolbar with a persistent toolbar fixed below the topbar, always visible on the Write page. - Toolbar always visible (no show/hide logic, no animation) - Heading dropdown (Normal, H2, H3) with state-based label - Inline formatting: bold, italic, underline, strikethrough - Text color picker with 6 preset colors (default resets without stripping other formatting) - Text alignment: left, center, right (with div cleanup) - Lists: ordered and unordered - Link, blockquote, and image buttons - Highlight text + paste URL creates a link automatically - Horizontally scrollable on mobile with JS-positioned dropdowns - Fade-in on dropdown menus only - Updated convertToBlocks to handle lists, text-align, and color markup - Added 6 new PHP tests for toolbar markup and state - Higher z-index and broader chrome-hiding for Atomic compatibility - Use filemtime for asset versioning to bust CDN cache on changes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: toolbar dropdown polish — animation jump, click-outside, cache busting - Fix color menu and link popover horizontal jump caused by fade-in animation overriding the translateX(-50%) centering transform - Add click-outside-to-close for heading and color dropdowns - Use max(view.js, style.css) mtime for cache version so CSS-only changes also bust the cache - Remove orphaned JSDoc block Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: use non-centered fade-in animation for mobile dropdowns On mobile, color menu and link popover use transform: none instead of translateX(-50%), so override the animation back to bw-fade-in to prevent the centered animation from fighting the mobile positioning. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: toolbar polish — color mismatch, listener leaks, link input, quote alignment - Align default text color to #1a1a1a across JS/PHP/CSS (was #333333 in JS) - Fix event listener leak in heading and color dropdown close handlers - Update heading label immediately when selecting from dropdown - Bind link input value to state so it clears properly between uses - Use getAttribute('href') instead of .href for raw link values - Close link popover on click-outside - Serialize text alignment on blockquote blocks - Bump heading dropdown caret from 10px to 12px Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: prevent link popover close handler leak on toggle-off Use a module-level variable for the link popover click-outside handler, matching the pattern already used by heading and color menu dropdowns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: link popover — allow text selection in input, fix reopen after apply Two fixes for the link popover: 1. preventToolbarBlur now skips inputs/textareas so users can select and interact with the URL text using the mouse. 2. applyLink, removeLink, and handleLinkKeyDown now clean up the click-outside handler and refocus the content area, so the link popover can be reopened immediately after applying a link. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5ee07ef commit 35247d1

5 files changed

Lines changed: 964 additions & 271 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: changed
3+
4+
Write: Replace highlight-to-format floating toolbar with a persistent top toolbar.

0 commit comments

Comments
 (0)