Skip to content

Conversation

@kdeakinstructure
Copy link
Contributor

@kdeakinstructure kdeakinstructure commented Nov 7, 2025

Summary

This PR adds expand/collapse functionality to the "New conferences" and "Concluded conferences" sections on the Conferences list page. Users can now tap on section headers to expand or collapse the list of conferences in that section.

Changes

  • Model Layer: Added state tracking for expanded/collapsed sections (isNewConferencesExpanded, isConcludedConferencesExpanded)
  • Events: Added HeaderClicked event and ConferenceHeaderType enum to handle section header interactions
  • UI: Updated conference header layout to include an expand/collapse icon that rotates based on state
  • Presenter: Modified to conditionally show conference items based on expansion state
  • Update Logic: Added handler to toggle expansion state when headers are clicked

Technical Details

  • Both sections start expanded by default
  • Sections expand/collapse independently
  • Icon rotates 180° when toggling between expanded/collapsed states
  • Uses existing Mobius architecture pattern
  • Added ic_expand_more.xml drawable and a11y_expand_collapse accessibility string

Test Plan

  1. Open Student app
  2. Navigate to a course with conferences
  3. Go to Conferences page
  4. Verify both "New conferences" and "Concluded conferences" sections are initially expanded
  5. Tap on "New conferences" header - section should collapse with icon rotating
  6. Tap on "Concluded conferences" header - section should collapse independently
  7. Tap headers again to expand sections
  8. Verify accessibility features work with TalkBack enabled
  9. Test in both light and dark mode
  10. Test on tablet/landscape orientation

Screenshots

Before After
Headers were not interactive Headers are now tappable with expand/collapse icons
All conferences always visible Sections can be collapsed to hide conferences

refs: MBL-19500
affects: Student
release note: Added expand/collapse functionality to conference list sections, allowing users to hide or show "New conferences" and "Concluded conferences" groups

Checklist

  • E2E tests updated/added (if applicable)
  • Tested in dark mode
  • Tested in landscape mode and on tablet
  • Accessibility features considered (content descriptions added)
  • Product approval obtained (if needed)
  • Code follows existing patterns and conventions
  • Build succeeds without errors

🤖 Generated with Claude Code

…e groups

Add expand/collapse functionality to "New conferences" and "Concluded conferences" sections on the Conferences list page.

Changes:
- Add expand/collapse state tracking in ConferenceListModel
- Add HeaderClicked event handling
- Add expand icon to conference section headers
- Implement header click handlers to toggle section visibility
- Add icon rotation animation based on expanded state

Technical details:
- Both sections start expanded by default
- Sections expand/collapse independently
- Uses existing Mobius architecture pattern
- Added ic_expand_more drawable and a11y_expand_collapse string

refs: MBL-19500
affects: Student
release note: Added expand/collapse functionality to conference list sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Pull Request Review Summary

This PR adds collapsible/expandable sections to the conference list, allowing users to expand or collapse "New Conferences" and "Concluded Conferences" headers. Overall, the implementation follows a clean MVI architecture pattern and the functionality is well-structured.

✅ Positive Aspects

  • Clean MVI architecture with proper separation of concerns (Model, Update, Presenter, View)
  • State management is well-handled with expansion state tracked in the model
  • Good use of Kotlin data classes and sealed classes
  • Accessibility content description added for the expand/collapse icon
  • The UI changes are minimal and focused on the feature requirements

Issues Found

  • Code Style: Fully qualified package names used instead of imports in multiple files (ConferenceListAdapter.kt:33, ConferenceListView.kt:88, ConferenceListViewState.kt:30-34)
  • Theme Support: Hardcoded color #2D3B45 in ic_expand_more.xml:8 should use color resource for proper theme support
  • File Format: Missing newline at end of ic_expand_more.xml:9
  • UX Enhancement: Icon rotation could benefit from animation for smoother visual feedback (ConferenceListAdapter.kt:67)

Additional Observations

Architecture: The Mobius pattern implementation is solid, with events flowing properly through the system (HeaderClicked event → Update → Model → Presenter → View).

State Persistence: The expansion states (isNewConferencesExpanded, isConcludedConferencesExpanded) default to true, which provides a good user experience. However, consider whether these states should be persisted across app restarts for better UX continuity.

Testing Considerations:

  • Unit tests should verify the toggle behavior in ConferenceListUpdate
  • UI tests should verify the expand/collapse animation and content visibility
  • Consider testing edge cases like rapid clicking on headers

Performance: The implementation efficiently filters items in the presenter based on expansion state, avoiding unnecessary view binding for collapsed sections.

Overall, this is a well-implemented feature that just needs minor cleanup for code style consistency and theme support. Great work!

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

Unit Test Updates:
- Updated ConferenceListPresenterTest to reflect changes to ConferenceHeader data class
  - Added headerType and isExpanded parameters to existing header assertions
  - Added 3 new test cases for collapse functionality:
    * Returns only header when new conferences section is collapsed
    * Returns only header when concluded conferences section is collapsed
    * Sections can be collapsed independently
  - All 12 tests passing

- Updated ConferenceListUpdateTest to test HeaderClicked event handling
  - Added 5 new test cases for header toggle behavior:
    * HeaderClicked with NEW_CONFERENCES toggles isNewConferencesExpanded (both directions)
    * HeaderClicked with CONCLUDED_CONFERENCES toggles isConcludedConferencesExpanded (both directions)
    * HeaderClicked only toggles the targeted section
  - All 11 tests passing

Linter Improvements:
- Applied automatic import organization
- Changed icon rotation to use animate() for smooth animation (200ms duration)
- Updated header layout to use existing ic_expand drawable with textDark tint
- Added explicit import for ConferenceHeaderType where needed
@inst-danger
Copy link
Contributor

Parent Install Page

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

📊 Code Coverage Report

⚠️ Student

  • PR Coverage: 43.72%
  • Master Coverage: 43.82%
  • Delta: -0.10%

✅ Teacher

  • PR Coverage: 25.52%
  • Master Coverage: 25.52%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 22.43%
  • Master Coverage: 22.43%
  • Delta: +0.00%

📈 Overall Average

  • PR Coverage: 30.56%
  • Master Coverage: 30.59%
  • Delta: -0.03%

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Parent Install Page

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

Student Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

Copy link
Contributor

@adamNagy56 adamNagy56 left a comment

Choose a reason for hiding this comment

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

QA +1

@kdeakinstructure kdeakinstructure merged commit 70f2fd1 into master Nov 11, 2025
26 of 28 checks passed
@kdeakinstructure kdeakinstructure deleted the MBL-19500-make-conference-groups-expand-collapsable branch November 11, 2025 11:21
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.

5 participants