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

[No QA] Remove unnecessary checks for InlineErrorText #8194

Merged
merged 1 commit into from
Mar 17, 2022
Merged

[No QA] Remove unnecessary checks for InlineErrorText #8194

merged 1 commit into from
Mar 17, 2022

Conversation

rushatgabhane
Copy link
Member

@rushatgabhane rushatgabhane commented Mar 17, 2022

Details

Follow up to PR #8145 (comment).

When using InlineErrorText, we're checking if errorText is empty.
But this isn't required because InlineErrorText already handles this for us, and returns null if no error text in passed to it.

const InlineErrorText = (props) => {
if (_.isEmpty(props.children)) {
return null;
}

Fixed Issues

$ #8044 (cleanup PR)

Tests

Regression tests only.

  1. Navigate to Settings -> Any workspace -> Connect bank account -> Connect manually
  2. Enter routing number: 041215032
  3. Enter account number: 1234
  4. Click save and continue
  5. In company information page, verify that spacing has not changed.
  6. Click save and continue
  7. Verify that the errors have same spacing as before.
  • Verify that no errors appear in the JS console

PR Review Checklist

Contributor (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 (if applicable, i.e. verify an input displays the correct error message if the entered data is not correct)
    • I added steps to cover offline scenarios (if applicable, 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 & verified they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
    • I followed the JSDocs style guidelines (in STYLE.md)
  • 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)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • Has the displayName property if it’s a Functional Component
    • Has Storybook stories (optional)
    • Has Unit tests (optional)
  • If a new CSS style is added I verified that:
    • A similar style doesn’t already exist
    • The style can’t be created with a StyleUtils function
      (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

PR Reviewer Checklist

  • 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 failure scenarios (if applicable, i.e. verify an input displays the correct error message if the entered data is not correct)
    • I verified steps cover offline scenarios (if applicable, 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 verified tests pass on all platforms & I tested again on:

    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR

  • I verified proper code patterns were followed (see Reviewing the code)

    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines

  • I verified other components are not impacted by changes in this PR (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)

  • If a new component is created I verified that:

    • A similar component doesn't exist in the codebase
    • Has the displayName property if it’s a Functional Component
    • Has Storybook stories (optional)
    • Has Unit tests (optional)
  • If a new CSS style is added I verified that:

    • A similar style doesn’t already exist
    • The style can’t be created with a StyleUtils function
      (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • Verify that no errors appear in the JS console

Screenshots

Web

Screen Shot 2022-03-16 at 11 43 28 PM

Screen Shot 2022-03-16 at 11 43 39 PM

Mobile Web

Screen Shot 2022-03-16 at 11 47 41 PM

Screen Shot 2022-03-16 at 11 48 05 PM

#### Desktop

Screen Shot 2022-03-16 at 11 52 11 PM

Screen Shot 2022-03-16 at 11 52 20 PM

iOS

Screen Shot 2022-03-16 at 11 30 47 PM

Screen Shot 2022-03-16 at 11 31 09 PM

Android

Screenshot_20220317-012632
Screenshot_20220317-012635

@rushatgabhane rushatgabhane requested a review from a team as a code owner March 17, 2022 00:23
@MelvinBot MelvinBot requested review from mountiny and removed request for a team March 17, 2022 00:23
Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

Funny MelvinBot!

Thank you @rushatgabhane!

@mountiny mountiny merged commit 6bbda7e into Expensify:main Mar 17, 2022
@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.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @mountiny in version: 1.1.44-0 🚀

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.

3 participants