refactor(www): adopt RAC 1.20 TokenField and context menu trigger - #554
Open
mehdibha wants to merge 2 commits into
Open
refactor(www): adopt RAC 1.20 TokenField and context menu trigger#554mehdibha wants to merge 2 commits into
mehdibha wants to merge 2 commits into
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
React Aria Components 1.20.0 (released today) ships the two features we were carrying workarounds for: the official TokenField and native context menu support in MenuTrigger. This PR updates the packages and deletes both workarounds.
Package update
react-aria-components^1.19.0 → ^1.20.0,react-aria→ ^3.51.0,react-stately→ ^3.49.0.@internationalized/date→ ^3.12.3 — required to dedupe: keeping 3.12.2 alongside react-aria's 3.12.3 produced two class identities and ~60Time is not assignable to ZonedDateTimetype errors.minimumReleaseAgeExclude(replacing the previous versions' entries).TokenField: vendored copy deleted
www/src/registry/lib/react-aria-token-field/(vendored from adobe/react-spectrum#10318) is gone;ui/token-fieldandui/mentionnow import fromreact-aria-components/TokenField. The shipped API matches the PR except for renames, applied across base files, types, demos, docs, and the landingai-promptshowcase:TokenSegmentList→TokenFieldValueDirectionenum →TokenFieldValue.DirectionpositionToDOMRange→tokenFieldPositionToDOMRangeThe token-field docs no longer describe the primitive as vendored and link to the official TokenField page. Demo subclasses renamed to match (
TagFieldValue,HashtagFieldValue).ContextMenu: registry item deleted, folded into Menu
MenuTriggerPropsnow includestrigger: 'press' | 'longPress' | 'contextMenu', and ourMenuwrapper already extends it — so the entireui/context-menuitem (including the ~340-lineuse-context-menu-triggerhook) is replaced by the native trigger. The upstream implementation opens the menu at the pointer, and handles touch long-press, macOS Ctrl+Enter, and closing on outside right-click.longPressandcontextMenu, with a live demo (menu/demos/context-menu.tsx). Non-button trigger areas wrap in React Aria'sPressablewithrole/tabIndex.Verification
pnpm check,pnpm typecheckgreen;build:registry+build:referencesregenerated and committed.