Skip to content

feat(composer): people and tags mention example, with suggestion list fixes - #927

Open
pasqualevitiello wants to merge 4 commits into
mainfrom
feat/composer-people-tags-mentions
Open

pasqualevitiello wants to merge 4 commits into
mainfrom
feat/composer-people-tags-mentions

Conversation

@pasqualevitiello

@pasqualevitiello pasqualevitiello commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A new composer example, p-composer-13, for mentioning people who can carry tags. Everything is one list, with no second step:

<ComposerPopup>
  Team members      avatar · name / team
  Contacts          avatar · name / email            [Clients] [Newsletter]
  Tags              ● Clients · 5 people
  ─────────────────────────────────────────
  Hold [Shift] to mention several
  • Typing a tag name (@news) also finds the people who carry it. Tags move to the top once the query is two or more characters and starts a tag name.
  • Shift+Enter or Shift-click mentions the highlighted person and keeps the list open with the same query. Escape then removes the leftover query.

Building it surfaced three composer bugs, fixed here:

 on(blur)
-  if suggestions are open: remember the query as dismissed
+  forget any dismissed query
   hide suggestions
+on(focus)
+  re-read the query at the caret

 suggestions are open when
-  the trigger has visible items
+  the caret follows a space  → a name continues past the word just typed
+  otherwise                  → the trigger has visible items

 <ComposerPopup>
-  free to move to the side of the field
+  stays above or below and shrinks to the available height
Typed Before After
@h␣ open closed
@sam␣ open open (Sam Rivera continues)
@sam rivera␣ open closed
blur, then focus on @ open every second time always open

Docs: the “Groups of people” section becomes “People and tags”, and the sentence about spaces in queries describes the new rule.

Evidence

  • Before: on main, six DOM tests written for these fixes fail: suggestions reopening on every refocus (two tests) and the space rule (four tests).

    After: the same six tests pass on this branch. The tests are not part of this PR; they were removed before review.

  • The existing suites pass (bun test: 47, composer DOM tests: 9), along with type checks for apps/ui and packages/ui, registry:validate-deps, and the Biome format check.

  • The example and the popup sizing were checked in the browser at desktop and phone widths, in light and dark, including an axe scan of the open list. Shift-click was exercised with dispatched events only, not with a real mouse.

Merge Danger

Door: two-way

No API is removed or renamed. ActiveQuery gains a required spaceAfter field, and composer-query gains a continuesPastQuery export that use-composer-editor now depends on.

Blast Radius: composer

Three behaviour changes reach every composer with suggestions:

  • A space now closes the list unless a name continues past the word just typed. This applies even with showEmpty.
  • Escape no longer keeps the list closed across a blur: coming back to the field with the caret on a query shows the suggestions again.
  • The popup no longer flips to the side of the field when space is short. It shrinks and scrolls instead.

Known limits of the example, not of the composer: a keep-open pick resets the undo history, clicking away leaves the typed query in the message, there is no keep-open on touch, and a keep-open pick is not announced to screen readers. The two tag dots use raw palette colors (bg-sky-500, bg-amber-500).

#926 also edits composer-query.ts, so whichever merges second needs a rebase and a registry rebuild.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… fixes

Add p-composer-13: one mention list with Team members, Contacts and
Tags sections, each contact's tags shown as badges, and Shift+Enter or
Shift-click to mention several people without closing the list.

Composer fixes found while building it:

- Suggestions reopen every time the field regains focus with the caret
  on a query. Blur used to record the query as dismissed, so refocusing
  alternated between showing and hiding them.
- A space closes the suggestions unless a name continues past the word
  just typed: "@sam " still shows Sam Rivera, "@h " closes.
- The popup shrinks to the available height instead of moving to the
  side of the field.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
coss-com Ready Ready Preview Nov 19, 2026 4:26pm UTC
coss-com-ui Ready Ready Preview Nov 19, 2026 4:26pm UTC
coss-examples-calcom Ready Ready Preview Nov 19, 2026 4:26pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
coss-com-origin Skipped Skipped Nov 19, 2026 4:26pm UTC

Request Review

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@Udit-takkar Udit-takkar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lfg

This branch was successfully deployed

3 active and 1 inactive deployments
Preview – coss-com-ui — f06e8295 Deployed Nov 19, 2026 by vercel[bot]
Preview – coss-examples-calcom — f06e8295 Deployed Nov 19, 2026 by vercel[bot]
Preview – coss-com — f06e8295 Deployed Nov 19, 2026 by vercel[bot]
Preview – coss-com-origin — f06e8295 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants