-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[#62486] searching in tokens removes prefix from word #18438
[#62486] searching in tokens removes prefix from word #18438
Conversation
- https://community.openproject.org/wp/62486 - getting the word from a token now strips the prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one question and will now try the changes practically out in a browser.
In Firefox I can't delete tokens anymore. Neither through backspace, nor through delete: Screencast.from.2025-03-27.11-01-39.webmMh, I just double checked to be sure and as far as I can tell, I already have this problem on dev :/ |
I tried understanding the "strip prefix" part and I think I found an off-by-one error. See me inserting a space in random places, just to see from which point the autocompletion starts: Screencast.from.2025-03-27.11-16-45.webmIn the first word (project) it's fine, but afterwards the first character is cut off. |
Nice catch, the off by one was introduce by changing one side, but not the other :D -> fixed As for FF: I can't help with it. For some reason, FF jumps iniine elements with content editable, when hitting backspace. This is what chromium does better. Both have their issues with |
Caution The provided work package version does not match the core version Details:
Please make sure that:
|
Off-by-one error is gone. I now tried understanding the "after inserting a token, caret position is placed behind the token" requirement and played around a bit. In the screencast you see me:
Of these tests, 1 has non-ideal UX, but feels acceptable, though it might be exactly what you wanted to fix. 2 is just plain weird and I have no clue what's going on. 3 works as expected. Screencast.from.2025-03-27.13-12-48.webm |
- backspace works again on tokens in firefox - copying only parts a token is possible in firefox
I think, I found the reason for backspace not working in firefox and fixed it. Also the partial copy of tokens should work now as expected (at least, as I would expect it :P) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behaviourally LGTM.
Something I realize is that it would probably be great to have nitty-gritty browser-tests for this. E.g. pressing five times backspace or delete.
I understand if you don't want to add them now, but later we'd be happy to have them.
…ould-not-be-part-of-search-when-replacing-tokens
Ticket
OP#62486
OP#62255
What are you trying to accomplish?
What approach did you choose and why?