fix(search): tag names with colon showed \: instead of :#55360
Conversation
|
@luacmartins can you confirm if this is known issue, Screen.Recording.2025-01-17.at.19.33.04.mp4 |
|
Not that I know of. That's a bug that we should report |
Reproduction steps:
Expected Result:
Actual Result:
Extra info: |
|
Reported here |
|
@luacmartins I found another bug, this is from back-end. It is probably an issue with the OR operator. |
|
I have two other PRs to review first, and expect to review this PR in about 14 hours. :) |
ntdiary
left a comment
There was a problem hiding this comment.
When navigating to the search page, the double quotes are missing, which might have potential implications for other parsing processes.
test.mp4
Overall, LGTM, with just one small change left. I personally lean toward not using escapeTagName for displaying tags. However, if you all feel it's unnecessary, we can ignore it. :)
| .map(getCleanedTagName) | ||
| .filter((tag) => tag.toLowerCase().includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.includes(tag.toLowerCase())) |
There was a problem hiding this comment.
| .map(getCleanedTagName) | |
| .filter((tag) => tag.toLowerCase().includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.includes(tag.toLowerCase())) | |
| .filter((tag) => getCleanedTagName(tag).toLowerCase().includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.includes(getCleanedTagName(tag).toLowerCase())) | |
luacmartins
left a comment
There was a problem hiding this comment.
@jaydamani let's address @ntdiary's comments
looking into this
I also don't have any strong opinion related to this. Let's go with your changes |
This did not affect other filters because the substituted value for other filters is some form of ID which never has spaces. We can solve this by sanitizing it here which will add double quotes when tag name has spaces autocompleteID: sanitizeSearchValue(tagName),Is this solution okay or should we try to fix this in getQueryWithSubstitutions? |
After more testing, this might be a better solution Udpated: substitutionEntry = sanitizeSearchValue(substitutionEntry) // add this line for sanitization
// generate new query but substituting "user-typed" value with the entity id/email from substitutions
resultQuery = resultQuery.slice(0, substitutionStart) + substitutionEntry + changedQuery.slice(substitutionEnd);
lengthDiff = lengthDiff + substitutionEntry.length - range.length; |
|
Yea I think updating it in |
Reviewer Checklist
Screenshots/VideosAndroid: Native55360-android-native.mp4Android: mWeb Chrome55360-android-chrome.mp4iOS: Native55360-ios-native.mp4iOS: mWeb Safari55360-ios-safari.mp4MacOS: Chrome / Safari55360-mac-chrome.mp4MacOS: Desktop55360-mac-desktop.mp4 |
|
@jaydamani, Eslint check is failed, can you please fix it? I will fill the checklist soon. |
luacmartins
left a comment
There was a problem hiding this comment.
@jaydamani let's address the ESLint failure
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.89-8 🚀
|

Explanation of Change
Add tag name cleaning for search router list, search header input, advanced search filters page and search filters tag page
Fixed Issues
$ #53465
PROPOSAL: #53465 (comment)
Tests
Precondition:
tag:Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
search-tags-android.mp4
Android: mWeb Chrome
search-tags-android.mp4
iOS: Native
ios-web-search-tag.mp4
iOS: mWeb Safari
https://github.com/user-attachments/assets/8abee30b-444c-4b18-8227-708d21493f00MacOS: Chrome / Safari
web-search-tag-name.mov
MacOS: Desktop
desktop.search-tag.mov