Remove chapter numbers from chapter titles - #1345
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
There is a verified typo in an aria-label ("Sections to readd") that should be corrected for accessibility.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR removes chapter/subchapter numbers from stored chapter/subchapter titles while still providing explicit numeric fields so the assignment builder UI can display numbering consistently without embedding it into the title text.
Changes:
- Stop prefixing chapter/subchapter titles with their numeric identifiers during course build/ingest.
- Extend readings/question payloads with explicit
chapter_num,sub_chapter_num,chapter_name, andsub_chapter_namefields. - Update the assignment builder readings UI (and tests/styles) to render labels with explicit numeric prefixes.
File summaries
| File | Description |
|---|---|
| components/rsptx/db/crud/question.py | Adds explicit chapter/subchapter number fields into the readings tree payload. |
| components/rsptx/build_tools/core.py | Removes number prefixes from stored chapter_name / sub_chapter_name values during ingest. |
| bases/rsptx/assignment_server_api/routers/instructor.py | Augments assignment question payload with chapter/subchapter names and numbers from DB joins. |
| bases/rsptx/assignment_server_api/assignment_builder/src/types/exercises.ts | Extends Exercise type with optional chapter/subchapter name/number fields. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/ReadingsListView.tsx | Updates readings list container (but introduces an aria-label typo). |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/components/ChooseReadingsButton.tsx | Formats tree node labels with explicit numeric prefixes. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/components/ChooseReadingsButton.spec.tsx | Updates tests to match numbered label rendering. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/AssignmentReadingsTable.tsx | Renders chapter/section cells using explicit numbering + improved filtering. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/AssignmentReadingsTable.spec.tsx | Updates table tests to match new display/filter behavior. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/reading/AssignmentReadingsTable.module.css | Adds styling to support the new chapter cell layout. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
|
||
| return ( | ||
| <section className={styles.card} aria-label="Sections to read"> | ||
| <section className={styles.card} aria-label="Sections to readd"> |
04c5600 to
2a0508f
Compare
There was a problem hiding this comment.
🟢 Ready to approve
The changes consistently separate numeric identifiers from stored titles and update the API/UI/tests to render numbering explicitly without introducing correctness regressions.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Halts the inclusion of chapter/subchapter numbers into their titles.
Update the assignment builder to show explicit numbers.
(student facing doAssignment page was already updated to use explicit numbers)