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

Always highlight mentions in composer #7705

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Feb 8, 2025

On web, the composer only highlights mentions if they have been inserted by selecting one of the suggestions in the autocomplete dropdown. Mentions typed manually are not highlighted.

This PR reworks the autocomplete TipTap extension so it just adds text rather than creating an editor node with special styling. The highlighting is then left to the new FacetDecorator, which combines the previous LinkDecorator and TagDecorator and adds support for mentions also. Instead of duplicating the detection logic in @atproto/api, it just uses the facet detection RichText. This ensures that the highlighting code in the editor is identical to the actual facet detection used when creating the post.

This issue was originally reported in a comment on another composer-related PR: #7562 (comment).

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.

1 participant