Feature/chapter UI improvements reopen#354
Conversation
|
@pisum-sativum is attempting to deploy a commit to the Adarsh's projects Team on Vercel. A member of the Team first needs to authorize it. |
MRIARC-08
left a comment
There was a problem hiding this comment.
@pisum-sativum This PR is not isolated to issue #75. It contains the full quiz-attempt implementation from #194 and the renderer-key change from #353, which is already merged, alongside the chapter UI. Please recreate or rebase the branch from current main with only the chapter UI/navigation work. The chapter portion should avoid placeholder href="#" and non-functional action buttons, and the focused lint run currently reports 63 errors that must be cleaned before re-review.
97f2965 to
ec9bb05
Compare
|
@pisum-sativum I rechecked this branch. It still includes unrelated changes outside the chapter UI/navigation work, including auth, dashboard, notes, quiz, bookmark, recommendation, package, lockfile, and workspace files. Please recreate/rebase from current |
2e28573 to
aa1bcb4
Compare
aa1bcb4 to
60b4868
Compare
MRIARC-08
left a comment
There was a problem hiding this comment.
@pisum-sativum This is now properly scoped to the chapter page UI, which is good progress. It still needs a small cleanup pass before merge.
Remaining blockers:
-
Focused lint on the touched files still reports 8 Prettier errors in
src/app/ncert/[class]/[subject]/[chapter]/page.tsx. -
The TOC slug generation in
ChapterContentdoes not match the IDs generated byMarkdownViewer.MarkdownViewerremoves punctuation and collapses dashes, while the TOC currently uses a different replacement pattern, so headings with punctuation can produce broken links. -
Please reuse the same slug helper behavior as
MarkdownVieweror move it to a shared helper so the TOC links and rendered heading IDs stay in sync.After that, rerun focused lint on the two touched files.
@MRIARC-08 I have done the necessary changes and kindly check and merge. |
MRIARC-08
left a comment
There was a problem hiding this comment.
@pisum-sativum The formatting and TOC ID direction are much better now, and the local checks pass, but current main changed the NCERT chapter API contract.
Local checks:
- Focused ESLint on the touched chapter files passes with only the existing Markdown image warning.
pnpm exec tsc --noEmitpasses.pnpm testpasses: 8 files / 35 tests.
Remaining blocker: the PR still fetches the chapter with only:
/api/ncert/chapter?chapter=${params.chapter}
Current main now requires the parent class and subject context for this endpoint. Please include class/subject (or classId/subjectId) in the chapter fetch the same way the chapters fetch already does.
After that, this will still need manual UI review because it changes the chapter reading layout/navigation.
…ature/chapter-ui-improvements-reopen
@MRIARC-08 I have done the necessary changes kindly check and merge. |
Improve chapter page UI and navigation
Fixes #75
Description
This PR addresses the visual and UX improvements needed for the chapter detail page as outlined in issue #75. The
NcertChapterPageandChapterContentcomponents were refactored to provide better navigation and readability for chapter content.Changes Made
ChapterContentlayout to a responsive 2-column design (3/4 main content, 1/4 sidebar) on desktop, which collapses to a full-width layout on mobile.h1,h2, andh3headings.NcertChapterPageusingPromise.allto retrieve both the current chapter details and the parent subject's chapter list simultaneously. Included Prisma modifications inncert.repository.tsto attach related topics.Type of Change