-
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
[HOLD for payment 2024-09-11] ][$500] Lack of maximum height for the description
field for room hides other options on the page
#37357
Comments
description
field for room hides other options on the pagedescription
field for room hides other options on the page
Job added to Upwork: https://www.upwork.com/jobs/~01b55a4d576f4c3f8a |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 ( |
Triggered auto assignment to @greg-schroeder ( |
ProposalPlease 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 What changes do you think we should make in order to solve the problem?we should remove |
ProposalPlease 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. |
It's not gonna be that easy guys :P |
ProposalPlease 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. 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. |
ProposalPlease 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
Why we can't create a custom renderer for |
ProposalPlease re-state the problem that we are trying to solve in this issue.Full description displayed. What is the root cause of that problem?We are using App/src/components/MenuItem.tsx Line 517 in dcf2e3e
What changes do you think we should make in order to solve the problem?Remove the option to render the description as HTML and just render as Text. What alternative solutions did you explore? (Optional)We can wrap the component with a Text and numberOfLines={1} prop. + <Text numberOfLines={1}>
<RenderHTML html={getProcessedTitle} />
+ </Text>
/> |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a room description is long, it pushes menu items off the screen so the user has to scroll down to see them. This happens on all platforms where the screen/window is too short to display everything in the details panel. What is the root cause of that problem?The room description's height is variable because it is determined by the length of the user input. What changes do you think we should make in order to solve the problem?Move the room description below the menu items in ReportDetailsPage.tsx. This ensures the menu items are always visible and the layout stays consistent. The bottom of long descriptions will still be off the screen, but it will be visually obvious that the user can scroll down to see the full text. This solution is very simple to implement and doesn't require any adding any tools, functionality, or conditions, so it won't cause regressions. However, if there are design docs or user manuals that show this screen, they will need to be updated. What alternative solutions did you explore? (Optional)
|
📣 @sarahRosannaBusch! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
#37357 (comment) - @dragnoir sorry but i dont find you solution working as we expect i.e. render html as it is now just have a max height/ limit for number of lines #37357 (comment) - @bernhardoj do you mind sharing a test branch(doesn't need to polished just a working POC) #37357 (comment) - @ShridharGoel can you please elaborate where do you want to use the maxheight prop in codebase please give minimum details so it can be tested easily #37357 (comment) - @rayane-djouah As per require we want to render the text as html not normal text #37357 (comment) - @jeremy-croff i dont see a solution in your proposal but a library suggestion without any detail on how it can be integrated also if you want to propose a new library please follow this template for your proposal |
@ishpaul777 sure, here is the test branch |
Thanks for sharing the branch @bernhardoj I'll evaluate and test branch later today 🙇♂️ |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@greg-schroeder, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
testing changes from @bernhardoj branch, will update asap |
@shubham1206agra @greg-schroeder @puneetlath looks like this one is blocking and I see the issue
|
Got it. Yes, please open a PR, thanks! |
@puneetlath i tried to create a PR and it said I wasn't a collaborator? Did that connection break at some point? |
@brandonhenry hmm I'm not sure, but actually let's hold off for a sec. I'm not sure that's the best solution. Let me think about it a bit without being rushed for the deploy. |
@puneetlath okay I got the PR all setup here: #48098 |
@brandonhenry I'm going to let @nkdengineer raise the PR since they found the proper root cause here. I don't think your solution will work in the scenario where it's longer than 200 characters, but doesn't contain any HTML. |
@Expensify/design @puneetlath Can I do the enhancement in the room description? Right now, clicking on the image does nothing. I am proposing attachment modal similar to what we have in private notes. |
We support images in room descriptions? |
Yes, we support all types of markdown |
Ahh I see. I say let's live with it for a bit to see how we like it before adding more enhancements. |
@puneetlath This is ready for payment. Can you add the labels? |
Hmm - was this not picked up by automation or something? @puneetlath do you know? |
@greg-schroeder automation has been failing often lately (Rory is working on a fix!) |
description
field for room hides other options on the pagedescription
field for room hides other options on the page
description
field for room hides other options on the pagedescription
field for room hides other options on the page
Payment summary: Contributor: @brandonhenry - $500 - Offer sent via Upwork |
@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. |
@greg-schroeder @puneetlath thanks, let me know if I need to do anything here |
Oh, word. All right - I didn't realize as the issue title still shows $500. I can update the offers. |
@greg-schroeder Bump here |
Hmm - I updated it - did it not go through? I can try again |
Tried again. Modified offer for @shubham1206agra - added bonus payment for @brandonhenry |
@greg-schroeder I accepted the offer. |
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: 1.4.44-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1709046310280799
Action Performed:
Expected Result:
All the option in the details page should be visible restricting the max height of the description field
Actual Result:
Lack of a max height for the description field obscures other options
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @greg-schroederThe text was updated successfully, but these errors were encountered: