-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Notifications Inbox Screen Implementation #113
base: 2U/develop
Are you sure you want to change the base?
Conversation
@shafqat-muneer I don't have access to the ticket and I don't know what the task is exactly. Could you briefly describe what this "implementation" is supposed to do? Just show a list of notifications, or maybe open/redirect notifications, edit/delete notifications in the list, make them read/unread, have a pool-to-refresh feature, etc. |
} | ||
.padding(.horizontal, isHorizontal ? 48 : 0) | ||
} else { | ||
// Handle empty or error screens |
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.
@shafqat-muneer Needs to implement Empty state here
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.
and error/offline too I think
} | ||
} | ||
|
||
struct SingleNotificationView: View { |
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.
@shafqat-muneer Maybe it should be a separate View file with the Preview?
var router: NotificationsRouter | ||
var errorMessage: String? { | ||
didSet { | ||
withAnimation { |
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.
We are trying to avoid to use withAnimation
inside view models. openedx#277
Please move to view. Thank you
.get | ||
case .getAllNotifications: | ||
.get |
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.
please fix indentations here
@@ -0,0 +1,73 @@ | |||
import SwiftUI |
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.
@shafqat-muneer How about move AttributedText
and parser to other Base Views in Core target? It looks like reusable.
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.
And also why didn't add this as dependency to this target? As I see it's from here https://github.com/Iaenhaall/AttributedText ?
Or you made some changes with this AttributedText
?
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.
What problems do you see compared to just using NSAttributedString(AttributedString) to parse html?
.offset(y: 10) | ||
|
||
.padding(.leading, isHorizontal ? 48 : 10) | ||
.accessibilityIdentifier("back_button") |
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.
This accessibilityIdentifier is already inside
BackNavigationButton`
} | ||
|
||
public enum NotificationGroup: String, CaseIterable { | ||
case recent = "Recent" |
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.
Shouldn't we place these in Localization?
outputFileListPaths = ( | ||
); | ||
outputPaths = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
shellPath = /bin/sh; | ||
shellScript = "\"${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/fullstory/tools/FullStoryCommandLine\" \"${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}\"\n"; | ||
shellScript = "#\"${BUILD_DIR%Build/*}/SourcePackages/artifacts/fullstory-swift-package-ios/fullstory/tools/FullStoryCommandLine\" \"${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}\"\n"; |
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.
Are these changes intentionally committed?
.padding() | ||
``` | ||
*/ | ||
public struct AttributedText: View { |
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.
Have we considered implementing it based on the built in HTML support of NSAttributedString
as a simple solution?
} | ||
|
||
/// Starts the text parsing process. The results of this method will be placed in the `formattedText` variable. | ||
internal func parse() { |
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.
Have we considered implementing this logic based on XMLParser instead of writing our own?
if totalPages > 1 { | ||
if index == flatNotifications.count - 3 { | ||
if totalPages != 1 { | ||
if nextPage <= totalPages { |
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.
This can be simplified to a single condition without nesting.
@rnr I’ve updated the ticket details. |
LEARNER-10288: Notifications Inbox Screen Implementation
Description:
We need to implement a Notifications screen in the edX mobile app. This screen will display notifications fetched from the notifications table, allowing learners to stay updated on relevant discussions and interactions.
Design cases:
Design UI for the notifications screen. Main components include:
Tasks:
Notifications Screen UI:
Acceptance Criteria:
A functional Notifications screen is implemented, displaying notifications from the notifications table in an organized list.
Screenshots:
Demo:
Simulator.Screen.Recording.-.iPhone.16.-.2025-01-09.at.13.16.16.mp4
Simulator.Screen.Recording.-.iPhone.16.-.2025-01-09.at.13.16.32.mp4
Figma:
Mobile Notifications UI Screen