Skip to content

Conversation

@ivicac
Copy link
Contributor

@ivicac ivicac commented Dec 23, 2025

  • 3798 client - Fix when deleting data pill in the mention input, '@' shows up instead of '$'
  • 0 client - Remove "@tiptap/*" from npm reject list in .ncurc.json

@ivicac ivicac changed the title 3798 3798 When deleting data pill in the mention input, '@' shows up instead of '$' Dec 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where deleting a data pill (mention) in the mention input leaves behind an '@' character instead of the expected '$' character. The fix adds a custom ProseMirror plugin that intercepts transactions and replaces '@' with '$' when detected. Additionally, the PR improves ref handling by using useEffect and removes "@tiptap/*" from the npm reject list to allow tiptap package updates.

Key Changes

  • Adds a MentionBackspaceFix ProseMirror plugin that detects and replaces '@' characters with '$' after mention deletion
  • Refactors ref assignment to use React's useEffect hook for proper lifecycle management
  • Adds comprehensive test coverage for the backspace behavior across TEXT, TEXT_AREA, and RICH_TEXT control types

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
PropertyMentionsInputEditor.tsx Adds Plugin import, implements MentionBackspaceFix extension, and refactors ref handling to use useEffect
PropertyMentionsInput.test.tsx Adds test coverage for backspace behavior with mentions across different control types
.ncurc.json Removes "@tiptap/*" from npm upgrade reject list to allow tiptap package updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@kresimir-coko kresimir-coko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moran ovo sam isprobati, ne sviđa mi se ova implementacija nikako

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivicac Nikako mi se ne sviđa ova implementacija, izgleda mi prekompleksno za ono šta postiže. Plus, ovo je nekakav bug radi nove verzije, nismo imali ovaj problem prije.

Jel ti okej da dodamo deleteTriggerWithBackspace: true tako da se samo izbriše trigger ($ ili @) kad se obriše datapill? Barem za prvu ruku dok ne smislimo pametnije rješenje (ili tiptap popravi bug)

@sonarqubecloud
Copy link

@ivicac ivicac merged commit 068b364 into master Dec 28, 2025
7 checks passed
@ivicac ivicac deleted the 3798 branch December 28, 2025 20:08
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.

[bug] When deleting data pill in the mention input, '@' shows up instead of '$'

3 participants