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 composer hidden while loading messages #12505

Merged
merged 16 commits into from
Dec 8, 2022

Conversation

0xmiros
Copy link
Contributor

@0xmiros 0xmiros commented Nov 7, 2022

Details

Fixed Issues

$ #11856
PROPOSAL: #11856 (comment)

Tests

  1. Login with any account on web app
  2. Open any chat
  3. Switch between chats
  4. Verify that composer view doesn't disappear
  5. Refresh the page
  6. Verify that composer view appears immediately

NOTE: On small screen devices (mobile, mWeb), it's intended behavior to freeze screen (loading skeleton without showing composer) until drawer is fully open. But after that, composer should appear along with skeleton while loading messages.

  • Verify that no errors appear in the JS console

QA Steps

  1. Login with any account on web app
  2. Open any chat
  3. Switch between chats
  4. Verify that composer view doesn't disappear
  5. Refresh the page
  6. Verify that composer view appears immediately

NOTE: On small screen devices (mobile, mWeb), it's intended behavior to freeze screen (loading skeleton without showing composer) until drawer is fully open. But after that, composer should appear along with skeleton while loading messages.

  • Verify that no errors appear in the JS console

PR Review Checklist

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 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 included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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 was added in all src/languages/* files
    • 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
  • 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 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.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

PR Reviewer Checklist

The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed

  • 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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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 was added in all src/languages/* files
    • 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 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots

Web

web.mov

Mobile Web - Chrome

mchrome.mp4

Mobile Web - Safari

msafari.mp4

Desktop

desktop.mov

iOS

ios.mp4

Android

android.mp4

@0xmiros 0xmiros requested a review from a team as a code owner November 7, 2022 11:08
@melvin-bot melvin-bot bot requested review from Beamanator and rushatgabhane and removed request for a team November 7, 2022 11:08
@Beamanator
Copy link
Contributor

@rushatgabhane do you have time to test this today?

Also @0xmiroslav can you please resolve conflicts ASAP? 🙏

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 8, 2022

can you please resolve conflicts ASAP?

fixed

@@ -301,17 +301,15 @@ class ReportScreen extends React.Component {
containerHeight={this.state.skeletonViewContainerHeight}
/>
)}
{this.isReportReadyForDisplay() && !isLoadingInitialReportActions && (
Copy link
Member

@rushatgabhane rushatgabhane Nov 8, 2022

Choose a reason for hiding this comment

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

@0xmiroslav question: should the footer wait for initialReportActions to load?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, without removing !isLoadingInitialReportActions && condition, issue still happens:

loading.mov

Copy link
Member

Choose a reason for hiding this comment

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

@0xmiroslav I meant in the current code do we need to check if initial report actions are loading?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// There are no reportActions at all to display and we are still in the process of loading the next set of actions.
const isLoadingInitialReportActions = _.isEmpty(this.props.reportActions) && this.props.report.isLoadingReportActions;

cc: @marcaaron

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please summarize whatever question you have and what you have tried so far to solve the problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

Without looking into whether it is "safe" or not - I'd assume no code is "safe" to remove unless we understand what it does and can explain why it's not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am referring to this.isReportReadyForDisplay() && !isLoadingInitialReportActions (I clearly explained in screenshot).
It's not needed because we don't want to hide composer while showing skeleton.
I think It's safe to remove this because you just refactored and added this condition based on this change and instead I added key for re-render.

Copy link
Contributor

Choose a reason for hiding this comment

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

Going off of what little has been provided I would say that forcing a re-render with a key could work, but we need to be sure that we are not showing a "composer" that is matched with the previous report. It's possible to transition from one report to another - which is why we hide/show the composer.

I would probably suggest showing some kind of placeholder composer, but you are welcome to get more feedback in the Slack channel.

@rushatgabhane @Beamanator Was this detail considered during the design/proposal stage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need to be sure that we are not showing a "composer" that is matched with the previous report

I think we can be sure because after adding key, composer is completely re-rendered whenever reportID changes. And comment for updated reportID is handled in constructor and componentDidMount already

Copy link
Contributor

Choose a reason for hiding this comment

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

There is some time before the report.reportID is correct. Review this and it will hopefully make more sense:

const reportIDFromPath = getReportID(this.props.route);
// We need to wait for the initial app data to load as it tells us which reports are unread. Waiting will allow the new marker to be set
// correctly when the report mounts. If we don't do this, the report may initialize in the "read" state and the marker won't be set at all.
const isLoadingInitialAppData = this.props.isLoadingInitialAppData;
// This is necessary so that when we are retrieving the next report data from Onyx the ReportActionsView will remount completely
const isTransitioning = this.props.report && this.props.report.reportID !== reportIDFromPath;
return reportIDFromPath && this.props.report.reportID && !isTransitioning && !isLoadingInitialAppData;

onSubmitComment={this.onSubmitComment}
/>
)}
<ReportFooter
Copy link
Member

@rushatgabhane rushatgabhane Nov 8, 2022

Choose a reason for hiding this comment

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

@0xmiroslav polish (blocking): we could add ReportFooter as a placeholder inside Freezecomponent.
This will show the footer when transitioning away from the screen for mobiles.

2Screen.Recording.2022-11-08.at.9.59.15.PM.mov

Copy link
Member

@rushatgabhane rushatgabhane Nov 8, 2022

Choose a reason for hiding this comment

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

updated this suggestion to blocking. i really think we should add ReportFooter in the placeholder for Freeze.

let me know if you have any questions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding ReportFooter to placeholder for Freeze is a good suggestion but causes another complicated issue.

<ReportActionsSkeletonView containerHeight={this.state.skeletonViewContainerHeight} />

When open Report page first time, skeletonViewContainerHeight is not calculated yet. Therefore, composer floats to the top when swipe drawer first time.

Screen.Recording.2022-11-08.at.7.53.45.PM.mov

And I think this is out of this GH scope. It tagged only Web platform along with issue title.

Copy link
Member

@rushatgabhane rushatgabhane Nov 8, 2022

Choose a reason for hiding this comment

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

@Beamanator, @0xmiroslav and I need help deciding

Should we implement the suggestion in this PR itself?

Copy link
Member

@rushatgabhane rushatgabhane Nov 8, 2022

Choose a reason for hiding this comment

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

When open Report page first time, skeletonViewContainerHeight is not calculated yet. Therefore, composer floats to the top when swipe drawer first time

That's a great catch! We could align the composer to flexEnd, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think no

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @rushatgabhane. It doesn't need to be an actual ReportFooter component? We just need to put something there to make the transition less jumpy.

Copy link
Contributor

Choose a reason for hiding this comment

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

When open Report page first time, skeletonViewContainerHeight is not calculated yet. Therefore, composer floats to the top when swipe drawer first time.

Put it in the ReportActionsSkeletonView then

Copy link
Contributor

Choose a reason for hiding this comment

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

@0xmiroslav please address these comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marcaaron you might feel I didn't respond for 2 weeks on this thread but I already tagged you when PR is ready for review here - #12505 (comment).
And you said I won't be reviewing this PR
So this can't be not responding to a comment for 2 weeks

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 9, 2022

@rushatgabhane @marcaaron @Beamanator PR is ready for review
NOTE:

  • We keep current logic of conditionally rendering ReportFooter (don't add key)
  • At the condition of not rendering ReportFooter, instead show dummy ReportFooter along with skeleton (this is after freeze gone)
  • show dummy ReportFooter in freeze view

@marcaaron
Copy link
Contributor

bumping @rushatgabhane @Beamanator on this. I won't be reviewing this PR.

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 10, 2022

bumping @rushatgabhane @Beamanator on this. I won't be reviewing this PR.

@marcaaron sorry for that. But you can just check NOTE and give feedback (👍 or 👎)

@0xmiros 0xmiros requested review from rushatgabhane and removed request for Beamanator November 11, 2022 16:37
@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 11, 2022

Not sure why Github removed @Beamanator when I re-request @rushatgabhane

@marcaaron marcaaron requested a review from Beamanator November 11, 2022 16:53
@@ -299,6 +301,7 @@ class ReportScreen extends React.Component {
{(!this.isReportReadyForDisplay() || isLoadingInitialReportActions) && (
<ReportActionsSkeletonView
containerHeight={this.state.skeletonViewContainerHeight}
shouldShowComposer
/>
Copy link
Member

@rushatgabhane rushatgabhane Nov 11, 2022

Choose a reason for hiding this comment

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

@0xmiroslav composer isn't related to ReportActionsSkeletonView.

suggestion: render the dummy composer directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rushatgabhane one more thing:
what is your suggestion for input placeholder in dummy composer?
For now, it's saying "Write something..."
But the issue is that when open new chat, it will change to "Say hello!"

Copy link
Member

Choose a reason for hiding this comment

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

Let's work on #12505 (review) before that

@@ -228,7 +228,9 @@ class ReportScreen extends React.Component {
style={screenWrapperStyle}
>
<ReportHeaderSkeletonView />
<ReportActionsSkeletonView containerHeight={this.state.skeletonViewContainerHeight} />
<View style={[styles.flex1, styles.justifyContentEnd, styles.overflowHidden]}>
<ReportActionsSkeletonView containerHeight={this.state.skeletonViewContainerHeight} shouldShowComposer />
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@rushatgabhane rushatgabhane left a comment

Choose a reason for hiding this comment

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

We keep current logic of conditionally rendering ReportFooter (don't add key)
At the condition of not rendering ReportFooter, instead show dummy ReportFooter along with skeleton (this is after freeze gone)
show dummy ReportFooter in freeze view

@0xmiroslav I don't quite agree with this approach. There are a few issues.

  1. If a chat is loading and something is typed inside the composer, the draft will disappear after the chat has loaded because it was present in the dummy composer.

  2. All loading reports have the same composer, so the draft text will also be the same across different loading reports.

Screen.Recording.2022-11-12.at.1.27.44.AM.mov

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 11, 2022

@rushatgabhane I suggest not allow all user interactions (+, emoji, send buttons, user input) in dummy composer, and blank placeholder

@rushatgabhane
Copy link
Member

@0xmiroslav I'd find that frustrating as a user. So let's not disable any user interactions

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 11, 2022

We currently have issue of loading with skeleton forever sometimes in current version. I think this is a good testcase for this issue.
Is it really needed to allow user interactions while loading?

@rushatgabhane
Copy link
Member

@0xmiroslav yes, we should for sure allow interactions.

let's discuss on slack for more eyes if you still disagree

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 11, 2022

we should for sure allow interactions.

I think we should go back to key approach, removing conditional render of ReportFooter.
And dummy composer is only for freeze view (I think this is safe because drawer open time is very short and user cannot interact for that moment)

@rushatgabhane
Copy link
Member

@0xmiroslav agree with you 👍

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 11, 2022

@rushatgabhane ready for review

@0xmiros
Copy link
Contributor Author

0xmiros commented Nov 15, 2022

@rushatgabhane 👆

Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

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

I had some style improvements but I think I will just start adding commits here to push this along.

src/pages/home/ReportScreen.js Show resolved Hide resolved
src/pages/home/report/ReportFooter.js Outdated Show resolved Hide resolved
src/pages/home/report/ReportActionCompose.js Outdated Show resolved Hide resolved
src/pages/home/ReportScreen.js Outdated Show resolved Hide resolved
@0xmiros
Copy link
Contributor Author

0xmiros commented Dec 2, 2022

@marcaaron fixed all of your feedback
@rushatgabhane ready for review

Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

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

Few comments, overall code is looking nice!

src/pages/home/report/ReportActionCompose.js Show resolved Hide resolved
src/pages/home/report/ReportActionCompose.js Show resolved Hide resolved
@marcaaron
Copy link
Contributor

@rushatgabhane what's the status of your review here? Can you please prioritize this?

marcaaron
marcaaron previously approved these changes Dec 2, 2022
Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

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

Code looks great, thanks for your patience her @0xmiroslav

@Beamanator Beamanator self-requested a review December 5, 2022 12:10
Beamanator
Beamanator previously approved these changes Dec 5, 2022
Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

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

:shipit:

@Beamanator
Copy link
Contributor

@rushatgabhane are you able to re-review on all platforms today? If not, please let me know and I will take care of it

rushatgabhane
rushatgabhane previously approved these changes Dec 5, 2022
Copy link
Member

@rushatgabhane rushatgabhane left a comment

Choose a reason for hiding this comment

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

Reviewer Checklist

@Beamanator LGTM!
Unrelated to PR - It kinda takes forever to load chats 😅

  • 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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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 was added in all src/languages/* files
    • 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 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Screen.Recording.2022-12-05.at.10.47.50.PM.mov
Mobile Web - Chrome
Screen.Recording.2022-12-06.at.12.03.14.AM.mov
Mobile Web - Safari
Screen.Recording.2022-12-06.at.12.01.42.AM.mov
Desktop
Screen.Recording.2022-12-05.at.11.57.56.PM.mov
iOS
Screen.Recording.2022-12-05.at.11.51.18.PM.mov
Android
WhatsApp.Video.2022-12-05.at.23.56.21.mp4

@0xmiros 0xmiros dismissed stale reviews from rushatgabhane, Beamanator, and marcaaron via 0fc9360 December 8, 2022 02:47
@0xmiros
Copy link
Contributor Author

0xmiros commented Dec 8, 2022

I just fixed conflicts pulling from latest main.
Approved by all reviewers, I think PR can be merged.

Copy link
Member

@rushatgabhane rushatgabhane left a comment

Choose a reason for hiding this comment

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

@Beamanator looks good.

Gave it a sanity check after merge conflicts were fixed

Screen.Recording.2022-12-08.at.8.58.19.PM.mov

@marcaaron marcaaron merged commit 8509256 into Expensify:main Dec 8, 2022
@OSBotify
Copy link
Contributor

OSBotify commented Dec 8, 2022

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

francoisl added a commit that referenced this pull request Dec 9, 2022
This reverts commit 8509256, reversing
changes made to e15337e.
@parasharrajat
Copy link
Member

There is a crash caused by this PR #13473.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.2.38-6 🚀

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

<ReportActionsSkeletonView
containerHeight={this.state.skeletonViewContainerHeight}
/>
<ReportFooter
Copy link
Contributor

Choose a reason for hiding this comment

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

While the report is loading, user interaction in composer is disabled. (Implemented by this commit) We have a feature request to enable composer even when the report is loading. So, @0xmiroslav @rushatgabhane I am trying to understand why was it disabled?

cc: @Beamanator @marcaaron

Copy link
Contributor Author

@0xmiros 0xmiros Jan 27, 2023

Choose a reason for hiding this comment

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

@sobitneupane It was disabled intentionally. And then we changed our mind. So please feel free to enable again but many things to consider. #14223 is not simple issue.
Please check details here

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we chose to keep it disabled as it was not displayed at all before. So basically, we decided to focus on just one ticket at a time rather than open a big box of problems 😄

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.

[$250] Bug: Draft message is persisted across chats
7 participants