feat: typography controls and styling reset in the document tab#114
Merged
Conversation
Signed-off-by: Rizki Citra <rimzzlabs@proton.me>
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.
Adds line height and letter spacing controls to the Document tab, makes section spacing bidirectional to match, and adds a one-tap reset for all document styling. Every slider rests at the document's true current value and moves both ways, so tightening is as much a first-class action as loosening.
TEMPLATE_LINE_HEIGHTmap that mirrors each PDF page style. Fixing the slider's resting position also fixed a real parity gap: the preview body rendered 1.625 leading while the PDF used 1.4/1.45, so on-screen rhythm and export never quite matched. The preview body now follows the template baseline; the exported PDF is unchanged.letterSpacingandlineHeighton the document withCURRENT_SCHEMA_VERSIONbumped to 19 and a bail-safe rung (letter spacing stamped to 0, absent line height meaning template default). JSON and YAML interchange round-trips both with the same bounds.Testing: a fresh resume's preview body measures exactly the template's 1.4 baseline; tightening both typography sliders to their minimums compacts the page visibly, persists a reload, and reads back in the controls; the tightest possible PDF still extracts every word whole and in linear reading order, as does the widest. Section spacing at -24 renders headings flush with the previous section while entry gaps hold, and +60 still paginates correctly. The reset button starts disabled, enables after any change, restores every control and the preview in one click, disables again, and the reset state survives a reload. Documents saved at schema versions 16 and 18 open at their baselines with all controls at rest and no errors.