plate icon indicating copy to clipboard operation
plate copied to clipboard

Combobox rework

Open 12joan opened this issue 1 year ago • 4 comments

Description

See changesets.

To do:

  • [X] Use new API for slash commands
  • [x] Use new API for mentions
  • [ ] Use new API for emoji
  • [ ] Remove old combobox API
  • [ ] Register new components
  • [ ] Changesets for packages and components

Examples of the new API:

  • https://github.com/udecode/plate/blob/feat/combobox/packages/slash-command/src/createSlashPlugin.ts
  • https://github.com/udecode/plate/blob/feat/combobox/apps/www/src/registry/default/plate-ui/inline-combobox.tsx
  • https://github.com/udecode/plate/blob/feat/combobox/apps/www/src/registry/default/plate-ui/slash-input-element.tsx

12joan avatar May 01 '24 18:05 12joan

🦋 Changeset detected

Latest commit: 4dac4cb5ce4d36603e43beb1598ed664d90afe6a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@udecode/plate-combobox Major
@udecode/plate-emoji Major
@udecode/plate-mention Major
@udecode/plate-slash-command Major
@udecode/plate Major

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

changeset-bot[bot] avatar May 01 '24 18:05 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 4:11pm

vercel[bot] avatar May 01 '24 18:05 vercel[bot]

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.

dylans avatar May 03 '24 00:05 dylans

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.

12joan avatar May 03 '24 12:05 12joan