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

Trim search query strings to prevent newlines expanding search page #1600

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

Kuuuube
Copy link
Member

@Kuuuube Kuuuube commented Nov 23, 2024

Fixes #1463

When a pattern that selects newlines is added to the text replacement patterns, it can allow queries with trailing newlines to be accepted as the longest match. This can cause some weird things in the search page UI (#1463).

@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug area/ui-ux The issue or PR is related to UI/UX/Design labels Nov 23, 2024
@Kuuuube Kuuuube requested a review from a team as a code owner November 23, 2024 17:46
@Kuuuube Kuuuube changed the title Trim search query strings Trim search query strings to prevent newlines expanding search page Nov 23, 2024
@jamesmaa jamesmaa added this pull request to the merge queue Nov 25, 2024
Merged via the queue into yomidevs:master with commit 49be0db Nov 25, 2024
11 checks passed
@shiki-tm
Copy link

Trying this on a new install on edge canary but I noticed this like a day ago after updating on kiwi browser that this was still happening. I remember tapping on just 1 character words was working fine but I should've sent an example with a word with more than 1 character.
Screenshot_20241212_014023
I don't know if this happened before but if I tap on the 國 of 中國 then the searched word can get flipped into 國中.
I'm curious what happens with longer words/phrases so I tried this:

Screen_Recording_20241212_015116_1.mp4

My settings are the same as those uploaded in the original issue.
Edge Canary but also Kiwi Browser.
Yomitan 24.11.11.0
Oh edge is behind chrome release? But anyway it was still having this issue with the flipping of the 2nd character on the latest yomitan update yesterday on kiwi browser. I remember the single first character was fine though. Thanks for looking into this!

@Kuuuube
Copy link
Member Author

Kuuuube commented Dec 11, 2024

24.11.11.0 does not include this fix. Update Yomitan.

And for future reference, it is preferred that new issues are created or old issues are reopened rather than commenting on merged pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-ux The issue or PR is related to UI/UX/Design kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search page is weird
3 participants