-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combobox rework #3168
Combobox rework #3168
Conversation
🦋 Changeset detectedLatest commit: 4dac4cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting how cleaner it gets! Left a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
…useSelected" This reverts commit 869f868.
I suggest getting feedback from @nemanja-tosic on this if he has time to review. It took quite a bit of effort to get mentions working previously, and I'm hoping for a smooth upgrade when this is done. |
Hi @dylans. Getting some more feedback on the new combobox API would definitely be helpful, especially with regard to the mentions plugin. The main changes are a deprecation of the old combobox store (combobox state should now be managed by the developer) and using a void element for the mention input node. Switching to a void isn't a decision I took lightly, but I found it was the only way to get assistive technologies to consistently recognise that the cursor is inside a combobox. |
# Conflicts: # apps/www/public/registry/index.json # apps/www/public/registry/styles/default/mention-input-element.json # apps/www/src/lib/plate/demo/values/mentionables.ts # apps/www/src/lib/plate/demo/values/slashRules.ts # apps/www/src/registry/default/example/playground-demo.tsx # apps/www/src/registry/default/plate-ui/mention-combobox.tsx # apps/www/src/registry/default/plate-ui/mention-input-element.tsx # apps/www/src/registry/default/plate-ui/slash-combobox.tsx # apps/www/src/registry/default/plate-ui/slash-input-element.tsx # apps/www/src/registry/registry.ts # packages/mention/src/__tests__/createEditorWithMentions.tsx # packages/mention/src/createMentionPlugin.ts # packages/mention/src/getMentionOnSelectItem.ts # packages/mention/src/handlers/index.ts # packages/mention/src/handlers/mentionOnKeyDownHandler.spec.tsx # packages/mention/src/handlers/mentionOnKeyDownHandler.ts # packages/mention/src/queries/findMentionInput.ts # packages/mention/src/queries/index.ts # packages/mention/src/queries/isNodeMentionInput.ts # packages/mention/src/queries/isSelectionInMentionInput.ts # packages/mention/src/transforms/index.ts # packages/mention/src/transforms/removeMentionInput.ts # packages/mention/src/types.ts # packages/mention/src/withMention.spec.tsx # packages/mention/src/withMention.ts # packages/slash-command/src/createSlashPlugin.ts # packages/slash-command/src/getSlashOnSelectItem.ts # packages/slash-command/src/handlers/index.ts # packages/slash-command/src/handlers/slashOnKeyDownHandler.ts # packages/slash-command/src/queries/findSlashInput.ts # packages/slash-command/src/queries/index.ts # packages/slash-command/src/queries/isNodeSlashInput.ts # packages/slash-command/src/queries/isSelectionInSlashInput.ts # packages/slash-command/src/transforms/index.ts # packages/slash-command/src/transforms/removeSlashInput.ts # packages/slash-command/src/types.ts # packages/slash-command/src/withSlashCommand.ts # packages/slate/src/interfaces/element/TElement.ts # packages/slate/src/interfaces/node/TAncestor.ts
Description
See changesets.
To do:
Examples of the new API: