UI Updates/Important Bug Fixes/New Features #85
Conversation
…h video is being hovered by the user.
… it look cleaner.
… using their keyboard.
…s the right panel, left panel, PDF viwer, and formular reorder panels.
…x2 systems, matrix operations, and vector basics.
…I: Matrix Propertiesm Eigenvalues & Eigenvectors, Decompositions & spaces.
…ad of fixed 54px.
…p feature when you are viewing the bottom of the pdf.
…no longer implemented.
There was a problem hiding this comment.
Pull request overview
This PR bundles a set of frontend UX/accessibility improvements (keyboard shortcuts, toasts, theme additions, PDF preview enhancements, video panel UX), adds curated Linear Algebra I/II videos, and extends layout handling to include orientation in the backend compile response.
Changes:
- Frontend UI/UX: toast-based save feedback, keyboard shortcuts (Ctrl/Cmd+Enter, Ctrl/Cmd+S, Escape), improved PDF preview (page indicator + scroll-to-top), and richer empty/search states for videos.
- Styling/theme updates: new “Blossom” theme, focus-ring styles, scrollbar styling, hover/panel transitions, and thumbnail display fixes.
- Data/back-end: add curated Linear Algebra videos and ensure orientation is carried through compile normalization/layout responses.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents newly added UI features, shortcuts, themes, and new subjects. |
| frontend/src/data/subjectVideos.js | Adds curated video entries for LINEAR ALGEBRA I & II topics. |
| frontend/src/components/CreateCheatSheet.test.jsx | Adds tests for restoring orientation and keyboard shortcut behaviors. |
| frontend/src/components/CreateCheatSheet.jsx | Implements new UI behaviors: clear search, bulk select buttons, PDF preview upgrades, toast saves, keyboard shortcuts, title counter, etc. |
| frontend/src/App.jsx | Adds the Blossom theme option to the theme picker. |
| frontend/src/App.css | Defines Blossom theme variables and introduces multiple UI/UX styling improvements. |
| backend/api/views.py | Ensures orientation is included consistently in compile normalization responses (incl. CheatSheet-backed compile). |
| backend/api/latex_utils.py | Minor cleanup/comments related to orientation handling in LaTeX header generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div className="class-select-all-row"> | ||
| <button | ||
| type="button" | ||
| className="btn-select-all" | ||
| onClick={() => classesData.forEach((cls) => { | ||
| if (!selectedClasses[cls.name]) toggleClass(cls.name); | ||
| })} | ||
| > | ||
| Select All | ||
| </button> | ||
| <button | ||
| type="button" | ||
| className="btn-select-all btn-deselect-all" | ||
| onClick={() => classesData.forEach((cls) => { | ||
| if (selectedClasses[cls.name]) toggleClass(cls.name); | ||
| })} | ||
| > | ||
| Deselect All | ||
| </button> |
| useEffect(() => { | ||
| const handleKeyDown = (event) => { | ||
| const isModifierPressed = event.ctrlKey || event.metaKey; | ||
| const normalizedKey = typeof event.key === 'string' ? event.key.toLowerCase() : ''; | ||
|
|
||
| if (!isModifierPressed) { | ||
| return; | ||
| } | ||
|
|
||
| if (normalizedKey === 'enter') { | ||
| event.preventDefault(); | ||
| if (!isCompiling) handleCompileClick(); | ||
| return; | ||
| } | ||
|
|
||
| if (normalizedKey === 's') { | ||
| event.preventDefault(); | ||
| handleSave(); | ||
| } | ||
| }; |
| const handlePdfScroll = () => { | ||
| if (scrollRef.current) { | ||
| setShowScrollTop(scrollRef.current.scrollTop > 300); | ||
| } | ||
| const pages = scrollRef.current?.querySelectorAll('.pdf-page'); | ||
| if (pages?.length) { | ||
| const containerTop = scrollRef.current.getBoundingClientRect().top; | ||
| let current = 1; | ||
| pages.forEach((page, index) => { | ||
| const pageTop = page.getBoundingClientRect().top - containerTop; | ||
| if (pageTop <= 100) current = index + 1; | ||
| }); | ||
| setCurrentPage(current); | ||
| } | ||
| }; |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/9fb5733e-8ccf-45e2-b4b0-6397f6e9da1e Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/9fb5733e-8ccf-45e2-b4b0-6397f6e9da1e Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Implemented the requested thread updates in commit
Screenshot of updated UI: |
|
@copilot get cheat sheet button is not updating cheat sheet after the initial generation |
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/5c6434c6-d533-41b5-9e2e-afe60071218f Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Fixed in
Screenshot: |
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/5de7b095-feb7-44d3-a699-af4dd376fc6c Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/5de7b095-feb7-44d3-a699-af4dd376fc6c Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/5de7b095-feb7-44d3-a699-af4dd376fc6c Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/5de7b095-feb7-44d3-a699-af4dd376fc6c Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ChicoState/cheat-sheet/sessions/7be07128-1631-481a-8ab1-7763817cf0ab Co-authored-by: Davictory2003 <68972845+Davictory2003@users.noreply.github.com>


This PR adds a collection of frontend improvements focused on visual polish, accessibility, user-friendliness, and added the videos for the missing topics.
I added the following changes/adjustments:
fixed the thumbnails, they now display properly without them being cut off
Keyboard interactions: added ctrl + Enter to trigger compile, Ctrl + s to save, and Escape to close the video model
I added the pink "blossom" theme to give the user more options
Divider lines between layout option sections
replaced alert() save confirmation with a slide-in toast notification
added character counter to the title input with a limit of 80 characters
added select all/deselect all buttons above the subject class lists
added a section count for classes and a video count for the collection of YouTube videos
I added all the videos for Linear Algebra I and II
Added clear search buttons to YouTube Search results
added empty state illustration to the right panel when no sections are selected
Focus ring styles for keyboard navigation
improved muted text contrast ratios to meet the WCAG AA standards
Added a custom scrollbar styling across the panels when the theme changes
added hover transitions to the video cards
made the panel show/hide transitions smoother
improved the responsiveness for screens under 768px such as mobile devices.
New Portrait/Landscape feature added by @thejoeyluu
Fixed the 'forward' and 'back' buttons not functioning as intended
removed the 'canvas-confetti' dependency since the feature has been removed until further notice