Skip to content

bug/74385: Inline work package chip has no visual highlight when selected#124

Open
ihordubas99 wants to merge 1 commit intodevfrom
bug/74385-inline-chip-has-no-visual-highlight-when-selected
Open

bug/74385: Inline work package chip has no visual highlight when selected#124
ihordubas99 wants to merge 1 commit intodevfrom
bug/74385-inline-chip-has-no-visual-highlight-when-selected

Conversation

@ihordubas99
Copy link
Copy Markdown
Collaborator

Ticket

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

What are you trying to accomplish?

Add a visual selection highlight to inline work package chips when they are included in an editor text selection

Screenshots

image

What approach did you choose and why?

Subscribed to editor.onSelectionChange inside the chip component and used range.intersectsNode to check whether the chip's DOM node falls within the current browser selection. When it does, the existing selected styled-component prop is activated, reusing the already-defined focus outline and shadow styles.

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 24, 2026
@ihordubas99 ihordubas99 requested a review from judithroth April 24, 2026 10:35
Copy link
Copy Markdown
Contributor

@judithroth judithroth left a comment

Choose a reason for hiding this comment

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

Funny again. This one works in the vite test project, but not in OpenProject. I'v rebuilt it several times to be sure. Can you reproduce this?

@ihordubas99
Copy link
Copy Markdown
Collaborator Author

@judithroth It's a bit strange that it doesn't work on your end - everything works fine for me. Here's how I do a full rebuild:

op-blocknote-extension:
First, I recommend removing node_modules, then:

npm i
npm run build
npm pack

After that, copy the generated op-blocknote-extensions-0.0.25.tgz and place it into the frontend folder of the openproject project.

openproject:
First, remove node_modules from the frontend, then:

cd frontend
npm i op-blocknote-extensions-0.0.25.tgz
npm i
cd ..
bin/dev

Is this how you're doing it?

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.

2 participants