feat: add landscape orientation option#79
Open
thejoeyluu wants to merge 5 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for a portrait/landscape layout option so a cheat sheet’s chosen orientation is preserved and applied during LaTeX normalization/compilation.
Changes:
- Frontend: include
orientationin save/autosave payload so it persists across reloads. - Backend: ensure
compile_latexincludesorientationin layout normalization andnormalize_onlyresponses. - LaTeX generation: update header/layout comment generation to apply
landscapevia document class + geometry options.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/components/CreateCheatSheet.jsx | Persists orientation in the save/autosave payload and minor formatting cleanup. |
| backend/api/views.py | Loads and returns orientation in compile/normalize responses and passes it into layout normalization. |
| backend/api/latex_utils.py | Applies orientation in dynamic header generation and tweaks layout comment block formatting/comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
resolves pr #75 by leaving test files untouched.
updated views.py and latex_utils.py
Added
orientationto the model and serializer so the layout choice successfully saves to dbAddressed Copilot's feedback by adding 'orientation' to REACT save payloads so setting persists when reloading a sheet