Skip to content

Fix offset in Details Page#14689

Merged
cristipaval merged 1 commit into
mainfrom
cristi_fix-offset-in-details-page
Jan 31, 2023
Merged

Fix offset in Details Page#14689
cristipaval merged 1 commit into
mainfrom
cristi_fix-offset-in-details-page

Conversation

@cristipaval

@cristipaval cristipaval commented Jan 31, 2023

Copy link
Copy Markdown
Contributor

cc @shawnborton

Details

Fixes the offset below the labels in Details Page to be the same everywhere in the App

Fixed Issues

#14591 (comment)

Tests and QA Steps

  1. Tap on someone else's avatar to open the person details page
  2. Verify that the offset below labels is 4px

ios native copy

  • Verify that no errors appear in the JS console

Offline tests

N/A

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 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 correct English and 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
    • 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 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 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.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web web
Mobile Web - Chrome android chrome
Mobile Web - Safari ios safari
Desktop desktop
iOS ios native
Android Screenshot 2023-01-31 at 15 47 09

@cristipaval cristipaval requested a review from a team as a code owner January 31, 2023 13:49
@cristipaval cristipaval self-assigned this Jan 31, 2023
@melvin-bot melvin-bot Bot requested review from jasperhuangg and removed request for a team January 31, 2023 13:50
@melvin-bot

melvin-bot Bot commented Jan 31, 2023

Copy link
Copy Markdown

@jasperhuangg 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]

@shawnborton

Copy link
Copy Markdown
Contributor

Looks great, thanks for taking care of this!

@jasperhuangg

Copy link
Copy Markdown
Contributor

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 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 correct English and 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 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 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web Screenshot 2023-01-31 at 9 25 17 AM
Mobile Web - Chrome Screenshot 2023-01-31 at 9 34 50 AM
Mobile Web - Safari Screenshot 2023-01-31 at 9 35 02 AM
Desktop Screenshot 2023-01-31 at 9 29 00 AM
iOS Screenshot 2023-01-31 at 9 39 02 AM
Android Screenshot 2023-01-31 at 9 43 24 AM

@jasperhuangg jasperhuangg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tests well, approving!

@cristipaval cristipaval merged commit ecabbdc into main Jan 31, 2023
@cristipaval cristipaval deleted the cristi_fix-offset-in-details-page branch January 31, 2023 18:57
@OSBotify

Copy link
Copy Markdown
Contributor

✋ 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

Copy link
Copy Markdown
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 713.527 ms → 726.273 ms (+12.747 ms, +1.8%)
App start runJsBundle 197.844 ms → 201.367 ms (+3.523 ms, +1.8%)
Open Search Page TTI 625.624 ms → 626.372 ms (+0.748 ms, ±0.0%)
App start regularAppStart 0.015 ms → 0.015 ms (+0.001 ms, +3.8%)
App start nativeLaunch 20.581 ms → 20.133 ms (-0.447 ms, -2.2%)
Show details
Name Duration
App start TTI Baseline
Mean: 713.527 ms
Stdev: 28.813 ms (4.0%)
Runs: 646.4989700000733 663.1935860002413 676.479469999671 676.5586329996586 690.7710450002924 691.0912800002843 693.245699999854 693.282302999869 693.3420289997011 693.9376509999856 696.1645539999008 700.1547410003841 703.9655780000612 709.8041179999709 710.8993939999491 714.902939000167 715.0141669996083 716.79532700032 716.9020349998027 719.9098119996488 719.9870939999819 724.5717470003292 729.5088250003755 731.958541999571 736.07734800037 739.3432120000944 740.4837539996952 743.048209999688 743.7957290001214 755.0586900003254 761.9390730001032 784.1670230003074

Current
Mean: 726.273 ms
Stdev: 27.024 ms (3.7%)
Runs: 670.7266570003703 693.8750229999423 694.6740110004321 694.974987000227 696.6446900004521 705.0214099995792 705.1949089998379 709.396859000437 711.9255130002275 712.4463229998946 716.6346310004592 718.81635500025 719.3606789996848 720.2813969999552 720.3647090001032 721.8578469995409 723.194126999937 724.7865620004013 726.4196880003437 727.4610949996859 731.7110559996217 732.2215179996565 733.9482399998233 742.3426510002464 745.036824000068 746.382887000218 755.8947799997404 756.7440569996834 770.4827389996499 790.2649379996583 795.388577000238
App start runJsBundle Baseline
Mean: 197.844 ms
Stdev: 17.303 ms (8.7%)
Runs: 169 172 173 176 179 180 180 182 183 185 189 190 194 194 195 196 197 203 204 205 206 207 208 208 209 209 211 212 219 223 234 239

Current
Mean: 201.367 ms
Stdev: 17.536 ms (8.7%)
Runs: 175 175 177 181 182 185 188 189 190 190 192 193 194 195 196 200 203 204 205 208 209 212 213 219 219 221 223 224 235 244
Open Search Page TTI Baseline
Mean: 625.624 ms
Stdev: 25.711 ms (4.1%)
Runs: 590.9626460000873 595.2186279995367 595.4515790008008 596.1400959994644 597.3498539999127 597.6501470003277 600.3000900000334 600.4367680000141 602.9842939991504 609.8198650004342 613.293619999662 613.6090090004727 617.1840820005164 617.7423090003431 617.9699300006032 619.7955729998648 620.2126469993964 621.3007000004873 628.4486089991406 630.8618170004338 633.3090420002118 633.6974700000137 636.1070559993386 643.6902670003474 643.910442000255 644.8143310006708 645.2808029996231 649.4310710001737 661.1875 663.2843429995701 685.6397299999371 692.8680429998785

Current
Mean: 626.372 ms
Stdev: 18.719 ms (3.0%)
Runs: 592.2240400006995 594.5606690002605 594.5789799997583 605.1212569996715 609.4090980002657 611.3803710006177 614.1675220001489 614.5021569998935 616.8420819994062 617.0366620002314 617.4128010002896 618.4606940001249 619.4551590001211 619.9750970005989 621.4624429997057 623.525960999541 627.2684329999611 627.6414800006896 630.5437420001253 631.2234699996188 633.1586109995842 635.9431959996 638.8090409999713 639.0063070002943 642.637085000053 642.822387999855 645.6629640003666 645.74015300069 650.6868899995461 660.3611249998212 675.900512999855
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (5.9%)
Runs: 0.01297999918460846 0.013183999806642532 0.01375299971550703 0.013915999792516232 0.014077999629080296 0.014078999869525433 0.01411999948322773 0.014159999787807465 0.014281999319791794 0.014282000251114368 0.014322999864816666 0.014363999478518963 0.014363999478518963 0.01444500032812357 0.01448499970138073 0.014566999860107899 0.014770000241696835 0.014972999691963196 0.014973999932408333 0.014973999932408333 0.015096000395715237 0.015258999541401863 0.015300000086426735 0.015421999618411064 0.015422000549733639 0.015462000854313374 0.01582799945026636 0.01607299968600273 0.016397999599575996 0.01692699920386076

Current
Mean: 0.015 ms
Stdev: 0.001 ms (4.0%)
Runs: 0.013671999797224998 0.014161000028252602 0.014282000251114368 0.014568000100553036 0.014852000400424004 0.0148930000141263 0.014933000318706036 0.014973999932408333 0.01501499954611063 0.01501499954611063 0.015095999464392662 0.015258999541401863 0.015298999845981598 0.01534000039100647 0.015340999700129032 0.015422000549733639 0.015502999536693096 0.015502999536693096 0.01550300046801567 0.015542999841272831 0.015584000386297703 0.01566499937325716 0.015665999613702297 0.015828000381588936 0.016032000072300434 0.016032000072300434 0.016193999908864498 0.016195000149309635 0.01635799929499626
App start nativeLaunch Baseline
Mean: 20.581 ms
Stdev: 2.060 ms (10.0%)
Runs: 18 18 18 18 19 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 21 21 21 22 22 22 23 24 24 25 26

Current
Mean: 20.133 ms
Stdev: 1.335 ms (6.6%)
Runs: 18 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 21 21 21 22 22 22 23 24

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/cristipaval in version: 1.2.63-0 🚀

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

@OSBotify

OSBotify commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.63-0 🚀

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

@aimane-chnaif aimane-chnaif mentioned this pull request Feb 11, 2023
54 tasks
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.

4 participants