-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Migrated AddCategoryFragment
to ViewBinding
#20933
Migrated AddCategoryFragment
to ViewBinding
#20933
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
5389556
to
5095884
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @neeldoshii and thanks so much for submitting this PR!
You shared a screenshot/video with steps to reproduce and test this migration, many thanks for that, but:
- Unfortunately you actually tested a different workflow, the
PrepublishingAddCategoryFragment.kt
functionality, and not theAddCategoryFragment
. - This means that you actually didn't verify that your change didn't brake anything. Which, might result in us merging this and then getting into problems.
I actually found how to test this AddCategoryFragment
myself, but, I would like you to invest some extra time into doing that yourself too. Thus, I am not going to give you the answer here. I don't do that just to make it more difficult for you. Instead, I do that to help/guide you into being able to find it yourself, not just for this specific case, but for all the contributions you will be adding to this repo going forward.
FYI: What I did to figure that out is using the debugger. I added breakpoints to classes where I thought they might trigger this workflow. And then, after some time, I found where AddCategoryFragment
is actually being used. I would like you to do the same.
As I have already explained, only with property testing, testing all edge-cases actually, will we make sure that we are not adding any regression to this screen. Thus me insisting on properly testing this before and after the change.
I hope all that makes sense and I am not overwhelming you with too much info. 🙏
Also, since we need to run this PR on CI, I need you to fix all the checks first, otherwise I am not able to push this branch and trigger our CI to run on it. In this case,
To run PS: I also suggest that you run all checks locally before pushing and opening any PR, just to make sure our CI will also succeed afterwards (see pipeline.yml). For you, the most important checks and tests command we use on CI are the following:
I hope the above will help you... 🙏 I am going to pause reviewing #20941 until we are done with this PR first, and maybe then, after you apply what you learned here on this other PR, I'll go for another round of review on it. I hope that's okay with you. 😊 |
5f0bbc3
to
b0a3bc5
Compare
Thank you @ParaskP7 for reviewing 🙏.
Thank you for spotting this mistake. Updated the steps to reproduce the dialog in the description along with the video.
Thank you providing a good learning curve to me 🚀
Thanks for this, this is how I reproduced. Created two debugger breakpoint one at the class and second when the dialog is initialized/created to know when the dialog is called. Then kept playing in the app to wait when the breakpoint gets triggered 😅. This way It ensured this is the correct place. -- Made the changes so the test passes and committed the new changes. ✅ |
4f00a06
to
380aea5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @neeldoshii !
Thank you so much for your contribution to JP/WPAndroid with this PR! 🥇
I have reviewed and tested this PR as per the instructions, along with triggering CI on it via a draft PR, which I just pushed on the main repo, everything works as expected, good job! 🌟
Thank you for spotting this mistake. Updated the steps to reproduce the dialog in the description along with the video.
Thanks for updating the steps to reproduce, much appreciated! 🥇
Thank you providing a good learning curve to me 🚀
Thank YOU! 🥇
Thanks for this, this is how I reproduced. Created two debugger breakpoint one at the class and second when the dialog is initialized/created to know when the dialog is called. Then kept playing in the app to wait when the breakpoint gets triggered 😅. This way It ensured this is the correct place.
👍
Made the changes so the test passes and committed the new changes. ✅
🚀
WordPress/src/main/java/org/wordpress/android/ui/posts/AddCategoryFragment.java
Outdated
Show resolved
Hide resolved
dbbd2d8
to
0988898
Compare
Quality Gate passedIssues Measures |
🎉 @neeldoshii , your first contribution to JP/WPAndroid is now history and will be live with the next release, thanks so much for this work! 🥇 |
Description
This pull request migrates the
AddCategoryFragment
to use ViewBinding, improving type safety and eliminating the need for findViewById calls.Fixes
findViewById
withViewBinding
#19180Screenshots/ Video
categoryadd.mp4
Steps to reproduce
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):