-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 1) #22524
Merged
Merged
Changes from 27 commits
Commits
Show all changes
185 commits
Select commit
Hold shift + click to select a range
11a6fac
This is an empty commit
salimbraksa 0c5c0d4
This is an empty commit
salimbraksa 87e4f14
Add Icon to Design System module
salimbraksa 4a24fd3
Group mark all as read and settings buttons in a menu
salimbraksa e8bdff2
Add gearshape and checkmark icons to Icon Design System module
salimbraksa 35f7512
Resolve an issue where the Mark All As Read button wasn't disabled af…
salimbraksa 2ea3c54
Refactor menu items creation to UIDeferredMenuElement
salimbraksa 83799cd
Update NotificationSyncMediator.swift
salimbraksa 08a5b2e
Change vertical ellipsis to horizontal
salimbraksa c9e3981
Update localized strings key to Reverse-DNS format
salimbraksa 0307ae7
Execute mark notifications as read on the main thread
salimbraksa feaf5d9
Track event when menu button is tapped
salimbraksa 6c5e123
Group notifications screen navigation bar button items into an overfl…
salimbraksa 15d0e56
Update notifications list heading
salimbraksa c2e313b
Replace hardcoded padding values with Length type from the DesignSystem
salimbraksa b114438
Add `AvatarView`
alpavanoglu a96552a
Add `Constants` to remove magic numbers
alpavanoglu d88a9a5
Update margins for AvatarsView
alpavanoglu f095485
Update double avatar circle sizes
alpavanoglu 0b14e82
Add avatar border
alpavanoglu 8814ce6
Add `actionIcon`
alpavanoglu c60b600
Remove testing background color
alpavanoglu 1bb6c4d
Hide bottom tab bar for notification details screens
justtwago eae5302
Merge branch 'feature/notifications_refresh_p1' into task/22474-hide-…
9459828
Fix background color in dark mode
salimbraksa 5302cff
Refactor `Content` to allow multiple styles
alpavanoglu 1f05244
Add border color customization to `AvatarsView`
alpavanoglu ee9d445
Add convenience init to `AvatarsView.Style`
alpavanoglu 4c974be
Add Gravatar support to `AvatarsView`
alpavanoglu eb78535
Increase line limit on error text to 2
alpavanoglu 5b76642
[Notifications P1] Notifications Cell Content Rewrite (#22564)
alpavanoglu bb1bb3a
Implement an interface to access design system UIFonts
salimbraksa 673ea69
Merge branch 'trunk' into feature/notifications_refresh_p1
salimbraksa 050bc90
Sync with base branch and fix conflicts
salimbraksa af1effc
Fix a typo
salimbraksa 76cc973
Update notifications list heading style (#22556)
salimbraksa 382c489
Add `HostingTableViewCell`
alpavanoglu 34b8640
Update header bottom padding
alpavanoglu 2251d1b
Remove namespacing on `NotificationsTableViewCellContent`
alpavanoglu 5d699d0
Increase padding between texts
alpavanoglu 2939732
Add `allAvatarURLs` parsing
alpavanoglu 47e3072
Update cell height calculation
alpavanoglu ac5ad17
Add placeholder image for `AvatarsView`
alpavanoglu f786698
Clean up `HostingTableViewController`
alpavanoglu 2795514
Add `reuseIdentifier` constant
alpavanoglu 93a011c
Update tableview.selectionStyle
alpavanoglu 3ec738a
Group Comment related files in one folder
salimbraksa 53295d7
Refactor notification comment detail screen to support different view…
salimbraksa ec1451c
Revert allowsModeration changes
salimbraksa 6e82d1f
Remove file reference
salimbraksa 9db3f13
Remove other case from Content enum
salimbraksa 67958eb
Update a comment in updateDisplayedComment method
salimbraksa 030df9b
Use the new comment table header view
salimbraksa fe981f5
Revert allow moderation change
salimbraksa 080840b
Add test case for `allAvatarURLs`
alpavanoglu 2b1626e
Add deleted cell logic
alpavanoglu 7ff1a21
Fix redundant bottom padding for a notification details screen
justtwago 7b06774
Refactor makeNewContent to improve readaibility
salimbraksa 028df24
Resolve an edge case where the Comment Detail might be shown even tho…
salimbraksa 1e2d7b7
Add documentation for the Content enum
salimbraksa 0ee88c7
Fix triple avatar cell vertical alignment
alpavanoglu ee81dd7
Add `invalidateIntrinsicContentSize` to `HostingTableViewCell`
alpavanoglu f56215d
Resolve another edge where the comment detail could be shown instead …
salimbraksa 7aafea5
Update test json to fix test
alpavanoglu 9abb1cc
Remove force-unwrap & reduce boilerplate in if-else
alpavanoglu 49367c1
Remove redundant layout calls
alpavanoglu 8859fcf
Replace spacers with padding on `AvatarsView`
alpavanoglu c4657ca
Replace `title` as `AttributedText` to allow reply icon to appear
alpavanoglu b132b27
Add reblog notfiication type
salimbraksa 37a3215
[Notifications P1] Replace Notifications Cell Content (#22593)
salimbraksa 7448578
Improve NotificationsViewController readability
justtwago bebaf6e
Minor code tweak
salimbraksa 9ce7290
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-iOS int…
alpavanoglu a79487e
Bring user straight to reader comments s creen when notification comm…
salimbraksa dcd93af
Merge branch 'feature/notifications_refresh_p1' into task/22473-share…
salimbraksa 714daea
Fix build error
salimbraksa f79710f
Merge branch 'feature/notifications_refresh_p1' into task/22473-share…
salimbraksa 1a39232
Update notification row inline action API
salimbraksa 7f8fed9
Update notification row preview example
salimbraksa dbeed32
Use if-statement instead of guard in NotificationsViewController
204f2bb
[Notifications P1] Hide the bottom tab bar for all notification detai…
5fae05c
Dynamic notification row alignment
salimbraksa d10b6de
Fix an issue in the SizeCalculator where it wasn't not working properly
salimbraksa 65005cd
Sync with trunk and fix conflicts
salimbraksa 7ad4218
Fix build errors
salimbraksa 44986c5
Notifications row inline action groundwork (#22616)
salimbraksa 394b2f4
Update: only include users' media when parsing notification for avatars
hassaanelgarem e27be55
Update: update test data to include non-user media
hassaanelgarem 5f71ae0
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-iOS int…
alpavanoglu 5031b5d
Replace `AsyncImage` with the new `CachedAsyncImage`
alpavanoglu 5fb77c9
Fix showing non-user media as an avatar in Notifications screen (#22630)
alpavanoglu 057545d
Fix avatars horizontal padding
alpavanoglu bdbd1cf
Merge branch 'feature/notifications_refresh_p1' of github.com:wordpre…
alpavanoglu b73fa55
Limit max height
alpavanoglu e25b0a4
Refactor notification cell configuration logic
salimbraksa 3631319
Add block share icon to Design System library
salimbraksa 4d57e5a
Add star inline action for new posts and comments
salimbraksa a72788c
Improve dynamic text UI & set description line limit to 1
alpavanoglu 6651f05
Present activity controller when share action is tapped
salimbraksa 08c1e47
Track analytics event when share action is tapped
salimbraksa fd71a2c
Report error if the notification post cannot be shared
salimbraksa b590e79
[Notifications P1] Replace `AsyncImage` with `CachedAsyncImage` (#22643)
alpavanoglu 6f83df1
Merge branch 'feature/notifications_refresh_p1' of github.com:wordpre…
alpavanoglu e943d73
Add y offset to text to align with image
alpavanoglu 4081f8a
Refactor share inline action logic
salimbraksa 35f36fa
Change like button style when tapped
salimbraksa e08faee
Update inline action icon without animation
salimbraksa d010754
Move notification cell configuration logic to its own file
salimbraksa a602e19
Hide the like comment action for now
salimbraksa 9aa0ce8
Add logic to toggle notification post like state
salimbraksa b12a1b9
[Notifications P1] Improve row UI for accessibility (#22649)
alpavanoglu e766fd9
Add pragma marks
salimbraksa 838765b
Add a message when sharing a post from a notification
hassaanelgarem 6245912
Update header style as `grouped`
alpavanoglu a4e35aa
Update notification post like status locally
salimbraksa 3b4a5d7
Enable default selection style for split notification screen
justtwago f46cf21
Change selection style accordingly to the screen's horizontal size
justtwago aab45b1
Modify the notifications header paddings accordingly to designs
justtwago acb4ba8
Update post liked status remotely
salimbraksa 8bec16b
Toggle comment liked status locally
salimbraksa 5412679
[Notifications P1] Update header style so header won't float (#22680)
alpavanoglu 5f623c7
Update the comment service API to return the new liked status
salimbraksa 8e64b96
Add method to fetch post from local or remote
salimbraksa 945edf7
Update: truncate long push notifications
hassaanelgarem 9fd9c43
Update comment liked status remotely
salimbraksa e12b749
Remove comment like logic
salimbraksa a3192bc
Remove temporary variable
salimbraksa 99bbcef
Revert comment like logic
salimbraksa bfb8654
Fix compile error
salimbraksa 5ecd857
Merge branch 'feature/notifications_refresh_p1' into task/22473-share…
salimbraksa 8e3bc5e
Add notifications inline action for share an own published post (#22652)
salimbraksa 6625943
Merge branch 'feature/notifications_refresh_p1' into task/22473-share…
salimbraksa a165b9e
Sync with base branch and fix conflicts
salimbraksa 9dd1b75
Add Like Comment Inline Action
salimbraksa b89c013
Remove temporary notification variable
salimbraksa c30f4b4
Reduce tap padding on section header
alpavanoglu c0f36c2
Update background color as .systemBackground
alpavanoglu 926f6f3
Add: function in `NotificationSyncMediator` to like post
hassaanelgarem b602f9a
Update: use new function to like posts
hassaanelgarem 72cd102
Update: revert unneeded changes related to reader service
hassaanelgarem 5c4b8e9
Remove: legacy unneeded code
hassaanelgarem 1330e92
Update: add back code for inline prompts
hassaanelgarem 47ee2ec
Update: track liked or unliked property in like action event
hassaanelgarem 79b9783
Tests: fix build errors
hassaanelgarem 12106e7
Merge branch 'task/22466-like-post-inline-action' into task/22466-lik…
hassaanelgarem c9c3c3e
Update: implement comment likes
hassaanelgarem b0c5c19
Update: track liked or unliked
hassaanelgarem 9d46017
Center trailing icon vertically
alpavanoglu a345b88
Update: Introduce `LikeableNotification` and implement it for post likes
hassaanelgarem 63dd759
Update: Implement `LikeableNotification` for comment likes
hassaanelgarem ee5c2b3
Update: revert unneeded changes related to comments service
hassaanelgarem 2919ee3
Tests: fix build errors
hassaanelgarem 557f573
[Notifications] Add Like Comment Inline Action (#22691)
hassaanelgarem 73a58c0
Rename NotificationsTableHeaderView Style to HeaderPosition
justtwago f6f982f
Update: removing unneeded alignment
hassaanelgarem 8d2254a
Update: rename and add docs for parsed notifications
hassaanelgarem 830256c
Replace top and bottom padding to vertical in NotificationsTableViewC…
justtwago d5d7e52
Merge branch 'feature/notifications_refresh_p1' into fix/22672-add-mi…
5f06283
Rename `like` to `isLike`
hassaanelgarem d0e0895
[Notifications P1] Section header spacing change (#22696)
alpavanoglu 677829c
Update WordPress/Classes/Extensions/String+Truncate.swift
hassaanelgarem f999a4a
Refactor `CommentNotification` & ` NewPostNotification` to have non-n…
alpavanoglu cef6a48
Update: condense horizontal whitespace in notifications
hassaanelgarem 7011d43
Push Notifications: Properly truncate long notifications (#22687)
hassaanelgarem f0163e3
Merge branch 'feature/notifications_refresh_p1' into fix/22672-add-mi…
159b6f1
[Notifications P1] Add missing notification selection color for a spl…
9464cd0
Add feature release note
alpavanoglu f64469f
Merge branch 'feature/notifications_refresh_p1' into task/22466-like-…
hassaanelgarem d785ee6
Update padding around 3avatar view & section headers
alpavanoglu 55200cd
Revert "Refactor `CommentNotification` & ` NewPostNotification` to ha…
hassaanelgarem 1796fe8
Remove `HeaderPosition`
alpavanoglu fbf7a1d
[Notifications P1] Update spacings around 3-avatar row & section head…
alpavanoglu 8edc127
[Notifications] Add Like Post and Comment Inline Actions (#22688)
alpavanoglu 1e8f331
Unify vertical padding for a notifications header
justtwago e87bafd
Fix notifications header vertical padding (#22704)
8c44c36
Update: fix UI glitch when liking a notification
hassaanelgarem 8040665
Update: invalidate notification when it's changed from details view
hassaanelgarem 59d7de3
Update: set notification ID on reader coordinator
hassaanelgarem c75b704
Update: update comment and post like status locally after liking from…
hassaanelgarem 81810ee
Merge branch 'trunk' into feature/notifications_refresh_p1
hassaanelgarem 2c625bc
Merge branch 'feature/notifications_refresh_p1' into task/22466-like-…
hassaanelgarem a948db1
Update: Fix build error
hassaanelgarem d907064
Merge branch 'feature/notifications_refresh_p1' into task/22466-like-…
hassaanelgarem bd38f0e
Update: rename operation completion handler
hassaanelgarem f6202c5
Notifications: Fix multiple with issues with the new like inline acti…
hassaanelgarem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import UIKit | ||
import SwiftUI | ||
|
||
/// `Icon` provides a namespace for icon identifiers. | ||
/// | ||
/// The naming convention follows the SF Symbols guidelines, enhancing consistency and readability. | ||
/// Each icon name is a dot-syntax representation of the icon's hierarchy and style. | ||
/// | ||
/// For example, `ellipsis.vertical` represents a vertical ellipsis icon. | ||
public enum IconName: String, CaseIterable { | ||
case ellipsisHorizontal = "ellipsis.horizontal" | ||
case checkmark | ||
case gearshapeFill = "gearshape.fill" | ||
} | ||
|
||
// MARK: - Load Image | ||
|
||
public extension UIImage { | ||
enum DS { | ||
public static func icon(named name: IconName, with configuration: UIImage.Configuration? = nil) -> UIImage? { | ||
return UIImage(named: name.rawValue, in: .module, with: configuration) | ||
} | ||
} | ||
} | ||
|
||
public extension Image { | ||
enum DS { | ||
public static func icon(named name: IconName) -> Image { | ||
return Image(name.rawValue, bundle: .module) | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Modules/Sources/DesignSystem/Foundation/Icons.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
Modules/Sources/DesignSystem/Foundation/Icons.xcassets/checkmark.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "checkmark.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true, | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+911 Bytes
Modules/Sources/DesignSystem/Foundation/Icons.xcassets/checkmark.imageset/checkmark.pdf
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
...Sources/DesignSystem/Foundation/Icons.xcassets/ellipsis.horizontal.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "more-horizontal-mobile.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true, | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...undation/Icons.xcassets/ellipsis.horizontal.imageset/more-horizontal-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
Modules/Sources/DesignSystem/Foundation/Icons.xcassets/gearshape.fill.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "cog.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true, | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+3.58 KB
Modules/Sources/DesignSystem/Foundation/Icons.xcassets/gearshape.fill.imageset/cog.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import XCTest | ||
import DesignSystem | ||
import SwiftUI | ||
|
||
final class IconTests: XCTestCase { | ||
|
||
func testCanLoadAllIconsAsUIImage() throws { | ||
for icon in IconName.allCases { | ||
let _ = try XCTUnwrap(UIImage.DS.icon(named: icon)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...cations/Controllers/NotificationsViewController/NotificationsViewController+Strings.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Foundation | ||
|
||
extension NotificationsViewController { | ||
|
||
enum Strings { | ||
enum NavigationBar { | ||
static let notificationSettingsActionTitle = NSLocalizedString( | ||
"notificationsViewController.navigationBar.action.settings", | ||
value: "Notification Settings", | ||
comment: "Link to Notification Settings section" | ||
) | ||
static let markAllAsReadActionTitle = NSLocalizedString( | ||
"notificationsViewController.navigationBar.action.markAllAsRead", | ||
value: "Mark All As Read", | ||
comment: "Marks all notifications under the filter as read" | ||
) | ||
static let menuButtonAccessibilityLabel = NSLocalizedString( | ||
"notificationsViewController.navigationBar.menu.accessibilityLabel", | ||
value: "Navigation Bar Menu Button", | ||
comment: "Accessibility label for the navigation bar menu button" | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It might be worth reading out to the infra team and asking them to integrate SwiftGen that can generate the similar code for accessing assets automatically. It will reduce the amount of manual work and provide build-time checks for the availability of resources.
Btw, what does the
DS
mean?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.
Agreed, what do you think @mokagio?
It stands for Design System ✨
We wanted to namespace this design system so it doesn't conflict with the old one. But imo, it would be great to come up with a proper name for this Design System, instead of just
DS
.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.
@salimbraksa @kean I think integrating SwiftGet is a great idea :)