-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] [HOLD for payment 2024-06-13] Handle showing selfDM as the first item in the list when users search for their own email or display name #42627
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Triggered auto assignment to @jliexpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Handle showing selfDM as the first item in the list when users search for their own email or display name What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?On ChatFinderPage we have the App/src/pages/ChatFinderPage/index.tsx Line 102 in 525ad6f
To implement the feature where items with const filteredOptions = useMemo(() => {
if (debouncedSearchValue.trim() === '') {
return {
recentReports: [],
personalDetails: [],
userToInvite: null,
headerMessage: '',
};
}
const newOptions = OptionsListUtils.filterOptions(searchOptions, debouncedSearchValue, betas);
console.log('newOptions: ', newOptions);
// Sort recentReports to move items with isSelfDM: true to the top
const sortedRecentReports = newOptions.recentReports.sort((a, b) => {
if (a.isSelfDM && !b.isSelfDM) return -1;
if (!a.isSelfDM && b.isSelfDM) return 1;
return 0;
});
const header = OptionsListUtils.getHeaderMessage(sortedRecentReports.length + Number(!!newOptions.userToInvite) > 0, false, debouncedSearchValue);
return {
recentReports: sortedRecentReports,
personalDetails: newOptions.personalDetails,
userToInvite: newOptions.userToInvite,
headerMessage: header,
};
}, [debouncedSearchValue, searchOptions, betas]); Explanation:
This ensures that any item with the attribute POC video:my name: 20240527_095213.mp4We can also integrate this feature inside |
ProposalPlease re-state the problem that we are trying to solve in this issue.What is the root cause of that problem?In here, we're ordering the report by App/src/libs/OptionsListUtils.ts Lines 1782 to 1788 in 525ad6f
What changes do you think we should make in order to solve the problem?We should order the selfDM at the top of the report list by return
App/src/libs/OptionsListUtils.ts Lines 1782 to 1788 in 525ad6f
What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want to show self DM as the first result when the user searches for their own login/display name. What is the root cause of that problem?A feature request. What changes do you think we should make in order to solve the problem?We currently able to search from 2 pages, ChatFinderPage and NewChatPage. They have different logic to sort. For ChatFinderPage, we use this logic to sort the results. App/src/libs/OptionsListUtils.ts Lines 1561 to 1581 in 525ad6f
It's executed only when we type something in the search field. To put the self-DM at the top of the list, we can return 0 if the option is self DM.
For NewChatPage, the result is sorted here. App/src/libs/OptionsListUtils.ts Lines 1782 to 1789 in 525ad6f
To put the self-DM at the top of the list and only when we search for our self, we can add this code:
This will sort it first by |
@bernhardoj's proposal looks good to me. the solution is straight forward and works perfectly. |
Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
PR is ready cc: @getusha |
Hey all, it sounds like the PR didn't fully fix the issue. @kbecciv could you please point to the specific case that is failing? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-06-13. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Bump @getusha for the checklist |
Can I confirm there's no regressions or issues that affect payment @techievivek and @Julesssss (based off this comment)? Payment Summary:
|
Job added to Upwork: https://www.upwork.com/jobs/~01401c18bd7e84e155 |
Current assignee @getusha is eligible for the External assigner, not assigning anyone new. |
Re-applied label as no Upworks job was initially created |
@getusha I don't know who you are - what's your Upworks profile? Please add your full name (as per Upworks) in your GH profile, thanks! |
@jliexpensify could we hold on payments for a few days please? i am working on moving payments to ND. thanks |
No worries, I'll just spin up a new Summary. Can I also confirm there's no regressions or issues that affect payment @techievivek and @Julesssss (based off this comment)? UPDATED Payment Summary:
|
Hi, sorry another bump for @techievivek and @Julesssss"
|
Yeah I don't believe there are any regressions. I think it's fine to pay out |
Paid @bernhardoj, thanks for your patience! @getusha please refer to this summary for ND payments. |
@getusha also, does a checklist need to be completed here? |
[@getusha] The PR that introduced the bug has been identified. Link to the PR: N/a it is a feature request Regression Test Proposal
Do we agree 👍 or 👎 |
$250 approved for @getusha |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Problem:
We recently merged a backend PR that returns selfDM reports in search results when users search for their email or display name. However, the backend response does not guarantee that the selfDM report will appear as the first result. This can make it difficult for users to quickly locate their selfDM in the search results even when they are returned by the backend.
Solution:
Update the frontend logic to ensure that the selfDM report appears first in the search results in UI when users specifically search for their own email or display name. Implement post-processing logic to reorder the search results, ensuring the selfDM report is at the top of the list. This will make it easier for users to find their selfDM when searching for their own email or display name.
Issue Owner
Current Issue Owner: @Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: