-
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
Wrap the merchant text in the transaction field view #42131
Wrap the merchant text in the transaction field view #42131
Conversation
@dannymcclain @Ollyws One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
The app keeps not responding when I open the transaction thread on Android, so I can't screenshot it. |
@dannymcclain I believe yes because we don't support markdown for merchant, only description. |
@Ollyws great catch. I think since we display the description as multi-line on the confirmation screen, it makes sense to do that with the merchant as well. I don't see why one would be treated differently than the other. |
That makes sense but I would like to confirm 1 thing. I see that we actually set the description max line to 2 on the confirmation page.
But because we render the description as HTML (markdown), the component doesn't support the max line. Do we want to apply the max line to 2 for merchants? Or don't limit the max line? |
@Expensify/design what do you all think about the above? (The convo starting here about number of lines on the confirmation page) |
Yeah, I kind of think the intention behind Merchant is for it to be one-line and typically as few words as possible. Is that what you think too @trjExpensify? So I think I'm okay with this inconsistency, just in the sense that I think these are slightly different things. |
Yep, agreed. A description is more of a free form field to expand on the purpose, whereas a merchant is a one-liner and typically a couple of words. |
@shawnborton @trjExpensify that makes sense to me, but this issue is specifically about making it multi-line-able. So if it shows up as two lines on the expense and the preview, should it still only show up as one line on the confirmation screen? Or do you all think that it should never be multiline? (Maybe check out #41925 for more details about why there's interest in making it multiline) |
Ah, I see now. Yeah, I think it's cool if we make the confirmation screen match the preview card, so we should allow two lines worth of text to display before truncating. Does that sound more in line with what you are thinking? |
Yeah that's what I was thinking! |
Ahh, I see. I'm okay with that. I was initially thinking that we should just have 1 line for merchant and 1 line for description regardless of how long it is, but I'm okay with what you're suggesting |
So, if I understand correctly, the agreement is to limit the merchant to be 2 lines on both the preview card and confirmation screen? Or no limit for the preview card but limit for the confirmation screen to 2 lines? |
I think it's this, and I think we already have a 2 line max on the preview card? Or maybe we don't? |
Yeah I'm pretty sure we already have that 2 line max on the preview card—and that's what we want.
Yes. Two lines max on the confirmation screen & preview. (This is what description should be doing anyways, but since we render as markdown/html, it doesn't obey the rules. But we don't need to dwell on that here.) |
Sorry, it's not the preview card. What I mean is this one (idk what it is called, it's in the transaction thread)
We are currently not limiting it by lines but by characters. App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Lines 83 to 84 in a03fecc
Lines 171 to 172 in a03fecc
|
Ah gotcha. For the transaction thread, I don't know that we need to truncate at all. It looks like description has a max-character limit of 500 characters, and we don't truncate at all in the transaction thread. I don't see any problem with following that same pattern for merchant. Anyone else?
That works too—let's just do it the same way for both. |
I'm with you on this. I think we've run into problems in the past trying to truncate the preview with lines vs. characters, which is why it's truncated with characters. You're welcome to investigate, but my gut says it would be best to leave that alone.
This is insane 😂 I had no idea you could do this. Coming from this issue, it seems like we'll likely be converting all those line breaks to spaces, and then truncating normally after that. So we might not need to worry about that situation here. |
Ok, I have updated the merchant max line in confirmation screen to 2. For the preview card, we are limiting it by character in #42243 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a design perspective, I think this is looking good. Definitely still get a solid technical review.
Couldn't get to this one today but should have it reviewed tomorrow. |
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm as well
🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.4.76-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.76-7 🚀
|
Details
Currently, we only show merchant as single line in the transaction field view which will be truncated if it's very long. This PR makes it multiline.
Fixed Issues
$ #41925
PROPOSAL: #41925 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop