-
Notifications
You must be signed in to change notification settings - Fork 0
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
upgrade plate to latest version #76
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mysilio/garden/8kJVyRcNo8g9uyqkYZjcMMEViofw |
copy formatting rules from https://github.com/udecode/plate/tree/main/docs/src/live/config/autoformat we may want to tweak these, but they feel pretty slick in my testing
A bit of a change in the UX here - triggering concepts on single [ - so I want to run this through staging to see how it feels.
this allows people to create tags, mentions, concepts on the fly
the onMouseDown event was bubbling up and triggering the headlessui dialog's hide-on-click-outside detector - prevent propagation to fix this
make it clear what you are adding
right now if you have text above and below a link on a single line, the link will expand to include the items on previous lines. this is not desired.
I hate this so here's an alternative that also de-emphasizes the double square brackets
P.createComboboxPlugin(), | ||
P.createMentionPlugin({ trigger: '@', pluginKey: 'mention' }), | ||
P.createMentionPlugin({ trigger: '#', pluginKey: 'tag' }), | ||
P.createMentionPlugin({ trigger: '[', pluginKey: 'concept' }), |
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.
can you use the appropriate constants here rather than the strings?
const currentComboboxText = comboboxStore.get.text() | ||
return useMemo(() => { | ||
return (names ? Array.from(new Set([...names, currentComboboxText])) : [currentComboboxText]).map(toMentionable) | ||
}, [names, currentComboboxText]) |
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.
I think you could wrap all the text
property in brackets / prefix it with the trigger in this list to have them show up with the formatting in the dropdown.
No description provided.