[MBL-19529][S] Learner Dashboard - Widget Settings Save#3931
Merged
[MBL-19529][S] Learner Dashboard - Widget Settings Save#3931
Conversation
# Conflicts: # Student/Student/LearnerDashboard/Widgets/Common/Model/DashboardWidgetConfig.swift # Student/Student/LearnerDashboard/Widgets/Common/Model/DashboardWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/ConferencesWidget/ViewModel/ConferencesWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/CourseInvitationsWidget/ViewModel/CourseInvitationsWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/CoursesAndGroupsWidget/ViewModel/CoursesAndGroupsWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/FileUploadProgressWidget/ViewModel/FileUploadProgressWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/GlobalAnnouncementsWidget/ViewModel/GlobalAnnouncementsWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/HelloWidget/ViewModel/HelloWidgetViewModel.swift # Student/Student/LearnerDashboard/Widgets/OfflineSyncProgressWidget/ViewModel/OfflineSyncProgressWidgetViewModel.swift # Student/StudentUnitTests/LearnerDashboard/Container/Model/LearnerDashboardInteractorTests.swift # Student/StudentUnitTests/LearnerDashboard/Container/ViewModel/LearnerDashboardViewModelTests.swift
…//github.com/instructure/canvas-ios into feature/MBL-19529-Dashboard-simple-edit-mode # Conflicts: # Student/StudentUnitTests/LearnerDashboard/Container/ViewModel/LearnerDashboardViewModelTests.swift
refs: builds: affects: release note: test plan:
…, always visible) and EditableWidgetIdentifier (user-configurable) - Interactor now loads system widgets always, and editable widgets from merged saved+default configs filtered by visibility/order - Settings changes now save immediately to SessionDefaults and trigger a dashboard reload via onConfigsChanged callback - Widget assembly split into separate makeSystemWidgetViewModel / makeEditableWidgetViewModel factories
refs: MBL-19529 builds: Student affects: Student release note: none test plan: - Test widget settings.
Contributor
BuildsCommit: Fix lint violation. (882f35a) |
…ure/MBL-19529-Learner-Dashboard-settings-save # Conflicts: # Student/Student/LearnerDashboard/Container/ViewModel/LearnerDashboardViewModel.swift # Student/Student/LearnerDashboard/Settings/LearnerDashboardSettingsAssembly.swift # Student/Student/LearnerDashboard/Settings/View/LearnerDashboardCourseSettingsView.swift # Student/Student/LearnerDashboard/Settings/ViewModel/LearnerDashboardCourseSettingsViewModel.swift # Student/StudentUnitTests/LearnerDashboard/Container/ViewModel/LearnerDashboardViewModelTests.swift
...nt/LearnerDashboard/Settings/ViewModel/LearnerDashboardSettingsWidgetsSectionViewModel.swift
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # Core/Core/Common/CommonUI/InstUI/Styles/Elevation.swift
…ure/MBL-19529-Learner-Dashboard-settings-save # Conflicts: # Student/Student/LearnerDashboard/Widgets/DashboardWidgetIdentifier.swift # Student/Student/LearnerDashboard/Widgets/LearnerDashboardWidgetAssembly.swift # Student/StudentUnitTests/LearnerDashboard/Container/Model/LearnerDashboardInteractorTests.swift
This comment was marked as outdated.
This comment was marked as outdated.
7 tasks
Base automatically changed from
feature/MBL-19529-Dashboard-simple-edit-mode
to
master
March 12, 2026 16:15
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
rh12
reviewed
Mar 13, 2026
Core/Core/Features/Dashboard/CourseCardList/Model/CourseColorsInteractor.swift
Outdated
Show resolved
Hide resolved
Student/Student/LearnerDashboard/Settings/View/LearnerDashboardSettingsScreen.swift
Outdated
Show resolved
Hide resolved
Student/Student/LearnerDashboard/Settings/View/LearnerDashboardSettingsScreen.swift
Outdated
Show resolved
Hide resolved
Student/Student/LearnerDashboard/Settings/View/LearnerDashboardSettingsScreen.swift
Outdated
Show resolved
Hide resolved
Student/Student/LearnerDashboard/Settings/View/LearnerDashboardSettingsScreen.swift
Outdated
Show resolved
Hide resolved
...earnerDashboard/Widgets/CoursesAndGroupsWidget/View/CoursesAndGroupsWidgetSettingsView.swift
Show resolved
Hide resolved
...ntUnitTests/LearnerDashboard/Settings/ViewModel/LearnerDashboardSettingsViewModelTests.swift
Outdated
Show resolved
Hide resolved
Contributor
|
I had some additional findings
I don't mind (actually, would prefer) these to be added in a followup PR though |
This comment was marked as outdated.
This comment was marked as outdated.
rh12
approved these changes
Mar 13, 2026
Contributor
There was a problem hiding this comment.
QA + 1
For the followup ticket:
- Color selector: white checkmark not visible in Dark Mode "black" circle
- VoiceOver: Disabled up/down arrow is available (both in end-state and in hidden widget state), and the user never knows that it does nothing. Maybe this could be improved somehow.
- We could disable the subsetting toggles when the widget itself is hidden. IMHO it would be less confusing to not have active controls in the hidden section.
Contributor
Affected Apps: StudentBuilds: Student
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's new?
Implements persistent saving of widget settings in the Learner Dashboard, so user configurations (visibility, order, colors, course settings) survive app restarts.
Widget Architecture Changes
Split DashboardWidgetIdentifier into Two Enums
SystemWidgetIdentifier- fixed, always-visible widgets (offlineSyncProgress, fileUploadProgress, courseInvitations, globalAnnouncements, conferences).EditableWidgetIdentifier- user-configurable widgets (helloWidget, coursesAndGroups). These can be hidden, reordered, and have persisted settings.Factory Methods Moved Onto Identifier Enums
LearnerDashboardWidgetAssembly:SystemWidgetIdentifier.makeViewModelEditableWidgetIdentifier.makeViewModelEditableWidgetIdentifier.makeSubSettingsView- returns an optional settings view per widget (only coursesAndGroups has one)LearnerDashboardWidgetAssemblyis now just a thread-safe singleton cache forCoursesInteractor.Interactor Now Drives Two Separate Widget Pipelines
LearnerDashboardInteractorLiveaccepts two factory closures at init time:systemWidgetFactoryandeditableWidgetFactoryto create view models.Settings Changes Save Immediately and Trigger Reload
SessionDefaultsand fires a callback, which causesLearnerDashboardViewModelto callloadWidgets()again.Color Management
A new
LearnerDashboardColorInteractorowns all dashboard color logic:CurrentValueSubject<Color, Never>for reactive color updates.SessionDefaults+DashboardColor.LearnerDashboardViewModelsubscribes to color changes via .onReceive.refs: MBL-19529
builds: Student
affects: Student
release note: none
test plan:
Screenshots
ScreenRecording_03-11-2026.12-45-27_1.mov
Checklist