You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-05-23] [$1000] IOUPreview height should adjust based on content #18770
Please re-state the problem that we are trying to solve in this issue.
IOUPreview height does not adjust based on comment
What is the root cause of that problem?
The root cause is that we're always rendering the Texthere.
What changes do you think we should make in order to solve the problem?
We should render the text only if a comment exists for IOU. This gets replaced with:
// This can be saved in a variable as well
{lodashGet(props.action, 'originalMessage.comment', '') ? <Text style={[styles.colorMuted]}>{Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', ''))}</Text> : null}
Using && condition above will cause this regression. We should be using ternary instead.
Although not strictly required, we can also convert this and this into ternary expressions as well.
What alternative solutions did you explore? (Optional)
thanks both. This is pretty straight forward so I'm going with the first passable proposal (#18770 (comment)). Also creating requestDescription on a separate line is a bit more readable.
Activity
melvin-bot commentedon May 11, 2023
Triggered auto assignment to @twisterdotcom (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 11, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)huzaifa-99 commentedon May 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We want the IOUPreview to adjust its height based on content, specifically if it has a comment/description
What is the root cause of that problem?
The
<Text>element for comment/description here is rendering always, regardless if there is any comment/descriptionWhat changes do you think we should make in order to solve the problem?
We should conditionally render the
<Text>component that displays comment/description here by first calculating description/value like thisand then render it like so
Result
What alternative solutions did you explore? (Optional)
N/A
allroundexperts commentedon May 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
IOUPreview height does not adjust based on comment
What is the root cause of that problem?
The root cause is that we're always rendering the
Texthere.What changes do you think we should make in order to solve the problem?
We should render the text only if a comment exists for
IOU. This gets replaced with:Using
&&condition above will cause this regression. We should be usingternaryinstead.Although not strictly required, we can also convert this and this into ternary expressions as well.
What alternative solutions did you explore? (Optional)
None
Julesssss commentedon May 11, 2023
thanks both. This is pretty straight forward so I'm going with the first passable proposal (#18770 (comment)). Also creating
requestDescriptionon a separate line is a bit more readable.Julesssss commentedon May 11, 2023
@huzaifa-99 feel free to make a start on the PR, I'll assign you once the UpWork job has been created 👍
Julesssss commentedon May 11, 2023
Actually I don't think anything will break if I do this now
Julesssss commentedon May 11, 2023
Okay nevermind, that didn't trigger the automation, I'll do that again once Ted gets a chance to review.
35 remaining items
huzaifa-99 commentedon May 25, 2023
Payment still pending guys 😄!
mountiny commentedon May 25, 2023
@trjExpensify was ooo but should be back today, sorry about that
huzaifa-99 commentedon May 25, 2023
no worries @mountiny. Thank you!
Julesssss commentedon May 25, 2023
The issue will remain open until paid, and Tom will be back soon :)
trjExpensify commentedon May 25, 2023
Yuuup, I got back today. 👍 Looking at this now, appreciate the patience.
aimane-chnaif commentedon May 25, 2023
No PR caused regression. This is more like polish than bug and found during PR review here.
So no need regression test step.
trjExpensify commentedon May 25, 2023
Yup, this was when adding a new feature. Regression tests will be updated more broadly for the manual requests redesign.
trjExpensify commentedon May 25, 2023
Okay, so my assessment for payments is as follows:
@aimane-chnaif - $1,500 for the C+ review & #urgency bonus
@huzaifa-99 - $1,500 for the fix & #urgency bonus
@thesahindia - $250 for reporting the bug in this PR
Does that sound right to everyone?
trjExpensify commentedon May 25, 2023
Offers have been sent to all three of you in the meantime.
huzaifa-99 commentedon May 25, 2023
Thank you @trjExpensify. Accepted!
trjExpensify commentedon May 25, 2023
Settled up with @huzaifa-99 & @aimane-chnaif. Awaiting @thesahindia and then I'll close this out.
Job ref for ease.
thesahindia commentedon May 26, 2023
Accepted, thanks!
trjExpensify commentedon May 26, 2023
Awesome, settled. Closing!