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

Detekt - Resolve/Suppress All Baseline Warnings - Long methods warnings_ MediaPickerFragment #17376

Conversation

Hoossayn
Copy link
Contributor

@Hoossayn Hoossayn commented Oct 26, 2022

Parent: #17010

This PR resolves/suppresses all complexity related LongMethod warnings for the MediaPickerFragment class (see docs here):

1 x LongMethod and 1 x ComplexMethod (Resolve: 9bbd91e + 37c9fa5 + eed436e)


To test:

  • There is nothing much to test here.

  • Verifying that all the CI checks are successful should be enough (especially the detekt check).

  • However, if you really want to be thorough, you could smoke test the WordPress and/or Jetpack apps to verify that everything works as expected on every screen that relates to these changes. Specifically, you could follow the below steps:

    • Go to the menu tab
    • click on media option
    • click on the upload media button or the (+) button at the top right corner
    • select choose from device
    • select an image

Regression Notes

  1. Potential unintended areas of impact
    can't think of any

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    See To test section above.

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@Hoossayn Hoossayn marked this pull request as ready for review October 26, 2022 16:48
@Hoossayn
Copy link
Contributor Author

👋🏾 @ParaskP7 here we go again 😎

Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @Hoossayn !

Thank you so much for this PR. One contribution a day keeps the doctor away, right, or was that for apples?! 🎉

I reviewed and tested this PR as per the description, along with triggering CI on it via a draft PR, which I just pushed on the main repo.


As promised, and per your contribution, I'll keep guiding you with additional notes so that you could demonstrate your best work. So, here goes once more:

  • PR Description Related:
    • Main
      • You wrote: This PR resolved/suppress all complexity related LongMethod warnings for the WordPress module (see docs):
      • I recommend: This PR resolves/suppresses all complexity related LongMethod warnings for the MediaPickerFragment class (see docs):
      • Did you note the differences? It is important to have a description that matches your work and that what you are writing is grammatically correct.
    • Sections
      • Adding ----- will split the sections with a horizontal line, maybe you could have utilized this markdown and split the To test: section.
    • Testing Instructions
      • Who wrote: However, if you really want to be thorough, you could smoke test the WordPress and/or Jetpack apps to verify that everything works as expected on every screen that relates to these changes.
      • I recommend: However, if you really want to be thorough, you could smoke test the WordPress and/or Jetpack apps to verify that everything works as expected on every screen that relates to these changes. Specifically, you could follow the below steps:
      • Then, you could remove the STEPS and also have the Go to the menu tab and other related instructions on a second level indentation (just like I do with my suggestions to you here).
  • Commit Related:
    • Branch Name:
      • Your naming: 17010_Detekt_Resolve_Suppress_All_Baseline_Warnings_long_method_MediaPickerFragment
      • I recommend: issue/17010-media-picker-fragment-detekt-baseline-warnings
      • Did you note the differences? For example, you will notice the issue folder level, then followed by the issue id, all words are lowercases and split with a dash (-) character instead of an underscore (_) character. FYI: This is the patter all our engineers are using, thus it would be great if you did the same, for consistency purposes.
    • I noticed that on some of your commit messages you are adding the extra space ( ) between the action and the title, but on other you don't, for example see: Refactor:Extract set up RecyclerView method for media picker fragment. I would be great if you could notice that, update the wording editing the commit message before pushing and opening the PR.

All the above are tips for next time so don't be too alarmed, that is, you don't need to be doing anything on them for this PR, you could just update the PR description if you like.

However, I have a couple of additional minor (🔍) and suggestions (💡) comments for you. Please take a look at them and let me known what you think. I'll then approve this PR straight away and merge this to trunk. 💯

@Hoossayn
Copy link
Contributor Author

👋 @Hoossayn !

Thank you so much for this PR. One contribution a day keeps the doctor away, right, or was that for apples?! 🎉

I reviewed and tested this PR as per the description, along with triggering CI on it via a draft PR, which I just pushed on the main repo.

As promised, and per your contribution, I'll keep guiding you with additional notes so that you could demonstrate your best work. So, here goes once more:

  • PR Description Related:

    • Main

      • You wrote: This PR resolved/suppress all complexity related LongMethod warnings for the WordPress module (see docs):
      • I recommend: This PR resolves/suppresses all complexity related LongMethod warnings for the MediaPickerFragment class (see docs):
      • Did you note the differences? It is important to have a description that matches your work and that what you are writing is grammatically correct.
    • Sections

      • Adding ----- will split the sections with a horizontal line, maybe you could have utilized this markdown and split the To test: section.
    • Testing Instructions

      • Who wrote: However, if you really want to be thorough, you could smoke test the WordPress and/or Jetpack apps to verify that everything works as expected on every screen that relates to these changes.
      • I recommend: However, if you really want to be thorough, you could smoke test the WordPress and/or Jetpack apps to verify that everything works as expected on every screen that relates to these changes. Specifically, you could follow the below steps:
      • Then, you could remove the STEPS and also have the Go to the menu tab and other related instructions on a second level indentation (just like I do with my suggestions to you here).
  • Commit Related:

    • Branch Name:

      • Your naming: 17010_Detekt_Resolve_Suppress_All_Baseline_Warnings_long_method_MediaPickerFragment
      • I recommend: issue/17010-media-picker-fragment-detekt-baseline-warnings
      • Did you note the differences? For example, you will notice the issue folder level, then followed by the issue id, all words are lowercases and split with a dash (-) character instead of an underscore (_) character. FYI: This is the patter all our engineers are using, thus it would be great if you did the same, for consistency purposes.
    • I noticed that on some of your commit messages you are adding the extra space ( ) between the action and the title, but on other you don't, for example see: Refactor:Extract set up RecyclerView method for media picker fragment. I would be great if you could notice that, update the wording editing the commit message before pushing and opening the PR.

All the above are tips for next time so don't be too alarmed, that is, you don't need to be doing anything on them for this PR, you could just update the PR description if you like.

However, I have a couple of additional minor (🔍) and suggestions (💡) comments for you. Please take a look at them and let me known what you think. I'll then approve this PR straight away and merge this to trunk. 💯

👋🏾 @ParaskP7, one commit a day keeps the bugs away 🥳 , followed your suggestions and made changes to the code/doc 🙌🏾

Copy link
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

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

👋 @Hoossayn !

Thank you so much for applying my suggestions! 🙇 💯 🥇

I did another review on your changes and everything looks good to me. As soon as CI goes ✅ I'll merge this to trunk.


Just a quick FYI:

  • Yours: This PR resolved/suppress all complexity related LongMethod warnings for the MediaPickerFragment class (see docs here):
  • Mine: This PR resolves/suppresses all complexity related LongMethod warnings for the MediaPickerFragment class (see docs here):
  • Find the diff! 😅

@Hoossayn
Copy link
Contributor Author

  • This PR resolves/suppresses

@ParaskP7 shame on me 😭😂

@ParaskP7 ParaskP7 merged commit 5b7484e into wordpress-mobile:trunk Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants