Skip to content

[HOLD for payment 2021-12-15] Search - Make users appear first in the result list over group chats or rooms #6359

Closed

Description

@isagoico

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Log in with an account that it's in a workspace and has rooms available
  2. Search for a user

Expected Result:

User should be prioritized over group chats or rooms. The prioritization should be:

  1. Person name (e.g. Ann)
  2. Room name (e.g. Ann, Joe or Ann's Room)
  3. Room Description (e.g. the image below)
    image

Actual Result:

Room is being prioritized over the user

Workaround:

No need.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.15-1

Reproducible in staging?: Yes
Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

Issue reported by: @mountiny
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1637012485218100

View all open jobs on GitHub

Activity

  1. MelvinBot commented on Nov 18, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @Jag96 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. parasharrajat commented on Nov 18, 2021

    @parasharrajat
    Member

    Proposal

    1. To do this we have to set the prioritizeDefaultRoomsInSearch: false for getSearchOptions.
      prioritizeDefaultRoomsInSearch: true,
  3. mountiny commented on Nov 18, 2021

    @mountiny
    Contributor

    I think Expected behaviour might be more complicated, I guess we should distinguish between the name and description.

    Let's consider scenario where we search an and then we would want the #announce roome to be first before any person. Here in this case the #announce room is should because of the limited in the description.

    We should first make sure we have the expected behaviour thought through before making this external. Thoughts about the behaviour @TomatoToaster and @trjExpensify?

  4. Jag96 commented on Nov 23, 2021

    @Jag96
    Contributor

    From the thread it sounds like we want to prioritize in this order:

    1. Person Name
    2. Room Name
    3. Room Description (Policy/Domain name in this case)

    Let's consider scenario where we search an and then we would want the #announce room to be first before any person.

    All rooms have the # at the beginning, right? So I'd think if you typed an you'd want to show results for people first, and if you typed #an you'd show the room results.

  5. trjExpensify commented on Nov 25, 2021

    @trjExpensify
    Contributor

    All rooms have the # at the beginning, right? So I'd think if you typed an you'd want to show results for people first, and if you typed #an you'd show the room results.

    I agree with that! 👍

    Separately, do we need to consider the logic for GroupDMs versus DMs? As in, if you search Ted, you'd expect to return Ted first ahead of Ted, Joe wouldn't you?

  6. MelvinBot commented on Nov 26, 2021

    @MelvinBot
    Contributor

    @Jag96 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  7. Jag96 commented on Nov 29, 2021

    @Jag96
    Contributor

    Separately, do we need to consider the logic for GroupDMs versus DMs? As in, if you search Ted, you'd expect to return Ted first ahead of Ted, Joe wouldn't you?

    That makes sense to me 👍

    Any other considerations to make here @vitHoracek @trjExpensify? If not we can make this external!

  8. mountiny commented on Nov 29, 2021

    @mountiny
    Contributor

    That also seems reasonable to me! I think we settled down on a good solution :)

  9. 22 remaining items

  10. puneetlath commented on Dec 3, 2021

    @puneetlath
    Contributor

    Prioritize 1:1 chats over group chats based on which chat had the most recent message

    Hm, I dunno. I kind of feel like we should always prioritize the DM if only one name has been typed in. Perhaps we can discuss in the #open-source channel to make sure we have agreement on this real quick before going forward.

    It has been discussed a few times before I remember (for example here), so I think it'd be good to get some broader visiblity on this decision.

  11. Jag96 commented on Dec 3, 2021

    @Jag96
    Contributor

    Good idea! Dropped a message in slack for discussion

  12. Jag96 commented on Dec 3, 2021

    @Jag96
    Contributor

    Based on the discussion it sounds like there isn't any additional work to be done here! I will update this GH if anything changes when others come online next week, but for now, we can leave this as is

  13. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Dec 8, 2021
  14. changed the title [-]Search - Make users appear first in the result list over group chats or rooms[/-] [+][HOLD for payment 2021-12-15] Search - Make users appear first in the result list over group chats or rooms[/+] on Dec 8, 2021
  15. botify commented on Dec 8, 2021

    @botify

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.18-3 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 2021-12-15. 🎊

  16. parasharrajat commented on Dec 17, 2021

    @parasharrajat
    Member

    Ping for
    image

    @jboniface

  17. jboniface commented on Dec 17, 2021

    @jboniface

    @parasharrajat sorry this slipped by me, job is here https://www.upwork.com/jobs/~01d07f9c95161deca4 i invited you

  18. mosfiend commented on Dec 18, 2021

    @mosfiend

    Is the search is mapping over the filtered array of objects? If that's the case, wouldn't the following solution work in theory? If it doesn't can you help me understand why?

    1. 1:1 chat/group chats /recent
    2. 1:1 chat/group chats /oldest
    3. rooms /recent
    4. rooms /oldest

    Each chat object should have

    • a date property defaulting to null whose value is the date() of the last message
    • an isRoom property
    searchOutput
                .filter(chat=>!chat.isRoom)
                .sort((chatA,chatB)=> chatA.date-chatB.date)
                .concat(searchOutput
                                        .filter(chat=>chat.isRoom)
                                        .sort((chatA,chatB)=> chatA.date-chatB.date)
    )
    

    Apologies if that's beside the point, still glossing over the codebase

  19. mallenexpensify commented on Dec 29, 2021

    @mallenexpensify
    Contributor

    @parasharrajat apologies for the delay here, I hired you, can you accept the offer so I can pay?

    @mosfiend the best place to look for jobs is here https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22
    it's all jobs with the Help Wanted label, the one's we're hiring for

  20. mallenexpensify commented on Dec 30, 2021

    @mallenexpensify
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentEngineeringExternalReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions