From 280bec70fcec9f116711cbea75c018b609a5fae1 Mon Sep 17 00:00:00 2001 From: Max Yinger Date: Tue, 13 Oct 2026 16:06:48 -0600 Subject: [PATCH 1/2] feat(mosaic): animate contact list rows and the primary badge in the user profile Co-Authored-By: Claude Fable 5.1 --- .changeset/contact-list-rows.md | 2 + packages/mosaic/docs/motion.md | 120 ++++++++ ...ser-profile-contact-list-row.view.test.tsx | 217 +++++++++++++- .../features/user-profile/use-contact-list.ts | 37 +++ ...profile-contact-list-row.markers.stylex.ts | 4 + .../user-profile-contact-list-row.styles.ts | 151 ++++++++++ .../user-profile-contact-list-row.view.tsx | 264 ++++++++++++++---- .../user-profile-contact.messages.ts | 1 + .../user-profile-contact.utils.ts | 8 + .../user-profile-email-actions.test.tsx | 77 +++++ .../user-profile-email-section.controller.ts | 12 +- .../user-profile-email-section.model.ts | 8 +- .../user-profile-email-section.types.ts | 2 + .../user-profile-email-section.view.tsx | 7 +- ...ser-profile-phone-section.feature.test.tsx | 5 +- .../user-profile-phone-section.controller.ts | 17 +- .../user-profile-phone-section.model.ts | 8 +- .../user-profile-phone-section.types.ts | 2 + .../user-profile-phone-section.view.tsx | 7 +- packages/mosaic/src/primitives/hooks/index.ts | 2 + .../hooks/use-presence-list.test.tsx | 116 ++++++++ .../src/primitives/hooks/use-presence-list.ts | 99 +++++++ .../hooks/use-stable-order.test.tsx | 62 ++++ .../src/primitives/hooks/use-stable-order.ts | 37 +++ .../stories/fixtures/user-profile-emails.ts | 15 +- .../stories/fixtures/user-profile-phones.ts | 9 +- .../stories/user-profile-email-section.mdx | 15 + .../user-profile-email-section.stories.tsx | 4 + 28 files changed, 1236 insertions(+), 72 deletions(-) create mode 100644 .changeset/contact-list-rows.md create mode 100644 packages/mosaic/src/features/user-profile/use-contact-list.ts create mode 100644 packages/mosaic/src/features/user-profile/user-profile-contact-list-row.markers.stylex.ts create mode 100644 packages/mosaic/src/features/user-profile/user-profile-contact-list-row.styles.ts create mode 100644 packages/mosaic/src/primitives/hooks/use-presence-list.test.tsx create mode 100644 packages/mosaic/src/primitives/hooks/use-presence-list.ts create mode 100644 packages/mosaic/src/primitives/hooks/use-stable-order.test.tsx create mode 100644 packages/mosaic/src/primitives/hooks/use-stable-order.ts diff --git a/.changeset/contact-list-rows.md b/.changeset/contact-list-rows.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/contact-list-rows.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/mosaic/docs/motion.md b/packages/mosaic/docs/motion.md index c3456049e83..e47bce83d74 100644 --- a/packages/mosaic/docs/motion.md +++ b/packages/mosaic/docs/motion.md @@ -276,12 +276,132 @@ nothing. The surface keeps its fade and pins the scale (inline text has none to and its entrance delay goes to `instant` as well: it exists to wait for the row, and a row that has snapped open leaves nothing to wait for. +### Rows in a list + +The contact rows in the user profile (`user-profile-contact-list-row.view.tsx`) adopt +the recipe for a `