Repository navigation
fix: cover letters show the date, the employer and the role - #20
Merged
Merged
Conversation
The letter builder passed the date, company, location and job title, but the template never showed them. Under the candidate's contact block the letter now has the date, the employer and its location, and a bold "Re: <role>" line before the salutation; the fpdf2 fallback carries the same lines (and no longer prints the name twice). The letter editor gains Date, Role, Company and Company location fields. The extra lines pushed a 380-word letter (the top of the prompt's range) onto a second page, so letters get the CV's measured fit, layout only: tighter spacing, then 10pt type; paragraphs are never trimmed. The employer's location no longer falls back to the candidate's country when the job has none.
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.
Summary
The cover-letter builder passed the date, company, company location and job title to the template, but the template never showed them.
Letter
If none of these are set, the block is left out.
DocEditor.tsx) gains Date, Role (Re: line), Company and Company location fields, andLetterDocgainscompany_location.Page fit
The new lines pushed a 380-word letter, the top of the prompt's 300–380 range, onto a second page. Letters now get the CV's measured fit from #19, layout only: tighter spacing, then 10pt type (
_LETTER_FIT_STEPS). Paragraphs are never trimmed._fitted_cv_htmlbecomes_fitted_html, which handles both document types.Fix
When the job had no location, the employer's location fell back to the candidate's country. Now that the location is printed, that would be wrong, so it's left blank and can be filled in from the editor.
Testing
The full-length letter test now includes the block and fits on one page.