Skip to content

Incorrect Resize Behavior for Pasted Chips#22969

Open
ihordubas99 wants to merge 1 commit intofeature/73664-extend-documents-links-block-level-elementsfrom
bug/74190-incorrect-resize-behavior-for-pasted-chips
Open

Incorrect Resize Behavior for Pasted Chips#22969
ihordubas99 wants to merge 1 commit intofeature/73664-extend-documents-links-block-level-elementsfrom
bug/74190-incorrect-resize-behavior-for-pasted-chips

Conversation

@ihordubas99
Copy link
Copy Markdown
Collaborator

Ticket

https://community.openproject.org/projects/communicator-stream/work_packages/74190

What are you trying to accomplish?

Register useDeduplicateInstanceIds in OpBlockNoteEditor alongside the existing useInlineWpEvents.

This is required for the fix introduced in the op-blocknote-extensions PR - without calling the hook in the host application, pasted chips will still receive duplicate instanceId values and resize/delete actions will continue to target the wrong chip.

What approach did you choose and why?

Two-line change: added useDeduplicateInstanceIds to the import from op-blocknote-extensions and called it after useInlineWpEvents in OpBlockNoteEditor.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@ihordubas99 ihordubas99 self-assigned this Apr 28, 2026
@ihordubas99 ihordubas99 requested a review from judithroth April 28, 2026 11:20
@github-actions
Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

const editor = useCreateBlockNote(editorParams, [activeUser]);

useInlineWpEvents(editor);
useDeduplicateInstanceIds(editor);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I wonder if it might be better to import and call useDeduplicateInstanceIds directly inside useInlineWpEvents (within op-blocknote-extensions) instead of adding it separately in OpBlockNoteEditor.

This way we could avoid accumulating multiple hook imports in the host application and keep related logic encapsulated in one place.

Just a thought - it might help keep things cleaner and easier to maintain going forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant