BugFix: Fixing Issue #10 - #11
Open
KritMukul wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #10 by preventing the floating Reset/Save/Peek fixed-position FAB controls from appearing in exported timetable images/PDFs on mobile during the html-to-image capture step.
Changes:
- Adds an export-mode CSS rule intended to hide the floating FAB group during export.
- Toggles the
tt-exportingclass ondocument.bodyduring capture to enable global export-only styling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/TimetablePage.css | Adds an export-mode rule to hide the floating FAB group during capture. |
| src/lib/export_timetable.js | Adds/removes tt-exporting on document.body during capture. |
Comments suppressed due to low confidence (1)
src/lib/export_timetable.js:171
- Same as above: removing the body-level class toggle avoids global state changes during export. If you keep the body class approach, it should be reference-counted to behave correctly when the PNG and PDF exports are triggered concurrently (each dropdown has its own
busystate).
activeCols.forEach((el) => el.classList.add('tt-col-active'))
node.classList.remove(EXPORTING_CLASS)
document.body.classList.remove(EXPORTING_CLASS)
node.removeAttribute('data-theme')
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1230
to
+1235
| /* Hide the fixed-position Reset/Save/Peek FAB group while capturing. | ||
| These buttons use position:fixed so they sit outside .tt-export-target | ||
| yet still appear in the rasterised snapshot on mobile. The body-level | ||
| tt-exporting class (set by export_timetable.js) lets us target them | ||
| globally without touching the component. */ | ||
| body.tt-exporting .tt-save-fab-group { display: none !important; } |
Comment on lines
121
to
124
| } | ||
| node.classList.add(EXPORTING_CLASS) | ||
| document.body.classList.add(EXPORTING_CLASS) | ||
|
|
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 change fixes the Issue #10 by temporarily hiding the reset button when exporting the timetable so that it doesn't appear in the export.