Add attendance stub pages and initial route wiring
Overview
Create stub AttendanceHistoryPage, AttendanceNewPage, and AttendanceEditPage components and wire them to their routes in attendanceRoutes.js. Also connects the "Mark attendance" and "View history" links in AttendanceBlock (#14235) to their respective routes. Stubs only need to render enough to confirm navigation works — full page implementations follow in subsequent issues.
Complexity: Low
Target branch: release-v0.19.x
Context
Before individual pages can be built and tested, the routing skeleton needs to exist. This issue establishes the navigation structure for the attendance feature — stub pages act as placeholders so routes are reachable from AttendanceBlock immediately, and each subsequent page issue can be verified end-to-end as it lands.
The Change
Stub components — minimal placeholder pages, each rendering only a page title:
AttendanceHistoryPage.vue(kolibri/plugins/coach/frontend/views/attendance/AttendanceHistoryPage.vue)AttendanceNewPage.vue(kolibri/plugins/coach/frontend/views/attendance/AttendanceNewPage.vue)AttendanceEditPage.vue(kolibri/plugins/coach/frontend/views/attendance/AttendanceEditPage.vue)
attendanceRoutes.js (kolibri/plugins/coach/frontend/routes/attendanceRoutes.js):
CLASS/attendance/new→AttendanceNewPageCLASS/attendance/history→AttendanceHistoryPageCLASS/attendance/:attendanceId→AttendanceEditPage- Each route dispatches
initClassInfoon enter
Route integration (kolibri/plugins/coach/frontend/routes/index.js):
attendanceRoutesimported and spread into the main route array
app.js (kolibri/plugins/coach/frontend/app.js):
ATTENDANCE_NEW,ATTENDANCE_HISTORY, andATTENDANCE_EDITadded toskipLoadingso the loading spinner is not shown on navigation between attendance pages
AttendanceBlock link wiring — connects "Mark attendance" and "View history" to their respective routes now that they exist
Out of Scope
- Full implementation of any attendance page (separate issues)
Acceptance Criteria
General
- [ ]
AttendanceHistoryPage,AttendanceNewPage, andAttendanceEditPagestub components exist underkolibri/plugins/coach/frontend/views/attendance/ - [ ]
attendanceRoutes.jsregisters all three routes with correct paths andinitClassInfohandlers - [ ]
ATTENDANCE_NEW,ATTENDANCE_HISTORY, andATTENDANCE_EDITpage name constants are defined - [ ]
attendanceRoutesis imported and spread into the main route array inroutes/index.js - [ ]
ATTENDANCE_NEW,ATTENDANCE_HISTORY, andATTENDANCE_EDITare added to theskipLoadingarray inapp.js - [ ] "Mark attendance" and "View history" links in
AttendanceBlocknavigate to their respective routes
Testing
- [ ] Navigating to each route renders the correct stub component
References
- Issue #14235 —
AttendanceBlock(links wired in this issue) lessonsRoutes.js— example of existing coach route patterns
🤖 This issue was written with AI assistance, under supervision, review and final edits by [@akolson] 🤖
Hi! 👋
Thanks so much for your interest! This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.
We really appreciate your willingness to help. 😊
Are you preparing for Google Summer of Code? See our GSoC guidelines.
Hi @hk2166! Thank you for reaching out. Unless directly related to the issue you have been assigned, please be sure to use Learning Equality's developer community (or gsoc) channel(s) to seek help. We look forward to supporting you there. Thank you!
I think we may also need to import the attendance routes and spread into the main route array in app.js, and the page names need to be added to skipLoading? Just to complete the integration.
Implementation Plan Summary — Issue #14236
Stakeholder Feedback Acknowledged
- @learning-equality-bot / @akolson: Noted — this work is being done by an assigned contributor, not an external volunteer.
- @rtibbles: Great catch — the plan includes both importing attendance routes into the main route array in
routes/index.jsand adding page names toskipLoading+ theinitClassInfoskip list inapp.js. Both are covered as explicit tasks.
Plan Overview
7 tasks, all frontend-only, targeting the release-v0.19.x branch:
| Task | Description | Files |
|---|---|---|
| 1 | Add ATTENDANCE_EDIT constant |
constants/index.js |
| 2 | Create 3 stub page components (AttendanceNewPage, AttendanceHistoryPage, AttendanceEditPage) |
views/attendance/*.vue |
| 3 | Create attendanceRoutes.js with 3 routes (each dispatches initClassInfo) |
routes/attendanceRoutes.js |
| 4 | Import + spread attendance routes into routes/index.js |
routes/index.js |
| 5 | Add attendance pages to skipLoading array and initClassInfo skip list in app.js |
app.js |
| 6 | Write Jest tests verifying stub components render | views/attendance/__tests__/AttendancePages.spec.js |
| 7 | Verify existing AttendanceBlock tests + full coach test suite pass | (no changes) |
Key Design Decisions
- Route ordering:
ATTENDANCE_NEWandATTENDANCE_HISTORYare listed beforeATTENDANCE_EDIT(:attendanceIdparam) to preventnew/historybeing matched as attendance IDs. AttendanceBlocklinks: Already point toATTENDANCE_NEWandATTENDANCE_HISTORY— they'll work once the routes exist. No changes toAttendanceBlockneeded.- Stub components: Use Composition API
setup()withcreateTranslatorfor i18n-ready headings.
Full plan: PLAN/index.md in the working branch.
Phase Complete: Attendance Route Stubs
Stakeholder Feedback Acknowledged
- @rtibbles: Attendance routes are now imported and spread into the main route array in
routes/index.js, and all three page names (ATTENDANCE_NEW,ATTENDANCE_HISTORY,ATTENDANCE_EDIT) are added to bothskipLoadingand theinitClassInfoskip list inapp.js. - @learning-equality-bot / @akolson: Noted — these comments are directed at external contributors, not this assigned work.
Changes Made (8 files, 1 commit)
| File | Change |
|---|---|
constants/index.js |
Added ATTENDANCE_EDIT constant |
views/attendance/AttendanceNewPage.vue |
Stub page component |
views/attendance/AttendanceHistoryPage.vue |
Stub page component |
views/attendance/AttendanceEditPage.vue |
Stub page component |
routes/attendanceRoutes.js |
Route definitions (3 routes with initClassInfo handler) |
routes/index.js |
Import + spread attendance routes |
app.js |
Added to skipLoading and initClassInfo skip list |
views/attendance/__tests__/AttendancePages.spec.js |
Tests for stub components |
Test Results
- New tests: 3/3 pass (AttendancePages.spec.js)
- Existing tests: 8/8 AttendanceBlock tests pass
- Full coach suite: 235/235 tests pass (20/20 suites)
- Lint: All checks pass
Self-Review Complete — Phase 4
Summary
Reviewed git diff release-v0.19.x...HEAD (8 files, 165 additions) against issue requirements.
Acceptance Criteria: All Met
- ✅ Three stub components (
AttendanceNewPage,AttendanceHistoryPage,AttendanceEditPage) underviews/attendance/ - ✅
attendanceRoutes.jswith correct paths andinitClassInfohandlers - ✅ All three page name constants defined (
ATTENDANCE_EDITadded;NEW/HISTORYfrom #14235) - ✅ Routes imported and spread into
routes/index.js - ✅
skipLoadingentries inapp.js - ✅ AttendanceBlock links wired (from #14235, already on release branch)
- ✅ Tests pass (3/3)
Stakeholder Feedback
- @rtibbles: Routes are imported into
routes/index.jsand page names are added toskipLoadinginapp.js— both items are implemented as requested. - @learning-equality-bot, @akolson: Community management comments acknowledged — no code changes needed.
Review Findings
No blocking or suggestion-level issues found. One nitpick: defaultHandler doesn't return the notLoading dispatch promise, but this matches existing patterns in other coach route files.
Route ordering is correct (static paths before parameterized), stubs use Composition API + createTranslator per conventions.
Implementation update for PR #14362:
Stakeholder feedback acknowledgment:
-
@rtibbles: Your feedback about importing attendance routes into the main route array in
routes/index.jsand adding page names toskipLoadinginapp.jshas been addressed. Both integrations are included in the PR —attendanceRoutesis spread into the main routes array (index.js:42), and all three page names (ATTENDANCE_NEW,ATTENDANCE_HISTORY,ATTENDANCE_EDIT) are in theskipLoadinglist (app.js:95-97). -
@learning-equality-bot and @akolson: Noted the contribution guidelines. This work is being done as part of the assigned development effort for this issue.
All acceptance criteria from the issue are met. CI is passing.
Fixed in #14362