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

fix: show scrollbar if applicable #28720

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

samh-nl
Copy link
Contributor

@samh-nl samh-nl commented Oct 3, 2023

Details

Previously, not all settings pages showed a scrollbar if the content exceeded the window height.

Fixed Issues

$ #26098
PROPOSAL: #26098 (comment)

Tests

  1. Go to Settings
  2. Reduce the window height if necessary to ensure the page overflows (web/desktop)
  3. Verify a scrollbar is visible when scrolling
  4. Go to Workspaces
  5. Reduce the window height if necessary to ensure the page overflows (web/desktop)
  6. Verify a scrollbar is visible when scrolling
  7. Press on the back button
  8. Go to Profile > Status
  9. Reduce the window height if necessary to ensure the page overflows (web/desktop)
  10. Verify a scrollbar is visible when scrolling
  11. Press on the back button twice to go back to Settings
  12. Go to Preferences
  13. Reduce the window height if necessary to ensure the page overflows (web/desktop)
  14. Verify a scrollbar is visible when scrolling
  15. Press on the back button
  16. Go to Security
  17. Reduce the window height if necessary to ensure the page overflows (web/desktop)
  18. Verify a scrollbar is visible when scrolling
  • Verify that no errors appear in the JS console

Offline tests

Same as specified under Tests.

QA Steps

Same as specified under Tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Web.Screen.Recording.2023-10-03.at.14.01.52.mov
Mobile Web - Chrome
mWeb.Chrome.Screen.Recording.2023-10-03.at.15.05.06.mov
Mobile Web - Safari
mWeb.Safari.Screen.Recording.2023-10-03.at.14.09.52.mov
Desktop
Desktop.Screen.Recording.2023-10-03.at.14.11.57.mov
iOS
iOS.Native.Screen.Recording.2023-10-03.at.14.05.04.mov
Android
Android.Native.Screen.Recording.2023-10-03.at.15.00.22.mov

@samh-nl samh-nl requested a review from a team as a code owner October 3, 2023 13:12
@melvin-bot melvin-bot bot requested review from 0xmiros and removed request for a team October 3, 2023 13:12
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

@0xmiroslav Please 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]

@0xmiros
Copy link
Contributor

0xmiros commented Oct 3, 2023

@samh-nl please specify affected Setting pages in QA step. Now it's general.

@0xmiros
Copy link
Contributor

0xmiros commented Oct 3, 2023

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
web.mov
Mobile Web - Chrome
mchrome.mov
Mobile Web - Safari
msafari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov

@melvin-bot melvin-bot bot requested a review from roryabraham October 3, 2023 15:07
@samh-nl
Copy link
Contributor Author

samh-nl commented Oct 3, 2023

@samh-nl please specify affected Setting pages in QA step. Now it's general.

Thanks, I have made it more specific. Let me know if there is a better format for these kind of repetitive steps.

@0xmiros
Copy link
Contributor

0xmiros commented Oct 3, 2023

@samh-nl please specify affected Setting pages in QA step. Now it's general.

Thanks, I have made it more specific. Let me know if there is a better format for these kind of repetitive steps.

Fine to me

@0xmiros
Copy link
Contributor

0xmiros commented Oct 3, 2023

@roryabraham all yours

@roryabraham roryabraham merged commit 7f063c7 into Expensify:main Oct 4, 2023
22 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Oct 4, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Oct 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
App start TTI 1199.523 ms → 1283.123 ms (+83.600 ms, +7.0%) 🔴
Show details
Name Duration
App start TTI Baseline
Mean: 1199.523 ms
Stdev: 23.753 ms (2.0%)
Runs: 1150.1621380001307 1155.535815000534 1161.8095149993896 1171.4317599982023 1172.7626909986138 1175.150502000004 1179.6969109997153 1186.0416200011969 1187.1733079999685 1187.7100859992206 1189.1357819996774 1194.9799010008574 1195.3017730005085 1196.8693219982088 1200.7275599986315 1201.8272220008075 1202.5261639989913 1203.7256439998746 1210.9099170006812 1211.8699770011008 1213.898765001446 1214.0611080005765 1214.6201829984784 1218.3061649985611 1218.8947659991682 1219.7381960004568 1233.0134259983897 1234.1073350012302 1239.2309449985623 1244.4742069989443

Current
Mean: 1283.123 ms
Stdev: 29.572 ms (2.3%)
Runs: 1213.699567001313 1237.6582790017128 1247.1900940015912 1248.9275069981813 1256.949567001313 1262.2452600002289 1263.7878720015287 1264.1185850016773 1265.5348449982703 1266.5887430012226 1266.8805399984121 1268.7315529994667 1268.816112998873 1270.0911579988897 1271.8935789987445 1284.6509849987924 1286.6359210014343 1289.5573350004852 1290.127510998398 1290.2626909986138 1292.1303180009127 1298.1117619983852 1299.83537799865 1302.7184019982815 1308.5754440017045 1314.565898001194 1316.0581380017102 1317.5674730017781 1321.433262001723 1343.5500900000334 1347.9278750009835

Meaningless Changes To Duration

Show entries
Name Duration
App start runJsBundle 841.900 ms → 886.594 ms (+44.694 ms, +5.3%)
Open Search Page TTI 649.652 ms → 651.777 ms (+2.125 ms, ±0.0%)
App start nativeLaunch 20.194 ms → 21.379 ms (+1.186 ms, +5.9%)
App start regularAppStart 0.018 ms → 0.015 ms (-0.003 ms, -17.6%) 🟢
Show details
Name Duration
App start runJsBundle Baseline
Mean: 841.900 ms
Stdev: 26.918 ms (3.2%)
Runs: 784 800 802 811 811 819 822 827 828 831 832 833 833 839 839 841 844 846 847 847 852 853 860 862 870 876 879 883 885 901

Current
Mean: 886.594 ms
Stdev: 23.344 ms (2.6%)
Runs: 841 854 857 860 860 865 866 867 868 868 872 875 877 879 889 890 890 894 895 896 897 898 899 901 902 902 903 903 906 907 939 951
Open Search Page TTI Baseline
Mean: 649.652 ms
Stdev: 33.726 ms (5.2%)
Runs: 605.2753910012543 605.8387859985232 606.2432460002601 614.2404789999127 615.4560550004244 616.5912679992616 617.3052980005741 623.3175049982965 624.8857019990683 630.9306639991701 632.7630209997296 633.0810949988663 637.984416000545 638.3083910010755 642.1901049986482 642.2091480009258 643.0512700006366 644.0189609974623 647.3983159996569 648.9504400007427 651.1022539995611 653.3416349999607 658.6943769976497 663.500163000077 675.772339001298 676.3876140005887 680.6359870024025 690.0734050013125 700.3461510017514 706.7958180010319 729.2124850004911 732.975505001843

Current
Mean: 651.777 ms
Stdev: 32.812 ms (5.0%)
Runs: 598.9826260022819 605.865234002471 613.4302570000291 616.3772390000522 616.5763350017369 620.703735999763 621.978311996907 622.6583250015974 623.4991870000958 625.1851399987936 631.6483970023692 637.7104909978807 639.0131839998066 642.4466149993241 642.687663000077 646.3430589996278 646.8406169973314 646.9113770015538 652.6579180024564 652.6795249991119 655.9948729984462 664.5896000005305 672.6691490001976 674.819092001766 675.9446619972587 683.1210530027747 683.8876140005887 688.4617520011961 703.0954999998212 715.7706299982965 716.4949139989913 717.8229169994593
App start nativeLaunch Baseline
Mean: 20.194 ms
Stdev: 1.574 ms (7.8%)
Runs: 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 21 21 21 21 22 22 22 23 23 25

Current
Mean: 21.379 ms
Stdev: 2.058 ms (9.6%)
Runs: 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 21 22 22 22 22 23 23 23 23 23 23 25 25 27
App start regularAppStart Baseline
Mean: 0.018 ms
Stdev: 0.001 ms (6.3%)
Runs: 0.015787001699209213 0.016397997736930847 0.01660200208425522 0.016805000603199005 0.01684499904513359 0.016885999590158463 0.017170999199151993 0.01725199818611145 0.01725199818611145 0.017252996563911438 0.01741599664092064 0.017497003078460693 0.017618998885154724 0.017659999430179596 0.017902996391057968 0.01822900027036667 0.01827000081539154 0.018351003527641296 0.01839200034737587 0.018473003059625626 0.01855500042438507 0.018594998866319656 0.018718000501394272 0.018758002668619156 0.01892099902033806 0.01892099902033806 0.019287001341581345 0.019652999937534332 0.019735001027584076 0.020426999777555466 0.020548000931739807

Current
Mean: 0.015 ms
Stdev: 0.001 ms (5.0%)
Runs: 0.013508997857570648 0.013833999633789062 0.013996999710798264 0.014038000255823135 0.014038000255823135 0.014078997075557709 0.014079000800848007 0.014118999242782593 0.014362998306751251 0.014403998851776123 0.014566998928785324 0.014607999473810196 0.014607999473810196 0.01464800164103508 0.01469000056385994 0.014729999005794525 0.014811001718044281 0.01493300125002861 0.015096001327037811 0.015135999768972397 0.01517699658870697 0.015177000313997269 0.01521800085902214 0.015259001404047012 0.015339996665716171 0.015625 0.015870001167058945 0.01590999960899353 0.01603199914097786 0.016112998127937317 0.016114000231027603 0.01635799929499626

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker.

@OSBotify
Copy link
Contributor

OSBotify commented Oct 5, 2023

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.78-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 6, 2023

🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.78-4 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 6, 2023

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.3.79-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Oct 9, 2023

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.79-5 🚀

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants