Improve/ RTC UI refinement. #75535
Improve/ RTC UI refinement. #75535dabowman wants to merge 8 commits intoWordPress:improve/awareness-cursors-jsxfrom
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @dabowman! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
2823310 to
4bf94b6
Compare
c7c2694 to
fe75b2f
Compare
Bug: useBlockHighlighting crashes with TypeError: Cannot read properties of undefined (reading 'WholeBlock') when two users edit the same post. Cause: In use-block-highlighting.ts:15, SelectionType is destructured from unlock(coreDataPrivateApis), but it was never added to the private APIs in private-apis.js. It's undefined at runtime. Fix: Import SelectionType directly from @wordpress/core-data (it's already a public export), matching the pattern in use-render-cursors.ts. Remove it from the unlock() destructure.
Replace the naive RGB lightness-shift color system with a contrast-aware pipeline that derives two purpose-specific colors per collaborator from seed colors in the palette: - strokeColor: meets 3.1:1 contrast against white (WCAG 2.1 SC 1.4.11 for UI components like borders and block highlights) - backgroundColor: meets 7:1 contrast against white (WCAG 2.1 SC 1.4.3 AA for white text on colored cursor labels) Colors are manipulated in OKLCH space (Björn Ottosson's OKLAB) for perceptually uniform darkening — only lightness is reduced while chroma and hue are preserved. This avoids the hue drift that CIE LCH exhibits when darkening blues. The implementation is ~60 lines of pure math with zero external dependencies. Also updates the seed palette to use more vibrant, distinct colors and replaces the RGB-shift overflow strategy with OKLCH hue rotation for generating new colors when all palette slots are taken. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the inline box-shadow approach for RTC block highlighting with the same outline-based method core uses for `.is-highlighted` blocks. This ensures consistent outline style, width, offset, and zoom scaling across both the default selection and collaborator highlights. - Switch from inline `style.boxShadow` to a `.is-collaborator-selected` CSS class with a `--collaborator-outline-color` custom property - Reuse the `selected-block-focus()` mixin from `@wordpress/base-styles` - Add `:not(:focus)` guard so the user's own selection always wins - Extract shared `collaborator-contrast-shadow()` mixin used by both the block highlight and avatar components - Add compiled `COLLABORATOR_CONTRAST_SHADOW` constant for iframe styles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redesign the cursor label from a plain text tag to a pill-shaped badge with the collaborator's avatar. The label defaults to showing just the avatar circle and expands on hover to reveal the username. - Add `collaborator-avatar()` mixin for shared avatar styles between the presence list and cursor label, using `--avatar-url` CSS custom property - Restyle cursor label as a flex pill with avatar + name, white outline contrast ring, and hover expand transition - Add white outline + elevation shadow to cursor caret for contrast - Fix block highlight inset shadow: use a wider inset that extends past the outline so the white inner ring remains visible - Consolidate `collaborator-contrast-shadow()` to include inset ring, fixing the `--with-color-border` avatar variant losing its inner ring - Sync all changes to `overlay-iframe-styles.ts` for iframe injection Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2317f57 to
16a4108
Compare
When a collaborator has no custom Gravatar, display their first two initials on their assigned background color instead of the default placeholder image. A shared gravatar-check utility detects real vs default avatars by preloading with `d=404` and caching the result for both the React presence avatar and the imperative cursor overlay. Also refines cursor overlay visuals: Safari-style blink animation, rounded caret edges, label centered on caret midpoint, and box-sizing fix for accurate avatar dimensions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fe75b2f to
ef83f5d
Compare
Summary
@wordpress/base-stylestokens)selected-block-focus()mixinTest plan
🤖 Generated with Claude Code