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

Issues with @tagging people #1458

Open
3 of 4 tasks
KrishaTerranIO opened this issue Feb 15, 2023 · 2 comments
Open
3 of 4 tasks

Issues with @tagging people #1458

KrishaTerranIO opened this issue Feb 15, 2023 · 2 comments
Assignees

Comments

@tibetsprague tibetsprague changed the title Unable to tag folks in comments unless they are on the suggested list Issues with @tagging people Jul 3, 2024
@tibetsprague
Copy link
Contributor

tibetsprague commented Aug 18, 2024

typing a space still not working well, it gets stuck in suggestion mode after typing an @ and there is no way to get out of it.
Might need to update tiptap to latest version and explore a solution like this ueberdosis/tiptap#214 (comment) (https://codesandbox.io/p/sandbox/tiptap-mention-ddfcm?file=%2Fsrc%2Fcomponents%2FsuggestionPlugin.js) which is unfortunately in Vue so would have to be translated to React

@tibetsprague
Copy link
Contributor

ooh someone just added to the tiptap issue above this solution that may work for us:

onUpdate(props) {
  if (renderer) {
    renderer.updateProps(props)
  }

  if (!popup || !props.clientRect) return

  const matches = props?.query?.match(/([\s]+)/g)
  const spacesCount = matches?.length || 0

  if (spacesCount > 1 && props.items === null) {
    popup?.[0]?.hide()
    return
  }

  popup[0].setProps({ getReferenceClientRect: props.clientRect })
},

@tibetsprague tibetsprague self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants