Skip to content
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

[No QA] Fix scroll issue #2607

Merged
merged 7 commits into from
Apr 30, 2021
Merged

Conversation

barun1997
Copy link
Contributor

@barun1997 barun1997 commented Apr 28, 2021

<If necessary, assign reviewers that know the area or changes well. Feel free to tag any additional reviewers you see fit.>

Details

Initially, I solved the problem of the input boxes not lining up using flexGrow0 but that prompted the list to not grow.

So, I worked on a solution to instead give the OptionsList a maxHeight, so that anything beyond that would be scrollable.

Fixed Issues

Fixes #1988

Tests

  1. Make these changes locally: https://github.com/Expensify/Expensify.cash/compare/jules-showIOUMenuOptions?expand=1
  2. Go to IOUSplit page and continue until you reach IOUConfirm
  3. Verify if all the rows and comments are shown.
  4. Add multiple participants (till the screen is filled)
  5. Verify you can scroll through the list

QA Steps

Please ping @Julesssss to run the QA steps, as this is not yet possible for external QA

Tested On

  • Web
  • Mobile Web
  • iOS
  • Android

Screenshots

Web

Screenshot 2021-04-28 at 11 28 55

Screenshot 2021-04-28 at 11 29 12

Mobile Web

Screenshot 2021-04-28 at 11 30 18

iOS

viber_image_2021-04-28_11-02-13

viber_image_2021-04-28_11-02-11

Screenshot 2021-04-28 at 11 30 18

@barun1997 barun1997 requested a review from a team as a code owner April 28, 2021 05:47
@MelvinBot MelvinBot requested review from cead22 and removed request for a team April 28, 2021 05:47
@barun1997
Copy link
Contributor Author

barun1997 commented Apr 28, 2021

cc @Julesssss @Jag96

@@ -80,6 +85,11 @@ const defaultProps = {
};

class IOUConfirmationList extends Component {
constructor(props) {
super(props);
this.minimumBottomOffset = 240;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 240 represent the size of the button area? I think this will change in the future, so would we need to make this dynamic in that case?

Also, I don't think it needs to be attached to IOUConfirmationList. Could you make this a constant please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was based on hit and trial to accommodate the button as well as the comment box. Will include it in CONST.js then! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, isn't it more appropriate in IOUConfirmationList itself, considering it includes both the Button and Comment Box, which is only present in IOUConfirmationList right now? @Julesssss

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean more that it doesn't need to be a class prop. A const within this file would be fine too I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Julesssss Ahh makes sense! Made the change :)

Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barun1997 can you please add manual tests so that the PR reviewers and QA can verify the fix? For example, it isn't clear how to get to the split screen

@barun1997
Copy link
Contributor Author

@Jag96 It's there now :)

@Julesssss Julesssss changed the title Fix scroll issue [No QA] Fix scroll issue Apr 29, 2021
@Julesssss
Copy link
Contributor

I've added a note for QA Steps, as it's not yet possible for QA to launch the IOU flow for non-web platforms. I'll do this testing myself.

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that the comment Component is covered by the button at some heights, any idea how to prevent this?

Screenshot 2021-04-29 at 15 31 08

@barun1997
Copy link
Contributor Author

@Julesssss I'll look for a solution. Not sure why it went below like that, is it on the Mobile web?

@barun1997
Copy link
Contributor Author

@Julesssss I just found out it's only that when the user dynamically changes screen height. If you reload on the same height, the screen adapts. Will this be a blocker?

@barun1997
Copy link
Contributor Author

Here's a video to explain it better:

Screen.Recording.2021-04-29.at.20.28.31.mov

@Julesssss
Copy link
Contributor

Julesssss commented Apr 29, 2021

@Julesssss I just found out it's only that when the user dynamically changes screen height. If you reload on the same height, the screen adapts. Will this be a blocker?

Oh, that's a good point. I guess it probably shouldn't be a blocker in that case, but ideally, it would adapt dynamically after changing the screen height.

@barun1997
Copy link
Contributor Author

@Julesssss I just found out it's only that when the user dynamically changes screen height. If you reload on the same height, the screen adapts. Will this be a blocker?

Oh, that's a good point. I guess it probably shouldn't be a blocker in that case, but ideally, it would adapt dynamically after changing the screen height.

Sounds great! I did look into the solutions, haven’t found an elegant solution yet. Majority of the solutions use a listener of some sort to see if the dimensions changed. But since dimensions changing isn’t something that would normally happen with a user, I feel it’d be too over-engineered.

Jag96
Jag96 previously approved these changes Apr 30, 2021
Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, I agree that the dimension resizing would be nice but isn't a blocker in this case. Will defer to @Julesssss for the final say on this.

listContainerStyles={[{
// Give max height to the list container so that it does not extend
// beyond the comment view as well as button
maxHeight: Dimensions.get('window').height - MINIMUM_BOTTOM_OFFSET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to use Dimensions.get here instead of updating this component to use withWindowDimensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realise we had withWindowDimensions. Made the change now!

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@Julesssss Julesssss merged commit bce4b1a into Expensify:main Apr 30, 2021
@Julesssss
Copy link
Contributor

Ideally, we would make the whole page scroll. But that wasn't in the original requirements, so this can be done at a later date.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.34-6🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@cead22
Copy link
Contributor

cead22 commented Apr 30, 2021

I wouldn't have known how to properly review this PR so thanks for not blocking on me. I went ahead and read the commits and the review comments to learn so I can be better prepared for the next PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chat] [IOU] Create IOUConfirm step
5 participants