Videos updated and Small Theme Addition With Some Bug Fixes (REOPENED)#74
Closed
Videos updated and Small Theme Addition With Some Bug Fixes (REOPENED)#74
Conversation
…n subjectVideos.js
…er of operations.
…bra videos not appearing correctly.
…s export inside subjetcVideos.js
…tency issue and fixed test imports.
thejoeyluu
approved these changes
May 6, 2026
…etCuratedVideosForTopics.
…udes: saving, saved x minutes ago, offline pending, etc.
Contributor
Author
|
A new addition was that I added a time stamp for how long ago the changes/additions were made/saved. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 15 comments.
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (2)
frontend/src/components/CreateCheatSheet.jsx:1424
aria-label="Compile PDF"overrides the button’s accessible name, so screen readers will announce “Compile PDF” even though the visible label is “GET CHEAT SHEET”. Either remove the aria-label (the visible text is sufficient) or make it match the visible label so assistive tech users get consistent wording.
required
className="input-field"
/>
</div>
<FormulaSelection
classesData={classesData}
selectedClasses={selectedClasses}
frontend/src/components/CreateCheatSheet.jsx:1423
- The new CSS includes styles for
.btn-compile.is-compiling, but the button never toggles anis-compilingclass (it only setsdisabled={isCompiling}). Consider conditionally addingis-compilingto the button’sclassNamewhenisCompilingis true, otherwise the shimmer/spin styles will never apply.
</div>
<FormulaSelection
classesData={classesData}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+5
| import { afterEach, describe, expect, it } from 'vitest'; | ||
|
|
||
| // Mock the dependencies | ||
| vi.mock('../hooks/formulas'); | ||
| vi.mock('../hooks/latex'); | ||
| vi.mock('../hooks/youtubeResources'); | ||
| vi.mock('react-pdf', () => ({ | ||
| Document: ({ children }) => <div data-testid="mock-document">{children}</div>, | ||
| Page: () => <div data-testid="mock-page" />, | ||
| pdfjs: { GlobalWorkerOptions: { workerSrc: '' } } | ||
| })); | ||
| import { SUBJECT_VIDEOS, getCuratedVideosForTopics, getYouTubeVideoId } from '../data/subjectVideos'; | ||
|
|
||
| describe('CreateCheatSheet Component', () => { | ||
| const mockUseFormulas = { | ||
| classesData: [ | ||
| { | ||
| name: 'Math 101', | ||
| categories: [ | ||
| { name: 'Algebra', formulas: [] } | ||
| ] | ||
| } | ||
| ], | ||
| selectedClasses: {}, | ||
| selectedCategories: {}, | ||
| groupedFormulas: [], | ||
| toggleClass: vi.fn(), | ||
| toggleCategory: vi.fn(), | ||
| getSelectedFormulasList: vi.fn(), | ||
| clearSelections: vi.fn(), | ||
| reorderClass: vi.fn(), | ||
| reorderFormula: vi.fn(), | ||
| removeClassFromOrder: vi.fn(), | ||
| removeSingleFormula: vi.fn(), | ||
| selectedCount: 0, | ||
| hasSelectedClasses: false | ||
| }; | ||
|
|
||
| const mockUseLatex = { | ||
| title: '', | ||
| setTitle: vi.fn(), | ||
| content: '', | ||
| contentModified: false, | ||
| contentSource: 'empty', | ||
| canRegenerateFromSelections: true, | ||
| hasLayoutChanges: false, | ||
| handleContentChange: vi.fn(), | ||
| columns: 4, | ||
| setColumns: vi.fn(), | ||
| fontSize: '9pt', | ||
| setFontSize: vi.fn(), | ||
| spacing: 'small', | ||
| setSpacing: vi.fn(), | ||
| margins: '0.15in', | ||
| setMargins: vi.fn(), | ||
| pdfBlob: null, | ||
| isGenerating: false, | ||
| isCompiling: false, | ||
| isLoading: false, | ||
| compileError: null, | ||
| canGoBack: false, | ||
| canGoForward: false, | ||
| goBack: vi.fn(), | ||
| goForward: vi.fn(), | ||
| handleGenerateSheet: vi.fn(), | ||
| handlePreview: vi.fn(), | ||
| handleCompileOnly: vi.fn(), | ||
| handleDownloadPDF: vi.fn(), | ||
| handleDownloadTex: vi.fn(), | ||
| clearLatex: vi.fn() | ||
| }; | ||
|
|
||
| beforeEach(() => { | ||
| vi.clearAllMocks(); | ||
| window.ResizeObserver = class ResizeObserver { | ||
| observe = vi.fn(); | ||
| disconnect = vi.fn(); | ||
| }; | ||
| CURATED_SUBJECT_VIDEOS['Math 101'] = []; | ||
| useFormulas.mockReturnValue(mockUseFormulas); | ||
| useLatex.mockReturnValue(mockUseLatex); | ||
| useYouTubeResources.mockReturnValue({ resources: [], isLoading: false, error: '', topicLimit: 6 }); | ||
| describe('subjectVideos helpers', () => { |
| title: "Types of Angles and Angle Relationships", | ||
| videoId: "dA94zyaLuhk", | ||
| channel: "Professor Dave Explains", | ||
| topic: "Angle Relationships" |
Comment on lines
+299
to
+305
| topic: "Functions and Graphs" | ||
| }, | ||
| { | ||
| title: "Verifying Trigonometric Identities", | ||
| videoId: "LlFbHDQVRk4", | ||
| channel: "The Organic Chemistry Tutor", | ||
| topic: "Functions and Graphs" |
Comment on lines
+354
to
+361
| channel: "The Organic Chemistry Tutor", | ||
| topic: "Derivatives" | ||
| }, | ||
| { | ||
| title: "Calculus 1 Full Course", | ||
| videoId: "5yfh5cf4-0w", | ||
| channel: "Professor Leonard", | ||
| topic: "Derivatives" |
| title: "Momentum and Impulse", | ||
| videoId: "40sww1q5_hc", | ||
| channel: "The Organic Chemistry Tutor", | ||
| topic: "Momentum and Collisions" |
| title: "Statistics Exam 1 Review", | ||
| videoId: "xxpc-HPWX28", | ||
| channel: "The Organic Chemistry Tutor", | ||
| topic: "Descriptive Stats" |
| title: "What Is Statistics: Crash Course #1", | ||
| videoId: "zouPoc49xbk", | ||
| channel: "CrashCourse", | ||
| topic: "Intro to Statistics" |
Comment on lines
+482
to
+483
| channel: "The Organic Chemistry Tutor", | ||
| topic: "Hypothesis Testing" |
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.
This PR fixes an issue where there was originally a white screen that would appear rather than the application. This was due to the missing getCuratedVideosForTopics export inside of the subjectVideos.js file. I also did fix some minor issues such as some of the videos under Pre-Algebra either not playing properly or not working at all.
A small addition I did add was a 'galaxy' theme for the user to select in the 'themes' selection.
I also did have to fix an issue where there was a naming consistency issue inside subjectVideos.test.js as well as exports the getYouTubeVideoId function to fix a testing issue.