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 room header avatar does not have background color #14181

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

bernhardoj
Copy link
Contributor

@bernhardoj bernhardoj commented Jan 10, 2023

Details

There is an inconsistencies style (background color) between group header avatar and avatar on another component.

Fixed Issues

$ #13585
PROPOSAL: #13585 (comment)

Tests

  1. Create a new group with a user that has a transparent avatar
  2. Verify the transparent avatar at the group header avatar has a background color
  • Verify that no errors appear in the JS console

Offline tests

  1. Create a new group with a user that has a transparent avatar
  2. Verify the transparent avatar at the group header avatar has a background color

QA Steps

  1. Create a new group with a user that has a transparent avatar
  2. Verify the transparent avatar at the group header avatar has a background color
  • 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 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 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

Untitled

Mobile Web - Chrome

328826

Mobile Web - Safari

image

Desktop

image

iOS

image

Android

328825

@bernhardoj bernhardoj requested a review from a team as a code owner January 10, 2023 15:39
@melvin-bot melvin-bot bot requested review from danieldoglas and eVoloshchak and removed request for a team January 10, 2023 15:39
@melvin-bot
Copy link

melvin-bot bot commented Jan 10, 2023

@danieldoglas @eVoloshchak One of you needs to 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]

Copy link
Contributor

@danieldoglas danieldoglas left a comment

Choose a reason for hiding this comment

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

Code LGTM. @eVoloshchak can you also review, test and do the checklist?

@eVoloshchak
Copy link
Contributor

Code LGTM. @eVoloshchak can you also review, test and do the checklist?

Testing in a couple of hours

@eVoloshchak
Copy link
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 image
Mobile Web - Chrome

Screenshot_20230111-004715_Chrome

Mobile Web - Safari

Simulator Screen Shot - iPhone 12 - 2023-01-11 at 00 46 27

Desktop image
iOS

Simulator Screen Shot - iPhone 12 - 2023-01-11 at 00 46 00

Android

Screenshot_20230111-004749_New Expensify

Copy link
Contributor

@eVoloshchak eVoloshchak 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 and works well

@danieldoglas danieldoglas merged commit 8133a76 into Expensify:main Jan 10, 2023
@OSBotify
Copy link
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
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 697.764 ms → 733.381 ms (+35.617 ms, +5.1%)
App start runJsBundle 189.516 ms → 205.000 ms (+15.484 ms, +8.2%)
App start nativeLaunch 9.806 ms → 19.967 ms (+10.160 ms, +103.6%) 🟡
Open Search Page TTI 594.683 ms → 595.181 ms (+0.498 ms, ±0.0%)
App start regularAppStart 0.015 ms → 0.022 ms (+0.007 ms, +49.7%) 🟡
Show details
Name Duration
App start TTI Baseline
Mean: 697.764 ms
Stdev: 27.206 ms (3.9%)
Runs: 658.5548109998927 663.894791000057 664.7123480001464 669.3660129997879 669.3997960002162 669.6226610001177 669.7454840000719 673.5682819997892 675.8311310000718 678.1291169999167 678.7929159998894 680.1718020001426 684.5147879999131 689.1109469998628 690.1480220002122 691.7676659999415 693.8613829999231 703.61791000003 704.9392309999093 707.0839120000601 708.891977999825 714.0501740002073 715.2708789999597 718.5215779999271 720.7262969999574 721.2511939997785 727.0292500001378 735.2297600000165 735.5552130001597 755.8992909998633 761.4260780001059

Current
Mean: 733.381 ms
Stdev: 24.495 ms (3.3%)
Runs: 677.1636370001361 696.2640669997782 701.619636000134 705.7852429999039 709.408460999839 714.5383559996262 714.7694589998573 717.0527769997716 718.3352610003203 719.3861229997128 720.0736769996583 720.7192689999938 721.2479349998757 721.5425659995526 726.9350009998307 727.5491660004482 735.369710999541 737.4104810003191 738.1695729997009 739.2243349999189 743.7567769996822 746.5479929996654 747.7226309999824 748.8890960002318 751.4335449999198 753.0410129996017 756.5265640001744 756.6978879999369 759.3759719999507 771.5864869998768 776.0787549996749 793.9722699997947
App start runJsBundle Baseline
Mean: 189.516 ms
Stdev: 14.446 ms (7.6%)
Runs: 167 169 171 173 173 177 177 179 180 180 181 182 183 183 184 185 191 191 192 195 195 196 200 201 203 204 204 207 207 218 227

Current
Mean: 205.000 ms
Stdev: 21.488 ms (10.5%)
Runs: 170 173 175 179 184 185 187 188 189 190 191 191 193 197 199 200 200 204 205 212 213 217 219 221 224 227 227 232 236 241 242 249
App start nativeLaunch Baseline
Mean: 9.806 ms
Stdev: 1.255 ms (12.8%)
Runs: 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 11 11 11 11 11 12 12 12 12

Current
Mean: 19.967 ms
Stdev: 1.722 ms (8.6%)
Runs: 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 22 22 22 22 24 25
Open Search Page TTI Baseline
Mean: 594.683 ms
Stdev: 32.699 ms (5.5%)
Runs: 534.5453290003352 544.779012999963 547.8793950006366 553.7449949998409 556.4728190000169 557.5776370000094 561.7982999999076 563.4474279996939 566.3097330001183 567.0132659999654 571.6500250003301 572.1534830001183 589.8530280003324 594.4318439997733 595.259561999701 596.8376070000231 598.6046959999949 598.7414549998939 601.5220949999057 602.3922529998235 604.9213870000094 607.6951909996569 609.1163739999756 611.3844809997827 618.077961999923 618.7100419998169 623.0874849995598 624.8038739999756 625.8224700000137 642.0369069995359 649.6281329998747 654.6393639994785 659.6158039998263

Current
Mean: 595.181 ms
Stdev: 32.697 ms (5.5%)
Runs: 536.6176360007375 537.6609300002456 539.8162839999422 543.4455980006605 547.1649989997968 568.319174000062 569.7579349996522 571.6685390006751 579.1687010005116 579.3206790005788 580.0205899998546 580.7444669995457 583.5593670001253 589.3973789997399 589.910279000178 591.1620690003037 595.7730310000479 596.4973550001159 601.0366209996864 603.6104330001399 606.3474939996377 606.5932620000094 608.5040279999375 611.0171309998259 618.5132240001112 618.5622960003093 632.9239910002798 633.1957599995658 634.1371670002118 634.6350100003183 636.3786220001057 652.3117270004004 663.2116700001061
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (9.9%)
Runs: 0.012410999741405249 0.013021000195294619 0.013509000185877085 0.013671000022441149 0.013712000101804733 0.013794000260531902 0.01383400009945035 0.013835000339895487 0.013915999792516232 0.013915999792516232 0.013916000258177519 0.013956000097095966 0.013956999871879816 0.014077999629080296 0.014078999869525433 0.01407900033518672 0.014240999706089497 0.0147299999371171 0.014770000241696835 0.01485099969431758 0.014851999934762716 0.014973999932408333 0.01509599993005395 0.015461999922990799 0.015625 0.015950999688357115 0.01660200022161007 0.01704900013282895 0.01733399974182248 0.01733400020748377 0.01814799988642335 0.0183100001886487

Current
Mean: 0.022 ms
Stdev: 0.002 ms (7.9%)
Runs: 0.019410000182688236 0.0195720000192523 0.019775000400841236 0.020100999623537064 0.02038499992340803 0.0204670000821352 0.020507999695837498 0.020548000000417233 0.021484999917447567 0.021850000135600567 0.021890999749302864 0.021890999749302864 0.02205400075763464 0.022175999358296394 0.022175999358296394 0.022256999276578426 0.02233900036662817 0.02254199981689453 0.02254300005733967 0.022989999502897263 0.023153000511229038 0.02380300033837557 0.023804000578820705 0.023885000497102737 0.024089000187814236 0.024495000019669533 0.025553000159561634 0.026611000299453735

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @danieldoglas in version: 1.2.53-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.2.53-0 🚀

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

@mountiny
Copy link
Contributor

This PR has introduced a regression addressed here #14318 thanks @bernhardoj

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.

5 participants