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

Notifications Refresh (Phase 2) #20697

Closed
wants to merge 153 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
c6b62b7
Replace tab with a popup window
Apr 22, 2024
345a6ef
Update the tab position
Apr 23, 2024
67f372f
Update title when switch to different tab
Apr 23, 2024
7e4143e
Disable swiping for the viewpager
Apr 23, 2024
c6d3c0e
Extract dimens values
Apr 23, 2024
a1fe1f5
Update the UI of header
Apr 23, 2024
d4933db
Merge pull request #20693 from wordpress-mobile/issue/replace-the-tab…
Apr 23, 2024
8d8ee41
Extract dimens for the UI of header
Apr 23, 2024
be7c455
Merge branch 'feature/notifications_refresh_p2' into issue/Likes-Deta…
Apr 24, 2024
0cf7157
Remove useless code
Apr 24, 2024
92bd9e0
Update the UI of list item
Apr 23, 2024
e6fc53c
Update the item attrs
Apr 23, 2024
13dc9cf
Merge branch 'issue/Likes-Details-List' into issue/Likes-Details-Header
Apr 24, 2024
2156320
Handle the CTA of Share a post
Apr 23, 2024
972847d
Handle the click for the Share CTA
Apr 24, 2024
ef2723d
Extract the string of button
Apr 24, 2024
cbdf847
Fix a lint issue
Apr 24, 2024
a127468
Extract the background color for light/dark themes
Apr 24, 2024
28557c1
Merge pull request #20700 from wordpress-mobile/issue/Likes-Details-H…
jarvislin Apr 24, 2024
60b4e5a
Merge branch 'feature/notifications_refresh_p2' into issue/Likes-Deta…
Apr 24, 2024
d561f91
Extract a color
Apr 24, 2024
53819d1
Fix a unit test
Apr 24, 2024
6ec8b39
Merge branch 'trunk' into feature/notifications_refresh_p2
Apr 24, 2024
575b40c
Merge pull request #20709 from wordpress-mobile/issue/Likes-Details-S…
Apr 24, 2024
4c67a69
Refactors the BlockType to Kotlin
Apr 24, 2024
452d4a4
Refactors the NoteBlockLinkMovementMethod to Kotlin
Apr 24, 2024
d477412
Refactors NoteBlock to Kotlin
Apr 24, 2024
0c9e71b
Converts NoteBlockClickableSpan to Kotlin
Apr 24, 2024
a7f5451
Removes force unwraps
Apr 24, 2024
a8052f1
Renames notifications filter selection event for clarity
Apr 25, 2024
a372c78
Replace RelativeLayout with ConstraintLayout for better performance
Apr 25, 2024
a05cacb
Merge branch 'feature/notifications_refresh_p2' into issue/comment-re…
Apr 25, 2024
4bfd0f4
Merge pull request #20713 from wordpress-mobile/task/rename-filter-se…
jarvislin Apr 25, 2024
9fd9d9a
Fixes test code build issue
Apr 25, 2024
dffcc2e
Extract NotificationCommenDetailFragment and SiteCommentDetailFragmen…
Apr 25, 2024
1c4b4a1
Merge pull request #20711 from wordpress-mobile/task/noteblock-to-kotlin
Apr 25, 2024
12d99ca
Hides notification title for milestones
Apr 25, 2024
1243ed0
Merge branch 'trunk' into feature/notifications_refresh_p2
Apr 25, 2024
d322ffe
Refactors FooterNoteBlock to Kotlin
Apr 25, 2024
1fb78bd
Converts HeaderNoteBlock to Kotlin
Apr 25, 2024
a69e214
Moved setNote()
Apr 26, 2024
04a7d99
Moved setComment()
Apr 26, 2024
e843cab
Remove redundant functions
Apr 26, 2024
c686954
Convert NoteBlockAdapter to Kotlin
Apr 26, 2024
2f8fdb5
Merge branch 'feature/notifications_refresh_p2' into issue/comment-re…
Apr 26, 2024
f42aee6
Fix errors related to nullable variables
Apr 26, 2024
213c573
Tackle detekt issues
Apr 26, 2024
cf412b9
Convert UserNoteBlock to Kotlin
Apr 26, 2024
d6fa715
Refactor CommentUserNoteBlock to Kotlin
Apr 26, 2024
19ea81b
Merge branch 'trunk' into feature/notifications_refresh_p2
Apr 26, 2024
71c80da
Merge branch 'feature/notifications_refresh_p2' into task/noteblock-t…
Apr 26, 2024
76fcd0d
Merge branch 'task/noteblock-to-kotlin-2' into task/23-milestone-basic-1
Apr 26, 2024
49035a2
Detect achievement notification based on raw type
Apr 26, 2024
d1e527a
Adds test for the isAchievement method
Apr 26, 2024
f476a2f
Merge branch 'trunk' into feature/notifications_refresh_p2
Apr 26, 2024
ab909b2
Merge branch 'feature/notifications_refresh_p2' into task/noteblock-t…
Apr 26, 2024
b61a612
Merge branch 'task/noteblock-to-kotlin-2' into task/23-milestone-basic-1
Apr 26, 2024
2a1b240
Merge pull request #20718 from wordpress-mobile/task/noteblock-to-kot…
jarvislin Apr 29, 2024
4776618
Merge branch 'feature/notifications_refresh_p2' into issue/comment-re…
Apr 29, 2024
2fb1428
Fix lint issues
May 3, 2024
cb3cf7e
Refactor the layout file for better performance
May 3, 2024
0bcb056
Revert a commit which will be included in another PR
May 3, 2024
c901f5e
Add a header in the screen of Comment Details
May 3, 2024
7768eb8
Fix a lint issue of RelativeLayout
May 3, 2024
e3ec832
Replace titles with empty string
May 3, 2024
a275a71
Replace the black background with gray color
May 3, 2024
43a6593
Merge pull request #20762 from wordpress-mobile/issue/update-backgrou…
May 7, 2024
8548a93
Merge branch 'trunk' into feature/notifications_refresh_p2
May 7, 2024
b1e27f2
Merge branch 'feature/notifications_refresh_p2' into task/23-mileston…
May 7, 2024
9b612b3
Adds unit test for achivement type
May 8, 2024
0068323
Update the arrow icon and add an avatar
May 8, 2024
bd7e4f7
Replace the if condition with note.isCommentType()
May 8, 2024
b02ad5f
Remove the redundant comment
May 8, 2024
6999f67
Remove the redundant const
May 8, 2024
7e6d151
Merge pull request #20715 from wordpress-mobile/task/23-milestone-bas…
jarvislin May 8, 2024
fc8d810
Merge pull request #20759 from wordpress-mobile/issue/comment-refacto…
jarvislin May 8, 2024
3b6fa36
Merge branch 'feature/notifications_refresh_p2' into issue/comment-de…
May 8, 2024
112db04
Move function to subclasses
May 8, 2024
8d88bfa
Update layouts and remove some redundant logic
May 9, 2024
e05b568
Merge branch 'trunk' into feature/notifications_refresh_p2
May 10, 2024
60c6e57
Renames follows to subscribers
May 10, 2024
4609aaa
Merge pull request #20794 from wordpress-mobile/task/notifs-follow-to…
jarvislin May 10, 2024
39d6033
Merge pull request #20761 from wordpress-mobile/issue/comment-details…
jarvislin May 10, 2024
5618cdf
Ignore the replied footer on UI
May 10, 2024
d8edd7a
Merge branch 'trunk' into feature/notifications_refresh_p2
May 10, 2024
79e0915
Remove the action binding and related functions
May 10, 2024
65a6bb0
Fix lint issues
May 10, 2024
880e609
Merge branch 'feature/notifications_refresh_p2' into issue/comment-de…
May 10, 2024
348774e
Fix some UI issues related to the header
May 10, 2024
5dfac69
Add a comment
May 10, 2024
8c5d27b
Add a menu button in Comment Details
May 13, 2024
fef010a
Separate milestone notification detail implementation
May 14, 2024
b0be301
Add the popup window
May 14, 2024
c02aace
Handle the Edit comment action
May 14, 2024
8ffe0f3
Refactor the user profile bottom sheet
May 15, 2024
2dd8b4a
Refactor the codebase related to Comment Actions
May 15, 2024
912a8d4
Reset binding to null when the view is destroyed
May 15, 2024
c660322
Handle the comment action of User Info for the comment notifications
May 15, 2024
6070f47
Display user info in the screen of My Site -> Comment List -> Comment
May 16, 2024
5456a99
Fix lint issues
May 16, 2024
2ab5cf0
Rename a variable
May 16, 2024
d1bf95b
Update a comment
May 16, 2024
a752f8a
Update layout settings
May 16, 2024
381bb1d
Fix some RTL issues
May 16, 2024
dc5cbe4
Fix a test
May 16, 2024
2b82a68
Use orEmpty() to handle the empty strings
May 20, 2024
360d311
Use get() for handling a non-null variable
May 20, 2024
8fe1855
Merge branch 'trunk' into feature/notifications_refresh_p2
May 23, 2024
d04ef21
Replace mNote with note
May 24, 2024
1b18034
Use get() to handle a non-null variable
May 24, 2024
afec253
Merge pull request #20798 from wordpress-mobile/issue/comment-details…
jarvislin May 24, 2024
d1cced5
Merge branch 'trunk' into feature/notifications_refresh_p2
May 24, 2024
ada3159
Merge branch 'trunk' into feature/notifications_refresh_p2
May 27, 2024
f105265
Merge branch 'feature/notifications_refresh_p2' into task/20715-extra…
May 27, 2024
b1702b0
Remove unused code and add the layout of pending state of comment
May 28, 2024
11ba7e8
Add a bottom sheet for moderation
May 28, 2024
e5d2614
Extract strings
May 28, 2024
e5c2dd5
Handle RTL
May 28, 2024
1cdf268
Define the peekHeight to avoid our bottom sheet expanding partially
May 29, 2024
fd16904
Merge pull request #20894 from wordpress-mobile/issue/comment-details…
jarvislin May 29, 2024
e3c7f16
Merge branch 'trunk' into feature/notifications_refresh_p2
May 29, 2024
f17d3a5
Merge branch 'feature/notifications_refresh_p2' into task/20715-extra…
May 29, 2024
bc0d712
Update the moderation bottom sheet and make some extension functions …
May 29, 2024
e9fb386
Implement like/unlike a comment
May 30, 2024
9d06cc1
Handle the style and the icon for a text view
May 30, 2024
9ebfde6
Implement Approve function
May 30, 2024
b71b440
Fix lint issues
May 30, 2024
14346e8
Extracts NoteBlockTextClickListener
May 30, 2024
e60a6ab
Add tests
May 30, 2024
65d86dd
Move milestone related functionality to the MilestoneDetailFragment
May 30, 2024
cdb2796
Creates a separate NoteBlock for milestones
May 30, 2024
cd2e2ed
Removes confetti animation
May 30, 2024
e71e080
Fixes note text
May 30, 2024
50dc92f
Removes confetti animation resource
May 30, 2024
0b495ec
Adds NonNull annotation
May 31, 2024
4f00ccc
Merge pull request #20916 from wordpress-mobile/issue/comment-details…
jarvislin May 31, 2024
a86f365
Pass note_id as bundle argument
May 31, 2024
4ba97f4
Replace the deprecated onActivityCreated with onViewCreated
May 31, 2024
e52ef49
Merge branch 'trunk' into feature/notifications_refresh_p2
May 31, 2024
ffa464e
Merge branch 'feature/notifications_refresh_p2' into task/20715-extra…
May 31, 2024
b187f85
Moves note retrieval in the background
May 31, 2024
9f6e573
Merge pull request #20809 from wordpress-mobile/task/20715-extract-mi…
jarvislin May 31, 2024
5f9c0a5
Handle the share action
Jun 6, 2024
9f6b69c
Handle the click of changing status in the comment menu
Jun 6, 2024
78a2b09
Fix lint issues
Jun 6, 2024
5493500
Merge pull request #20944 from wordpress-mobile/issue/Comment-Details…
Jun 7, 2024
3f7e49f
Merge branch 'trunk' into feature/notifications_refresh_p2
Jun 7, 2024
852282b
Add the implementation of trash action
Jun 7, 2024
d537c35
Fix the flow of dispatching moderation actions
Jun 7, 2024
1735251
Handle spam action
Jun 7, 2024
d0fa51a
Make some refactors
Jun 10, 2024
34a279c
Merge pull request #20952 from wordpress-mobile/issue/Comment-Details…
Jun 11, 2024
987d1f7
Merge branch 'trunk' into feature/notifications_refresh_p2
Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class NotificationsUtilsTest {
// Check if the link is correctly set
val spans = result.getSpans(10, 14, ClickableSpan::class.java)
assertTrue(spans.size == 1)
assertEquals("https://example.com", (spans[0] as NoteBlockClickableSpan).formattableRange.url)
assertEquals("https://example.com", (spans[0] as NoteBlockClickableSpan).formattableRange?.url)
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
android:name=".ui.comments.CommentsDetailActivity"
android:theme="@style/WordPress.NoActionBar"
android:windowSoftInputMode="adjustResize"
android:label="@string/comments"/>
android:label=""/>
<activity
android:name=".ui.comments.unified.UnifiedCommentsDetailsActivity"
android:theme="@style/WordPress.NoActionBar"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:JvmName("NoteExtensions")
package org.wordpress.android.models


val Note.type
get() = NoteType.from(rawType)

fun Note.isAchievement() = AchievementType.isAchievementType(rawType)

sealed class Notification {
data class PostLike(val url: String, val title: String): Notification()
data object NewPost: Notification()
Expand Down Expand Up @@ -34,3 +37,29 @@ enum class NoteType(val rawType: String) {
fun from(rawType: String) = map[rawType] ?: Unknown
}
}

enum class AchievementType(val rawType: String) {
UserGoalMet("user_goal_met"),
AutomatticianAchievement("automattician_achievement"),
AchieveBurritoFriday("achieve_burrito_friday"),
AchieveDailyStreak("achieve_daily_streak"),
FollowedMilestoneAchievement("followed_milestone_achievement"),
LikeMilestoneAchievement("like_milestone_achievement"),
OnFireAchievement("on_fire_achievement"),
PostMilestoneAchievement("post_milestone_achievement"),
AchieveUserAnniversary("achieve_user_anniversary"),
BestFollowedDayFeat("best_followed_day_feat"),
BestLikedDayFeat("best_liked_day_feat"),
NewTrafficSurge("new_traffic_surge"),
PrivacyChange("privacy_change"),
FreeTrialStart("free_trial_start"),
FreeTrialNearEndNote("free_trial_near_end_note"),
FreeTrialEnd("free_trial_end"),
ViewMilestone(Note.NOTE_VIEW_MILESTONE),
AscProfileRegenerationStarted("asc_profile_regeneration_started"),
AscProfileRegenerationFinished("asc_profile_regeneration_finished");

companion object {
fun isAchievementType(rawType: String) = entries.any { it.rawType == rawType }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import org.wordpress.android.ui.mlp.ModalLayoutPickerFragment;
import org.wordpress.android.ui.mysite.MySiteFragment;
import org.wordpress.android.ui.notifications.DismissNotificationReceiver;
import org.wordpress.android.ui.notifications.MilestoneDetailFragment;
import org.wordpress.android.ui.notifications.NotificationsDetailActivity;
import org.wordpress.android.ui.notifications.NotificationsDetailListFragment;
import org.wordpress.android.ui.notifications.NotificationsListFragmentPage;
Expand Down Expand Up @@ -303,6 +304,8 @@ public interface AppComponent {

void inject(NotificationsDetailListFragment object);

void inject(MilestoneDetailFragment object);

void inject(ReaderSubsActivity object);

void inject(ReaderUpdateLogic object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,8 @@ public static void viewPostLikesListActivity(
Activity activity,
long siteId,
long postId,
String postTitle,
String postUrl,
HeaderData headerData,
EngagementNavigationSource source
) {
Expand All @@ -1223,6 +1225,8 @@ public static void viewPostLikesListActivity(
postId,
0L,
"",
postTitle,
postUrl,
headerData
)
);
Expand Down
Loading
Loading