Skip to content
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

Merged
merged 13 commits into from
Dec 3, 2021
Merged

upgrade plate to latest version #76

merged 13 commits into from
Dec 3, 2021

Conversation

travis
Copy link
Contributor

@travis travis commented Nov 12, 2021

No description provided.

@vercel
Copy link

vercel bot commented Nov 12, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mysilio/garden/8kJVyRcNo8g9uyqkYZjcMMEViofw
✅ Preview: https://garden-git-upgrade-plate.mysilio.page

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
@travis travis changed the title WIP: upgrade plate to latest version DO NOT MERGE upgrade plate to latest version Nov 18, 2021
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' }),
Copy link
Contributor

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])
Copy link
Contributor

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.

@travis travis merged commit 1c65fc4 into staging Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants