Skip to content

feat: add landscape orientation option#79

Open
thejoeyluu wants to merge 5 commits intomainfrom
feat/landscape-option-v2
Open

feat: add landscape orientation option#79
thejoeyluu wants to merge 5 commits intomainfrom
feat/landscape-option-v2

Conversation

@thejoeyluu
Copy link
Copy Markdown
Contributor

resolves pr #75 by leaving test files untouched.
updated views.py and latex_utils.py
Added orientation to the model and serializer so the layout choice successfully saves to db
Addressed Copilot's feedback by adding 'orientation' to REACT save payloads so setting persists when reloading a sheet

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 orientation in save/autosave payload so it persists across reloads.
  • Backend: ensure compile_latex includes orientation in layout normalization and normalize_only responses.
  • LaTeX generation: update header/layout comment generation to apply landscape via 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.

Comment thread backend/api/views.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants