-
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
Comment details approve moderation redesign #20916
Comment details approve moderation redesign #20916
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/notifications_refresh_p2 #20916 +/- ##
====================================================================
+ Coverage 41.06% 41.07% +0.01%
====================================================================
Files 1514 1515 +1
Lines 69403 69437 +34
Branches 11460 11469 +9
====================================================================
+ Hits 28500 28522 +22
- Misses 38324 38332 +8
- Partials 2579 2583 +4 ☔ View full report in Codecov by Sentry. |
WordPress/src/main/java/org/wordpress/android/ui/comments/CommentDetailFragment.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
object CommentExtension { |
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.
Q: Why did you choose to define the extensions inside an object class?
I'm not suggesting a change here but I usually define extensions on at the package level on a separate file and want to understand the advantage of each approach 🙇
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.
tl;dr
It makes me feel more organized when I wrap them with a object. In fact, the difference is subtle. Both approaches can coexist and be used based on the specific requirements and context of our project.
Approach A (with object)
Pros
- Encapsulating related extension functions within a single object helps with modularity and organization.
- It is clear which module or functionality these extension functions belong to, enhancing code readability.
Cons
- You need to reference CommentExtension when using these extension functions.
- Excessive namespaces might increase code complexity and redundancy.
Approach B (without object)
Pros
- No extra namespaces, making the code simpler and reducing complexity.
- Extension functions can be placed wherever needed without worrying about their enclosing object or class, offering high flexibility.
Cons
- If there are many extension functions distributed across different files, it may become difficult to manage and maintain the code.
- Extension functions are globally visible, and having the same name in different modules might lead to naming conflicts.
WordPress/src/test/java/org/wordpress/android/ui/comments/CommentDetailViewModelTest.kt
Show resolved
Hide resolved
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.
Awesome work @jarvislin 🏅
I've tested the implementation on a Pixel 8 Pro (Android 14) in various configurations and everything worked as expected for me. The code also looks great 🎉
Approved | Pending | Options |
---|---|---|
Quality Gate passedIssues Measures |
See: https://github.com/Automattic/wordpress-mobile/issues/42
Design: yWt5gg3nWORhu079Qfv3mS-fi-1135_5126
This PR implements the redesign of Approved UI. It also refactors some codebase.
To Test:
Approve a comment
Notifications
tabNotifications
tabpending
status UIApprove comment
buttonapproved
status UIMore options
textApproved
on the bottom sheet.Like a comment
Notifications
tabRegression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
skipped
Testing Checklist (strike-out the not-applying and unnecessary ones):