-
Notifications
You must be signed in to change notification settings - Fork 108
[MBL-19630][Student] Disable Home button when offline with Recent Activity home page #3463
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
[MBL-19630][Student] Disable Home button when offline with Recent Activity home page #3463
Conversation
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.
Review Summary
This PR adds offline support by disabling the Recent Activity home tab when the device is offline. The implementation is generally solid with good separation of concerns.
Positive Aspects
✅ Good use of dependency injection - passing isOnline through the adapter constructor
✅ Proper use of safe casting with as? for type safety
✅ Visual feedback with alpha transparency for disabled state
✅ Correctly prevents clicks by both disabling the view and removing the click listener
Issues Found
- Accessibility: The disabled state only uses visual alpha transparency. Screen reader users won't be informed that the item is unavailable offline (see inline comment on line 89)
- Code style: The click listener logic could be simplified to be more concise (see inline comment on line 90)
Additional Considerations
Testing recommendations:
- Verify behavior when
canvasContextis not aCoursetype - Test with TalkBack/screen readers enabled to ensure accessibility
- Test switching between online/offline states to ensure the UI updates correctly
- Verify that the alpha and enabled state reset properly when coming back online
Performance:
The implementation looks efficient - no concerns with the current approach.
Security:
No security concerns identified in this change.
Overall, this is a clean implementation that just needs some accessibility improvements before merging.
apps/student/src/main/java/com/instructure/student/adapter/CourseBrowserAdapter.kt
Show resolved
Hide resolved
apps/student/src/main/java/com/instructure/student/adapter/CourseBrowserAdapter.kt
Show resolved
Hide resolved
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Mon, 05 Jan 2026 11:59:42 GMT |
kdeakinstructure
left a comment
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.
QA 👍
Test plan:
refs: MBL-19630
affects: Student
release note: Fixed Home button to be disabled when offline and home page is set to Recent Activity
Checklist
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com