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

remove file name from attachment modal #14962

Merged
merged 1 commit into from
Feb 10, 2023
Merged

remove file name from attachment modal #14962

merged 1 commit into from
Feb 10, 2023

Conversation

Puneet-here
Copy link
Contributor

@Puneet-here Puneet-here commented Feb 8, 2023

Details

We have decided to remove the file name from attachment modal because at native the names aren't user friendly and the name changing approach is inconsistent, so the most consistent option was to remove the attachment name.

Fixed Issues

$ #11085
PROPOSAL: #11085 (comment)

Tests

  1. Go to any chat
  2. Click + > add attachment
  3. Select a file
  4. Verify you don't see a file name at top left corner in attachment modal

Offline tests

N/a

QA Steps

  1. Go to any chat
  2. Click + > add attachment
  3. Select a file
  4. Verify you don't see a file name at top left corner in attachment modal
  • 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
      • 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 Screenshot 2023-02-09 at 3 36 31 AM
Mobile Web - Chrome Screenshot 2023-02-09 at 4 11 42 AM
Mobile Web - Safari Screenshot 2023-02-09 at 4 15 39 AM
Desktop Screenshot 2023-02-09 at 3 58 51 AM
iOS Screenshot 2023-02-09 at 4 14 22 AM
Android Screenshot 2023-02-09 at 3 59 20 AM

@Puneet-here Puneet-here marked this pull request as ready for review February 8, 2023 22:49
@Puneet-here Puneet-here requested a review from a team as a code owner February 8, 2023 22:49
@melvin-bot melvin-bot bot requested review from aldo-expensify and thesahindia and removed request for a team February 8, 2023 22:49
@MelvinBot
Copy link

@aldo-expensify @thesahindia 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]

@thesahindia
Copy link
Member

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-02-10 at 1 15 19 AM
Mobile Web - Chrome Screenshot 2023-02-10 at 1 31 24 AM
Mobile Web - Safari Screenshot 2023-02-10 at 1 42 24 AM
Desktop Screenshot 2023-02-10 at 1 24 51 AM
iOS Screenshot 2023-02-10 at 1 38 14 AM
Android Screenshot 2023-02-10 at 1 26 46 AM

Copy link
Member

@thesahindia thesahindia 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!

cc: @aldo-expensify

@aldo-expensify
Copy link
Contributor

LGTM and tested well, thank you both!

@aldo-expensify aldo-expensify merged commit 15178b3 into Expensify:main Feb 10, 2023
@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 657.990 ms → 666.764 ms (+8.774 ms, +1.3%)
Open Search Page TTI 625.734 ms → 628.676 ms (+2.942 ms, ±0.0%)
App start regularAppStart 0.015 ms → 0.014 ms (-0.001 ms, -6.4%)
App start nativeLaunch 22.000 ms → 21.903 ms (-0.097 ms, ±0.0%)
App start runJsBundle 180.250 ms → 178.125 ms (-2.125 ms, -1.2%)
Show details
Name Duration
App start TTI Baseline
Mean: 657.990 ms
Stdev: 30.644 ms (4.7%)
Runs: 608.8309330008924 613.2348820008337 613.9118380006403 626.3336830008775 626.5579940006137 629.3249409999698 629.9881500005722 633.07396800071 633.6618159990758 638.7720170002431 640.950190000236 643.7813310008496 647.9753709994256 650.4951540008187 651.6338470000774 652.4545339997858 655.0423269998282 657.8486940003932 663.4510769993067 670.13532499969 670.3559949994087 671.7499059997499 676.9283520001918 677.4474229998887 680.7983049992472 683.4561989996582 696.8933380004019 699.3208339996636 700.3234989997 723.2926860004663 729.673436999321

Current
Mean: 666.764 ms
Stdev: 23.386 ms (3.5%)
Runs: 623.1969620008022 623.7228180002421 633.1658180002123 637.4643120002002 638.8134059999138 639.5597239993513 641.937615999952 644.847820000723 651.9776460006833 654.6263309996575 660.2530669998378 662.8875089995563 662.9350509997457 663.7610170003027 664.1732449997216 668.8943670000881 671.1860470008105 671.4038009997457 676.1580589991063 678.8250360004604 680.7148400004953 680.844559000805 681.3119600005448 681.6239400003105 681.8773279991001 685.3675970006734 688.8158679995686 693.4161920007318 706.5922270007432 709.3394029997289 710.0008749999106
Open Search Page TTI Baseline
Mean: 625.734 ms
Stdev: 28.144 ms (4.5%)
Runs: 585.2150480002165 585.3485930003226 586.8078209999949 587.80981499888 588.7376720011234 589.4731450006366 598.5257169995457 603.7680259998888 606.1396479997784 606.88716599904 610.6182049997151 611.0292970016599 617.9917810000479 619.6868900004774 622.8265380002558 622.8448489997536 623.3713789992034 623.4352219998837 623.8898109998554 634.0806889999658 634.547444999218 637.5566400010139 638.9739180002362 640.1948649995029 640.2218840010464 643.5420740004629 643.659872001037 650.2890620008111 653.8989669997245 671.3365080002695 674.8613690007478 680.23506699875 691.4245200008154

Current
Mean: 628.676 ms
Stdev: 32.286 ms (5.1%)
Runs: 585.1658939998597 587.647950001061 592.1282150000334 594.3621430005878 595.2397469989955 595.903279999271 598.0091149993241 599.7744549997151 601.0635580010712 604.6864829994738 605.6609300002456 607.6304529998451 612.2454840000719 616.6206470001489 616.6560880001634 620.4670410007238 624.8747160006315 625.668008999899 626.0913089998066 627.6202390007675 631.0235190000385 632.1786299999803 639.9250489994884 640.4040529988706 652.1453859992325 657.4602859988809 661.4390060007572 663.8493239991367 667.569947000593 678.9454340003431 680.2060139998794 700.4763590004295 703.1708170007914
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (4.4%)
Runs: 0.013753999024629593 0.013915998861193657 0.014038000255823135 0.014201000332832336 0.014201000332832336 0.014242000877857208 0.014322999864816666 0.014403998851776123 0.014444999396800995 0.014485999941825867 0.014567000791430473 0.014688998460769653 0.01476999931037426 0.01477000117301941 0.014770999550819397 0.014852000400424004 0.01489199884235859 0.01505500078201294 0.015095999464392662 0.015095999464392662 0.015218999236822128 0.015379998832941055 0.015420999377965927 0.015583999454975128 0.015584001317620277 0.015665000304579735 0.01574699953198433 0.01591000147163868 0.015990998595952988 0.01603100076317787 0.016154000535607338

Current
Mean: 0.014 ms
Stdev: 0.001 ms (6.0%)
Runs: 0.012776998803019524 0.012777000665664673 0.012816999107599258 0.012980001047253609 0.013224000111222267 0.013265000656247139 0.013345999643206596 0.013345999643206596 0.013346999883651733 0.013468001037836075 0.013509001582860947 0.013631001114845276 0.013671999797224998 0.013712000101804733 0.01371300034224987 0.01371300034224987 0.0138349998742342 0.014038000255823135 0.014077998697757721 0.01411999948322773 0.014161000028252602 0.014321999624371529 0.014322001487016678 0.0143630001693964 0.014364000409841537 0.014649000018835068 0.014771001413464546 0.014812000095844269 0.015014000236988068 0.015259001404047012 0.016112999990582466 0.01615399867296219
App start nativeLaunch Baseline
Mean: 22.000 ms
Stdev: 1.984 ms (9.0%)
Runs: 19 19 19 19 20 20 20 20 21 21 21 21 21 22 22 22 22 22 22 23 23 23 23 24 24 24 24 24 25 26 26

Current
Mean: 21.903 ms
Stdev: 2.532 ms (11.6%)
Runs: 18 19 19 19 19 19 20 20 20 20 20 20 20 20 21 22 22 22 23 23 24 24 24 24 24 24 25 25 25 26 28
App start runJsBundle Baseline
Mean: 180.250 ms
Stdev: 21.319 ms (11.8%)
Runs: 151 154 155 159 159 160 160 162 163 166 167 167 170 171 176 176 176 176 181 181 186 190 190 196 197 197 200 201 204 206 234 237

Current
Mean: 178.125 ms
Stdev: 16.603 ms (9.3%)
Runs: 150 154 155 158 162 162 164 166 166 167 167 168 169 174 174 175 178 180 180 182 182 183 184 187 189 195 196 203 203 207 207 213

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.2.69-1 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.69-2 🚀

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

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