Skip to content

feat: course messaging improvements #141

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

Open
wants to merge 1 commit into
base: 2U/develop
Choose a base branch
from

Conversation

mta452
Copy link

@mta452 mta452 commented Apr 29, 2025

LEARNER-10505: Course messaging improvements

Description

This PR improves the user experience on the course screen by making all banners dismissible and persisting their dismissal state for 24 hours.

What's Changed

  • All banners now include a dismiss () button at the top-right corner.
  • Dismissing a banner hides it immediately.
  • Dismissed state persists for 24 hours using local storage.
  • Dismissal events are tracked.

Preview

iPhone

Banner Type Portrait - Light Portrait - Dark Landscape - Light & Dark
Reset Dates Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 46 04 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 46 08 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 46 13 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 46 21
Upgrade to Graded Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 38 44 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 38 51 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 39 13 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 39 07
Info Banner Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 41 45 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 41 51 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 41 59 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 42 03
Upgrade to Reset Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 44 01 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 44 15 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 44 20 Simulator Screenshot - iPhone 16 Pro Max - 2025-04-29 at 15 44 26

iPad

Orientation Light Theme Dark Theme
Portrait Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-04-29 at 16 52 10 Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-04-29 at 16 52 14
Landscape Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-04-29 at 16 52 23 Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-04-29 at 16 52 28

@@ -278,6 +279,10 @@ public class CourseContainerViewModel: BaseCourseViewModel {
do {
let courseDeadlineInfo = try await interactor.getCourseDeadlineInfo(courseID: courseID)
withAnimation {
self.canShowBanner = interactor.canShowBanner(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a withAnimation block inside a ViewModel is bad practice (I realize you didn't add it, but let's try to avoid it) - it can lead to UI problems and violates the principle that a ViewModel shouldn't handle UI logic, but is responsible for business logic and states

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants