feat:Decompose MobileCourseViewer (943 lines) into focused sub-compon…#736
Merged
RUKAYAT-CODER merged 2 commits intoJun 29, 2026
Conversation
|
@bibi-fay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…-focused-sub-components
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR resolves two issues:
MobileCourseViewerinto focused sub-components (single responsibility, reviewable diffs, independent testability)console.*acrosssrc/at the ESLint and CI levelType of Change
Issue 1 — MobileCourseViewer decomposition
MobileCourseViewer.tsxwas 943 lines handling course metadata, lesson rendering, progress tracking, note-taking, and tab navigation in a single file. It has been split into four focused sub-components undersrc/components/mobile/course/.New files
course/CourseHeader.tsxcourse/CourseLessonList.tsxcourse/CourseProgressSummary.tsxcourse/CourseNotes.tsxcourse/index.tsChanges to existing files
MobileCourseViewer.tsx— reduced to orchestration only; down to ≤200 linesCourseNotesImplementation notes
React.memoand has adisplayNameset for React DevToolsanyIssue 2 — Structured logging enforcement
eslint.config.js'no-console': ['error', { allow: [] }]scripts/is already inignoresso build tooling is unaffectedignoresblock.github/workflows/ci.ymllintgrepwith--exclude-pathto skipsrc/utils/logger*CONTRIBUTING.mderror/warn/info/debug/component)grep -rn "console\." src/ --include='*.ts' --include='*.tsx'Testing
npm run lintpasses with zerono-consoleerrorsnpx tsc --noEmitpassesconsole.login a test branch confirms CI step exits 1 with file + line outputSecurity Considerations
No changes to data handling, authentication, or storage.
Performance Considerations
All new sub-components use
React.memoto prevent unnecessary re-renders.useMemoanduseCallbackusage is unchanged from the original.Checklist
console.*calls introduceddisplayNamesetCONTRIBUTING.mdupdatedCloses #648
Closes #649