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 2024-09-11] ][$500] Lack of maximum height for the description field for room hides other options on the page #37357
changed the title [-]Lack of maximum height for the `description` field for room hides other options on the page[/-][+][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+]on Feb 27, 2024
We are rendering full description with shouldRenderAsHTML
What changes do you think we should make in order to solve the problem?
we should remove shouldRenderAsHTML prop and add numberOfLinesTitle={4} prop with appropriate maximum number of lines.
We can use windowWidth to define dynamic maximum number of lines.
Please re-state the problem that we are trying to solve in this issue.
We want to limit the number of lines for html content
What is the root cause of that problem?
Our migration from #34150 (comment) is anticipating markdown support. A choice was made during PR to go with no max lines for this HTML we are rendering as we do not have this feature yet.
What changes do you think we should make in order to solve the problem?
Please re-state the problem that we are trying to solve in this issue.
There is no maximum line for the report description.
What is the root cause of that problem?
Simply we don't limit the maximum line. The report description is rendered with a RenderHTML component and there is no straightforward way to set the number of lines props to the text.
changed the title [-][$500] Lack of maximum height for the `description` field for room hides other options on the page[/-][+][Pay meow][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+]on Sep 10, 2024
changed the title [-][Pay meow][$500] Lack of maximum height for the `description` field for room hides other options on the page[/-][+][HOLD for payment 2024-09-11] ][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+]on Sep 11, 2024
@greg-schroeder I discussed with both Brandon and Shubham and re-checked the PRs. We had multiple scope increases, so I think we should update the payout to be $1250.
Activity
[-]Lack of maximum height for the `description` field for room hides other options on the page[/-][+][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+]melvin-bot commentedon Feb 27, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01b55a4d576f4c3f8a
melvin-bot commentedon Feb 27, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)melvin-bot commentedon Feb 27, 2024
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.rayane-d commentedon Feb 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Lack of maximum height for the description field for room hides other options on the page.
What is the root cause of that problem?
Here:
App/src/pages/ReportDetailsPage.tsx
Lines 245 to 253 in b447c11
We are rendering full description with
shouldRenderAsHTMLWhat changes do you think we should make in order to solve the problem?
we should remove
shouldRenderAsHTMLprop and addnumberOfLinesTitle={4}prop with appropriate maximum number of lines.We can use
windowWidthto define dynamic maximum number of lines.ShridharGoel commentedon Feb 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
For lengthy descriptions, other options go out of the screen.
What is the root cause of that problem?
There is no height limit or lines limit in the below code in MenuItem
What changes do you think we should make in order to solve the problem?
We can pass a prop from details page, which can be set as a max height limit in the above code to ensure that description height is limited.
jeremy-croff commentedon Feb 28, 2024
It's not gonna be that easy guys :P
context #34150 (comment)
Seems we want a solve here for truncating html
jeremy-croff commentedon Feb 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We want to limit the number of lines for html content
What is the root cause of that problem?
Our migration from #34150 (comment) is anticipating markdown support. A choice was made during PR to go with no max lines for this HTML we are rendering as we do not have this feature yet.
What changes do you think we should make in order to solve the problem?
I think as we start supporting more markdown/html we need more tooling to parse over this.
We can leverage a library such as https://github.com/arendjr/text-clipper or implement our own to clip html
What alternative solutions did you explore? (Optional)
I also tried to solve it in a hackish way, setting a max height, overflowing, and adding ellipses with a pseudo element. It's ugly.
bernhardoj commentedon Feb 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no maximum line for the report description.
What is the root cause of that problem?
Simply we don't limit the maximum line. The report description is rendered with a RenderHTML component and there is no straightforward way to set the number of lines props to the text.
App/src/components/MenuItem.tsx
Lines 515 to 519 in 98461f9
What changes do you think we should make in order to solve the problem?
One way is to wrap the description with a new custom tag that will have a custom renderer that can receive a number of lines attribute.
and in
BaseHTMLEngineProviderMenuItem, wrap the HTML with<text>tag.ReportDetailsPage, passnumberOfLinesTitlewith the agreed valueWhy we can't create a custom renderer for
<comment>tag? That's becausecommentis ablockmodel, nottextualwhich won't receivetextProps161 remaining items
[-][$500] Lack of maximum height for the `description` field for room hides other options on the page[/-][+][Pay meow][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+][-][Pay meow][$500] Lack of maximum height for the `description` field for room hides other options on the page[/-][+][HOLD for payment 2024-09-11] ][$500] Lack of maximum height for the `description` field for room hides other options on the page[/+]greg-schroeder commentedon Sep 11, 2024
Payment summary:
Contributor: @brandonhenry - $500 - Offer sent via Upwork
C+: @shubham1206agra - $500 - Offer sent via Upwork
puneetlath commentedon Sep 11, 2024
@greg-schroeder I discussed with both Brandon and Shubham and re-checked the PRs. We had multiple scope increases, so I think we should update the payout to be $1250.
brandonhenry commentedon Sep 12, 2024
@greg-schroeder @puneetlath thanks, let me know if I need to do anything here
greg-schroeder commentedon Sep 12, 2024
Oh, word. All right - I didn't realize as the issue title still shows $500. I can update the offers.
shubham1206agra commentedon Sep 16, 2024
@greg-schroeder Bump here
greg-schroeder commentedon Sep 16, 2024
Hmm - I updated it - did it not go through? I can try again
greg-schroeder commentedon Sep 17, 2024
Tried again. Modified offer for @shubham1206agra - added bonus payment for @brandonhenry
shubham1206agra commentedon Sep 18, 2024
@greg-schroeder I accepted the offer.