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

[$250] [Search v2.2] - Report name is bold when report is unread or select, and unbold when not unselected #49100

Open
6 tasks done
IuliiaHerets opened this issue Sep 12, 2024 · 31 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 12, 2024

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


Version Number: 9.0.33-2
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Search > Chats.
  3. Click Filters.
  4. Click In.
  5. Select some reports.

Expected Result:

There should be consistency whether the report name should be bold.

Actual Result:

The report name is bold when the report is unread or selected, and unbold when not selected.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6601202_1726156396378.bandicam_2024-09-12_23-50-21-440.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834272973003292308
  • Upwork Job ID: 1834272973003292308
  • Last Price Increase: 2024-09-12
Issue OwnerCurrent Issue Owner: @ikevin127
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to @carlosmiceli (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 12, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 12, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@carlosmiceli carlosmiceli added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 12, 2024
@melvin-bot melvin-bot bot changed the title Search - Report name is bold when report is unread or select, and unbold when not unselected [$250] Search - Report name is bold when report is unread or select, and unbold when not unselected Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021834272973003292308

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External)

@Nodebrute
Copy link
Contributor

@carlosmiceli Could you please confirm the expected behavior here?

@luacmartins
Copy link
Contributor

I can take this one since it's part of Search. cc @Kicu @289Adam289

@luacmartins luacmartins removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
@luacmartins luacmartins changed the title [$250] Search - Report name is bold when report is unread or select, and unbold when not unselected [$250] [Search v2.2] - Report name is bold when report is unread or select, and unbold when not unselected Sep 12, 2024
@dominictb
Copy link
Contributor

dominictb commented Sep 12, 2024

Edited by proposal-police: This proposal was edited at 2024-09-12 18:01:30 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

The report name is bold when the report is unread or selected, and unbold when not selected.

What is the root cause of that problem?

so the option title is always bold because of:

item.isBold !== false && styles.sidebarLinkTextBold,

What changes do you think we should make in order to solve the problem?

    return {...option, isSelected: true, reportID: option.reportID ?? '-1', isBold: OptionsListUtils.shouldUseBoldText(option)};

What alternative solutions did you explore? (Optional)

Solution 1:

  • We also can update it:
        result.isBold = shouldUseBoldText(result);

Solution 2:

  • In case we don't want to display bold style in this filter page, just need to introduce a new prop shouldUseBoldStyle in InviteMemberListItem component with the default value is true and update:
    item.isBold !== false && styles.sidebarLinkTextBold,

    to:
                                   shouldUseBoldStyle && item.isBold !== false && styles.sidebarLinkTextBold,

@dominictb
Copy link
Contributor

Proposal updated

@ikevin127
Copy link
Contributor

@luacmartins Are we accepting proposals for this one or will somebody from agencies work on it ?

@luacmartins
Copy link
Contributor

Sure, we can take contributors too

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The title bold is inconsistent in chat search filter In list.

What is the root cause of that problem?

In In chat filters, we use getSearchOptions which has shouldBoldTitleByDefault as false.

shouldBoldTitleByDefault: false,

So, the title will be bold based on the unread status.

reportOption.isBold = shouldBoldTitleByDefault || shouldUseBoldText(reportOption);

function shouldUseBoldText(report: ReportUtils.OptionData): boolean {
return report.isUnread === true && ReportUtils.getReportNotificationPreference(report) !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE;
}

Then, for the selected options, the item doesn't have isBold property,

const formattedResults = OptionsListUtils.formatSectionsFromSearchTerm(
cleanSearchTerm,
selectedOptions,
chatOptions.recentReports,
chatOptions.personalDetails,
personalDetails,
false,
);
newSections.push(formattedResults.section);

and it will be bold if isBold is not false.

item.isBold !== false && styles.sidebarLinkTextBold,

What changes do you think we should make in order to solve the problem?

The solution is to always bold the title. To do that, add a new param to getSearchOptions for shouldBoldTitleByDefault and use that instead of always setting it to false.

shouldBoldTitleByDefault: false,

function getSearchOptions(options: OptionList, searchValue = '', betas: Beta[] = [], shouldBoldTitleByDefault = false): Options {
...
const optionList = getOptions(options, {
    ...
    shouldBoldTitleByDefault,
});

return OptionsListUtils.getSearchOptions(options);

return OptionsListUtils.getSearchOptions(options, undefined, undefined, true);

@ikevin127
Copy link
Contributor

Sure, we can take contributors too

In this case, thanks everyone for the proposals!

I think @dominictb's proposal makes sense as the RCA is straight-forward and the main solution solves the issue as per the Expected result, without affecting other parts of the app other than the SearchFiltersChatsSelector, specifically the In filter.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 14, 2024

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@ikevin127
Copy link
Contributor

@bernhardoj Feel free to let us know if you think the selected proposal's main solution has some pitfalls which would create regressions whereas your solution won't - I'd be happy to re-assign!

@bernhardoj
Copy link
Contributor

@ikevin127 I don't think there will be a regression, but both solutions actually have different results. My solution will bold all the title instead of depends on the unread status.

@luacmartins
Copy link
Contributor

@Expensify/design what's the expected behavior for the In filter? Should report names be always bold, regular, or bold depending on unread status?

@dubielzyk-expensify
Copy link
Contributor

My assumption here is that they should always be bold like we you submit a regular expense. Keen to hear what rest of @Expensify/design thinks though

@dominictb
Copy link
Contributor

@dubielzyk-expensify

I believe the behavior of the In filter should align with that of the /chat-finder page, as both are used for searching reports, which can be bold based on unread status.

In contrast, the participant selector in the expense flow and start chat feature is used to search for individuals, rooms, or workspaces.

@dubielzyk-expensify
Copy link
Contributor

dubielzyk-expensify commented Sep 16, 2024

Yeah, I see what you're saying, but I don't think this is an instance where we need to tell the user which are unread/read (needless complexity in this instance IMO). I think of this more as a picker-style which we tend to keep all bold. Happy for @Expensify/design to tell me otherwise though 😄

@luacmartins
Copy link
Contributor

I agree! 👍 for going with all bold

@shawnborton
Copy link
Contributor

I think if we're displaying these rows the same way that we display the finder page, where we have the report title above and a preview of the latest message below, then it should follow the same behavior as the chat finder where unreads are bold and reads are not.

If this follows the same behavior as the participant selector page, then they all should be bold.

@melvin-bot melvin-bot bot added the Overdue label Sep 16, 2024
@trjExpensify
Copy link
Contributor

I think if we're displaying these rows the same way that we display the finder page, where we have the report title above and a preview of the latest message below

Interestingly on this, the defaultRooms (i.e #admins and announce) use the workspaceName as the second line in the chat switcher, whereas the user created rooms seem to use the lastMessage text. I know we did the former for ease of reference and discovery when looking for the room for a particular workspace. Was it intentional not to follow suit with the user created rooms in the chat switcher, or is that just an oversight?

@shawnborton
Copy link
Contributor

Hmm no idea, but I would think we should standardize on message preview in the chat finder, and then just use the Workspace label in the Submit flow/participant selector.

@ikevin127
Copy link
Contributor

Not overdue, still discussing about the right solution based on which we will assign one of the two existing proposals.

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@trjExpensify
Copy link
Contributor

trjExpensify commented Sep 16, 2024

but I would think we should standardize on message preview in the chat finder, and then just use the Workspace label in the Submit flow/participant selector.

Why not standardise on the workspaceName as the second line for all workspace rooms and chats in both the switcher and the participant selector?

If you're trying to find say the #admins room and we don't include the workspace name it's going to be much harder to figure out which workspace its for. We can't rely on avatar being the sole distinction, really.

image

@shawnborton
Copy link
Contributor

That's fair, though there is a conversation happening about adding the workspace name right before the report name - so that would solve that issue and then make sure we have 100% consistency between LHN and Find. Thoughts on something like that?

@trjExpensify
Copy link
Contributor

Ah, that would solve it if it's searchable by workspace name still. Do we have an issue for it? I would think we need to do that first before changing the defaultRooms to drop the workspace name, because I think that would break the guides' ability to find the admins rooms of deals they're working with if we do it before.

@shawnborton
Copy link
Contributor

Here's the thread where it was being discussed.

I am fine doing nothing for now with the preview line until something like the above is in place.

@trjExpensify
Copy link
Contributor

Yep, sounds good! 👍

@ikevin127
Copy link
Contributor

Can we have a summary of the discussions and an update on the expected result (if changed) ? We need to know whether or not we go with the assigned proposal 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
Status: Polish
Development

No branches or pull requests