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

replace onModalHide with onDismiss for the web #15298

Merged
merged 6 commits into from
Feb 24, 2023

Conversation

ntdiary
Copy link
Contributor

@ntdiary ntdiary commented Feb 20, 2023

Details

Fixed Issues

$ #14848
PROPOSAL: #14848 (comment)

Tests

  1. Open a report that has historical messages.
  2. Press the edit message icon.
  3. Press the emoji icon in the edit composer to open the emoji modal.
  4. Exit the emoji model by pressing outside.
  5. The edit composer will highlight.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

  1. Open a report that has historical messages.
  2. Press the edit message icon.
  3. Press the emoji icon in the edit composer to open the emoji modal.
  4. Exit the emoji model by pressing outside.
  5. The edit composer will highlight.
  • 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.
  • 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.mp4
Mobile Web - Chrome
android-chrome.mp4
Mobile Web - Safari
ios-safari.mp4
Desktop
desktop.mp4
iOS
ios-app.mp4
Android
android-app.mp4

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 20, 2023

Hi, @mollfpr @cristipaval , I'm not quit sure if this replacement approach is in line with specification and would appreciate if you could share your thoughts. 😄

@ntdiary ntdiary marked this pull request as ready for review February 20, 2023 15:54
@ntdiary ntdiary requested a review from a team as a code owner February 20, 2023 15:54
@melvin-bot melvin-bot bot requested review from cristipaval and mollfpr and removed request for a team February 20, 2023 15:55
@MelvinBot
Copy link

@cristipaval @mollfpr 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]

@mollfpr
Copy link
Contributor

mollfpr commented Feb 20, 2023

@ntdiary How about adding new props onDismiss to BaseModal, and in Modal/index.web.js we override the onModalHide with an empty function and onDismiss with the hideModal function.

cc @cristipaval

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 20, 2023

The main diffs are as follows, I think we might also need to call `onDismiss` in `componentWillUnmount` to ensure compatibility?
diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js
index dc29bc4896..904dd43036 100644
--- a/src/components/Modal/BaseModal.js
+++ b/src/components/Modal/BaseModal.js
@@ -16,11 +16,15 @@ const propTypes = {

     /** The ref to the modal container */
     forwardedRef: PropTypes.func,
+
+    /** Ensure that callback and trap deactivation are in the same loop on the web platform */
+    onDismiss: PropTypes.func,
 };

 const defaultProps = {
     ...modalDefaultProps,
     forwardedRef: () => {},
+    onDismiss: () => {},
 };

 class BaseModal extends PureComponent {
@@ -28,6 +32,7 @@ class BaseModal extends PureComponent {
         super(props);

         this.hideModal = this.hideModal.bind(this);
+        this.onDismiss = this.onDismiss.bind(this);
     }

     componentDidUpdate(prevProps) {
@@ -41,6 +46,14 @@ class BaseModal extends PureComponent {
     componentWillUnmount() {
         // we don't want to call the onModalHide on unmount
         this.hideModal(this.props.isVisible);
+        this.onDismiss(this.props.isVisible);
+    }
+
+    onDismiss(callHideCallback = true) {
+        if (!callHideCallback) {
+            return;
+        }
+        this.props.onDismiss();
     }

     /**
@@ -99,6 +112,7 @@ class BaseModal extends PureComponent {
                 }}
                 propagateSwipe={this.props.propagateSwipe}
                 onModalHide={this.hideModal}
+                onDismiss={this.onDismiss}
                 onSwipeComplete={this.props.onClose}
                 swipeDirection={swipeDirection}
                 isVisible={this.props.isVisible}
diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js
index 3cb6f3561b..980d978621 100644
--- a/src/components/Modal/index.web.js
+++ b/src/components/Modal/index.web.js
@@ -29,7 +29,8 @@ const Modal = (props) => {
         <BaseModal
             // eslint-disable-next-line react/jsx-props-no-spreading
             {...props}
-            onModalHide={hideModal}
+            onDismiss={hideModal}
+            onModalHide={() => {}}
             onModalShow={showModal}
         >
             {props.children}

@s77rt
Copy link
Contributor

s77rt commented Feb 21, 2023

Suggestion: I think we should use onDismiss only if coverScreen is true, otherwise use onModalHide. The onDismiss method is only available on RN Modal.

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 21, 2023

If we are also considering coverScreen, we need to add the change to index.web.js

diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js
index 980d978621..eddcdd39b1 100644
--- a/src/components/Modal/index.web.js
+++ b/src/components/Modal/index.web.js
@@ -29,8 +29,8 @@ const Modal = (props) => {
         <BaseModal
             // eslint-disable-next-line react/jsx-props-no-spreading
             {...props}
-            onDismiss={hideModal}
-            onModalHide={() => {}}
+            onDismiss={props.fullscreen ? hideModal : () => {}}
+            onModalHide={!props.fullscreen ? hideModal() : () => {}}
             onModalShow={showModal}

Perhaps the first revision would be more concise and easier to understand?

diff:
diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js
index dc29bc4896..fbbe10c6b3 100644
--- a/src/components/Modal/BaseModal.js
+++ b/src/components/Modal/BaseModal.js
@@ -16,11 +16,15 @@ const propTypes = {

     /** The ref to the modal container */
     forwardedRef: PropTypes.func,
+
+    /** Ensure that callback and trap deactivation are in the same loop on the web platform */
+    useOnDismiss: PropTypes.bool,
 };

 const defaultProps = {
     ...modalDefaultProps,
     forwardedRef: () => {},
+    useOnDismiss: false,
 };

 class BaseModal extends PureComponent {
@@ -98,7 +102,8 @@ class BaseModal extends PureComponent {
                     this.props.onModalShow();
                 }}
                 propagateSwipe={this.props.propagateSwipe}
-                onModalHide={this.hideModal}
+                onDismiss={this.props.useOnDismiss ? this.hideModal : () => {}}
+                onModalHide={!this.props.useOnDismiss ? this.hideModal : () => {}}
                 onSwipeComplete={this.props.onClose}
                 swipeDirection={swipeDirection}
                 isVisible={this.props.isVisible}
diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js
index 3cb6f3561b..e61225e1e2 100644
--- a/src/components/Modal/index.web.js
+++ b/src/components/Modal/index.web.js
@@ -29,6 +29,7 @@ const Modal = (props) => {
         <BaseModal
             // eslint-disable-next-line react/jsx-props-no-spreading
             {...props}
+            useOnDismiss={props.fullscreen}
             onModalHide={hideModal}
             onModalShow={showModal}
         >

cc @mollfpr @cristipaval

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 22, 2023

Hi, @mollfpr @cristipaval , could we move on with the latest version?
Or would we prefer this one to move on?

How about adding new props onDismiss to BaseModal, and in Modal/index.web.js we override the onModalHide with an empty function and onDismiss with the hideModal function.

Personally, I think the former is easy to understand and maintain, but will check conditions for all platforms.
With the latter, onDismiss is empty function for other platforms, but it needs to perform similar logic to hideModal for web.

Please let me know if there are any concerns. 😄

@mollfpr
Copy link
Contributor

mollfpr commented Feb 22, 2023

@ntdiary I'm genuinely sorry for the delay.

Could you point out which is the former one? Is it the original one?

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 22, 2023

Could you point out which is the former one? Is it the original one?

@mollfpr, yeh 😄, the main diffs:

diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js
index dc29bc4896..fbbe10c6b3 100644
--- a/src/components/Modal/BaseModal.js
+++ b/src/components/Modal/BaseModal.js
@@ -16,11 +16,15 @@ const propTypes = {

     /** The ref to the modal container */
     forwardedRef: PropTypes.func,
+
+    /** Ensure that callback and trap deactivation are in the same loop on the web platform */
+    useOnDismiss: PropTypes.bool,
 };

 const defaultProps = {
     ...modalDefaultProps,
     forwardedRef: () => {},
+    useOnDismiss: false,
 };

 class BaseModal extends PureComponent {
@@ -98,7 +102,8 @@ class BaseModal extends PureComponent {
                     this.props.onModalShow();
                 }}
                 propagateSwipe={this.props.propagateSwipe}
-                onModalHide={this.hideModal}
+                onDismiss={this.props.useOnDismiss ? this.hideModal : () => {}}
+                onModalHide={!this.props.useOnDismiss ? this.hideModal : () => {}}
                 onSwipeComplete={this.props.onClose}
                 swipeDirection={swipeDirection}
                 isVisible={this.props.isVisible}
diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js
index 3cb6f3561b..e61225e1e2 100644
--- a/src/components/Modal/index.web.js
+++ b/src/components/Modal/index.web.js
@@ -29,6 +29,7 @@ const Modal = (props) => {
         <BaseModal
             // eslint-disable-next-line react/jsx-props-no-spreading
             {...props}
+            useOnDismiss={props.fullscreen}
             onModalHide={hideModal}
             onModalShow={showModal}
         >

@mollfpr
Copy link
Contributor

mollfpr commented Feb 22, 2023

@ntdiary Yeah, that seems maintainable and makes sense to me. What do you think @cristipaval?

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 23, 2023

@cristipaval hi, is there anything else I can do for this pr? 😄

@cristipaval
Copy link
Contributor

Sorry, I'll review it within the next few hours.

Copy link
Contributor

@cristipaval cristipaval left a comment

Choose a reason for hiding this comment

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

Changes look good to me, the thing is that I cannot reproduce the issue on main branch either on the physical iOS device or on the simulator. @mollfpr Can you reproduce it with the latest main?

@mollfpr
Copy link
Contributor

mollfpr commented Feb 23, 2023

@cristipaval Sorry I can’t confirm it, I don’t have my laptop now but I can reproduce it on the staging and production with my device.

@ntdiary Can you confirm the @cristipaval comment?

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 23, 2023

@mollfpr @cristipaval yeh, I can reproduce it with the latest main on the simulator (I don't have a physical IOS device now)

simulator.mp4

Copy link
Contributor

@cristipaval cristipaval left a comment

Choose a reason for hiding this comment

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

Sorry @ntdiary ! I missed the steps to reproduce the issue 🤦‍♂️
I reproduced the issue in dev on main and your fix works well on iOS simulator.

@mollfpr yes I think the solution is clean enough.

src/components/Modal/BaseModal.js Outdated Show resolved Hide resolved
@mollfpr
Copy link
Contributor

mollfpr commented Feb 24, 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 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.
  • 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
15298.Web.mov
Mobile Web - Chrome
15298.mWeb.Chrome.mp4
Mobile Web - Safari
15298.mWeb.Safari.mp4
Desktop
15298.Desktop.mov
iOS
15298.iOS.mp4
Android
15298.Android.mp4

@mollfpr
Copy link
Contributor

mollfpr commented Feb 24, 2023

@ntdiary I see your iOS video attach that the composer keeps showing after closing the emojis modal, but it is not happening to me. Can you confirm it?

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 24, 2023

@mollfpr , oh, sorry. I didn't enable the soft keyboard when I recorded the old video, have updated it. 😅

Copy link
Contributor

@mollfpr mollfpr left a comment

Choose a reason for hiding this comment

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

Great work on this @ntdiary!

LGTM 👍

Copy link
Contributor

@cristipaval cristipaval left a comment

Choose a reason for hiding this comment

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

🚀

@cristipaval cristipaval merged commit 14927be into Expensify:main Feb 24, 2023
@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
Open Search Page TTI 613.068 ms → 671.147 ms (+58.079 ms, +9.5%) 🔴
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 613.068 ms
Stdev: 19.659 ms (3.2%)
Runs: 579.4672849997878 582.7547200000845 584.5192470001057 587.0040279999375 591.2984220003709 591.3028569999151 593.5616450002417 595.7622480001301 596.6708990000188 597.3953450000845 606.3380940002389 606.4023440000601 607.0950519996695 608.7960210000165 612.0079350001179 613.9753419999033 614.1378990001976 614.6862790002488 615.2606199998409 616.6668699998409 617.7188319996931 618.4191079996526 622.7423910000362 623.4982099998742 632.2725420002826 633.8889160002582 634.4899100000039 637.7029209998436 638.5742999999784 640.378703000024 649.0379640003666 654.3528249999508

Current
Mean: 671.147 ms
Stdev: 20.895 ms (3.1%)
Runs: 626.8452559998259 630.2528490005061 640.4656170001253 643.6245519993827 651.915933999233 655.6221519997343 656.5464269993827 656.8016769997776 661.1271159993485 661.2139080008492 662.4851890001446 668.31018100027 668.3354500001296 669.4557699998841 670.0284029999748 670.9045409997925 673.2558599999174 676.8306490005925 676.9952810006216 680.8509529996663 680.9010830000043 683.4929609997198 684.9177660001442 686.2575680008158 687.4791259998456 689.1665860004723 691.3936780001968 701.8211270002648 707.6367999995127 719.4805100001395

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 727.072 ms → 756.599 ms (+29.528 ms, +4.1%)
App start runJsBundle 199.688 ms → 206.567 ms (+6.879 ms, +3.4%)
App start nativeLaunch 19.452 ms → 19.710 ms (+0.258 ms, +1.3%)
App start regularAppStart 0.015 ms → 0.015 ms (+0.001 ms, +5.6%)
Show details
Name Duration
App start TTI Baseline
Mean: 727.072 ms
Stdev: 30.302 ms (4.2%)
Runs: 658.5881369998679 682.2465400001965 689.4127119998448 689.586765000131 694.8548369999044 695.3848149999976 700.3165959999897 700.4687439999543 701.0049700001255 701.6697439998388 703.8325149999 708.7201849999838 720.6412019999698 721.9722649999894 723.3492250000127 727.2959159999155 728.096518999897 729.6965689999051 735.6533090001903 741.8487990000285 742.8895680001006 747.722058000043 747.7259519998915 749.6990390000865 754.7977740000933 759.4807059997693 760.962923000101 762.3901740000583 764.8151830001734 769.7326460001059 774.3447980000637 777.0882560000755

Current
Mean: 756.599 ms
Stdev: 28.173 ms (3.7%)
Runs: 716.5534689999186 719.8631179998629 721.6940679997206 728.7686919998378 728.7689310000278 729.6603730004281 732.1057080002502 732.3362539997324 736.6218969998881 736.7851570001803 739.8868460003287 740.2590040001087 744.6464010002092 744.8961300002411 745.5744920000434 749.2222459996119 749.8511370001361 753.3876390000805 754.236704999581 755.3869810001925 757.7774700000882 765.6375360004604 766.830219999887 776.3316879998893 776.9280620003119 783.179612999782 791.95544399973 793.1631330000237 798.8402779996395 805.1724779997021 811.1252109999768 823.7364180004224
App start runJsBundle Baseline
Mean: 199.688 ms
Stdev: 22.848 ms (11.4%)
Runs: 167 168 169 172 173 178 183 185 187 187 187 188 188 190 191 192 192 198 198 203 205 206 206 213 217 221 230 231 232 233 246 254

Current
Mean: 206.567 ms
Stdev: 20.891 ms (10.1%)
Runs: 175 180 181 185 186 189 192 194 194 195 197 198 199 200 200 201 205 205 205 210 213 217 221 222 224 224 230 232 255 268
App start nativeLaunch Baseline
Mean: 19.452 ms
Stdev: 2.029 ms (10.4%)
Runs: 17 17 17 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 21 21 21 22 24 24 25

Current
Mean: 19.710 ms
Stdev: 1.782 ms (9.0%)
Runs: 17 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 20 20 20 20 21 21 21 22 23 23 23 24
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (7.0%)
Runs: 0.012899000197649002 0.013142999727278948 0.013143000192940235 0.01318400027230382 0.013265000190585852 0.01346899988129735 0.013509000185877085 0.013590999878942966 0.013712999876588583 0.013753000181168318 0.013875000178813934 0.013956000097095966 0.01411899970844388 0.014322999864816666 0.014566999860107899 0.014567000325769186 0.014607000164687634 0.014810999855399132 0.014851999934762716 0.014933999627828598 0.015176999848335981 0.015177000313997269 0.01525900000706315 0.015298999845981598 0.015300000086426735 0.015300000086426735 0.015381000004708767 0.015705999918282032 0.01582799991592765 0.01599099999293685 0.016439000144600868 0.01680499967187643

Current
Mean: 0.015 ms
Stdev: 0.001 ms (4.9%)
Runs: 0.013996999710798264 0.014159999787807465 0.014282000251114368 0.014363999478518963 0.014403999783098698 0.014404000248759985 0.014526999555528164 0.014606999699026346 0.014852000400424004 0.014933999627828598 0.014933999627828598 0.015015000011771917 0.015177000313997269 0.015381000004708767 0.015421000309288502 0.015421999618411064 0.015461999922990799 0.015462000854313374 0.01566499937325716 0.01570700015872717 0.01570700015872717 0.01578700076788664 0.0157880000770092 0.015951000154018402 0.01599099999293685 0.016114000231027603 0.01615400006994605 0.016154000535607338 0.016439000144600868 0.016439000144600868 0.016560999676585197 0.0167239997535944

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

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

@ntdiary
Copy link
Contributor Author

ntdiary commented Feb 24, 2023

Hi, @mollfpr @cristipaval , is there anything we need to do for this performance report?

@bondydaa
Copy link
Contributor

just to give everyone a little heads up here, this PR was reverted b/c we thought it was the root cause of the performance regression, that PR was #15495.

I created #15498 to revert the revert PR to get the code back into main for you, looks like it auto assigned Cristi and Luthfi to review again since they are straight reverts we should be fine to just merge so you can copy/paste the reviewer checklist from here into #15498 if you want.

Sorry for all the confusion.

@OSBotify
Copy link
Contributor

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

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

@OSBotify
Copy link
Contributor

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

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

@cristipaval
Copy link
Contributor

cristipaval commented Feb 28, 2023

@ntdiary the PR introduced this regression and we reverted

@mvtglobally
Copy link

I am really lost with this PR.
It seems like its was reverted and reverted back 2-3 times. What is the final stage expected and what is the latest build we need to test here?

@s77rt
Copy link
Contributor

s77rt commented Feb 28, 2023

@mvtglobally The first revert and revert the revert are not related to this regression. We though this PR caused a performance regression but apparently not.

The last revert is related to the bug here.


I'm not sure what you are testing here, but I guess you need to perform the test steps mentioned here #15559

@ntdiary

This comment was marked as outdated.

@cristipaval
Copy link
Contributor

@ntdiary Thank you for your investigation. Could you possibly post this in the issue, so that we have all technical discussions in one place, together with the proposals?

@ntdiary
Copy link
Contributor Author

ntdiary commented Mar 1, 2023

@cristipaval, sure, have done. 😄

@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.77-4 🚀

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
DeployBlockerCash This issue or pull request should block deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants