Open IuliiaHerets opened 1 week ago
Triggered auto assignment to @abekkala (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.
We think that this bug might be related to #wave-control
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Saved search - Default name is not displayed correctly for multiline system message thread
The title text is not wrapped correctly.
Add titleStyle: styles.textNoWrap,
here
Saved search - Default name is not displayed correctly for multiline system message thread
The title text is not wrapped correctly.
add numberOfLinesTitle: 2,
in
https://github.com/Expensify/App/blob/14b99ca0a12e9686818bc3e937f091199de69750/src/pages/Search/SearchTypeMenu.tsx#L108-L117
add noWrap style
titleStyle: styles.textNoWrap,
Saved search - Default name is not displayed correctly for multiline system message thread
The default value for numberOfLinesTitle
is 1 but the text overflows because we are applying styles.pre
instead of styles.noWrap
.
https://github.com/Expensify/App/blob/2190f6279041ed8260752294d095bbdda76faebe/src/components/MenuItem.tsx#L350
https://github.com/Expensify/App/blob/2190f6279041ed8260752294d095bbdda76faebe/src/components/MenuItem.tsx#L444-L457
We should update the condition below to numberOfLinesTitle !== 1 ? styles.preWrap : styles.noWrap,
.
https://github.com/Expensify/App/blob/2190f6279041ed8260752294d095bbdda76faebe/src/components/MenuItem.tsx#L451
numberOfLinesTitle: 2
in createSavedSearchMenuItem
..SearchTypeMenuNarrow
.so the saved search name can contain multiple lines.
so it can be:
return ReportUtils.formatReportLastMessageText(ReportUtils.getReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${filter}`]));
like we did in this:
Job added to Upwork: https://www.upwork.com/jobs/~021836683698134866207
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura (External
)
Reviewing now 👀
The proposal by @CyberAndrii is the least invasive while it solves the issue correctly, so I'd go with it.
Proposals to add numberOfLinesTitle: 2
also do the trick, but it doesn't match the expected behavior that requires the item to contain only 1 line.
🎀👀🎀 C+ reviewed
Current assignees @luacmartins and @lakchote are eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@paultsimura, my proposal here solves the root cause. Could you please check again?
On a side note, @Krishna2323 please focus on finishing your open PRs instead of posting new proposals as the contribution guideline requires.
@paultsimura, my proposal here solves the root cause. Could you please check again?
Your proposal is very invasive, it suggests replacing the formatting for all the MenuItem components, which can cause regressions.
@CyberAndrii any chance you could find an example where using this proposal breaks styling in other places>
@paultsimura What do you think about my solution, which just needs to use ReportUtils.formatReportLastMessageText
without any style changes? Thank you.
I tried to test your solution but It does not fix in case of IOS safari. Can you help confirm if I was wrong? @CyberAndrii
@paultsimura, I don't think it will cause any regression because we will be only applying styles.noWrap
when numberOfLines
is 1.
Valid point @truph01. Taking another look at the proposals now...
Ok, after another look, I tend to agree with @Krishna2323's proposal.
It makes sense to have noWrap
where numberOfLines: 1
.
However, to be on the safe side, we'll have to go through the places that use MenuItem
component with numberOfLines: 1
(or no value provided, meaning it uses the default – still 1), and check if they really are meant to have numberOfLines: 1
or if we should update them by specifying the correct numberOfLines
.
🎀👀🎀 C+ reviewed
Current assignees @luacmartins and @lakchote are eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@paultsimura Please note we need to fix the search header page with that solution as well:
@paultsimura Please note we need to fix the search header page with that solution as well:
There is no such requirement. From what I see, the search header is explicitly set to have numberOfLines: 2
. If the design team requests so, we can change it to numberOfLines: 1
.
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
@Expensify/design should we make the search header subtitle 1-lined with no wrap, or keep it as is (currently it's 2 lines)?
It should only be 1 line and then truncated but why is it not occupying more horizontal space? There's a lot more space over on the right that it could be using.
why is it not occupying more horizontal space?
That's because the text contains line breaks that are preserved. Changing numberOfLines
to 1
resolves it:
@Krishna2323 please consider this in your PR.
Ah nice, that's much better
@Krishna2323 please consider this in your PR.
Yeah, sure.
@paultsimura, PR ready for review ^
PR merged
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.36-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The title of the saved search should only have one line.
Actual Result:
The title of the saved search has multiple lines and it is not displayed correctly.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/ada2fbd2-fe7c-442a-a7f1-080bbdbbaa1b
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @paultsimura