Skip to content

fix: improve DOCX spacing for dates and paragraphs#112

Closed
jbdevprimary wants to merge 1558 commits into
mainfrom
fix/resume-date-spacing
Closed

fix: improve DOCX spacing for dates and paragraphs#112
jbdevprimary wants to merge 1558 commits into
mainfrom
fix/resume-date-spacing

Conversation

@jbdevprimary
Copy link
Copy Markdown
Contributor

Summary

  • Replace TabStopPosition.MAX with explicit 10800 twip right tab (letter page width minus margins) for reliable date alignment
  • Increase summary paragraph spacing from 120→200 twips (~6pt→10pt)
  • Increase job summary spacing from 60→100 twips
  • Regenerated PDF and DOCX

🤖 Generated with Claude Code

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the DOCX generation script to enhance the visual presentation and readability of the generated documents. It addresses inconsistencies in date alignment and improves paragraph spacing, resulting in a more polished and professional document layout.

Highlights

  • DOCX Date Alignment: Ensured consistent right alignment for dates in DOCX by replacing the dynamic TabStopPosition.MAX with a fixed RIGHT_TAB_POSITION of 10800 twips, which accounts for letter page width and margins.
  • Summary Paragraph Spacing: Increased the spacing after general summary paragraphs from 120 to 200 twips, improving readability.
  • Job Summary Spacing: Adjusted the spacing after job summary paragraphs from 60 to 100 twips for better visual separation.
Changelog
  • scripts/generate-resume-docx.ts
    • Removed the TabStopPosition enum import as it is no longer directly used.
    • Introduced a RIGHT_TAB_POSITION constant (10800 twips) to define a precise, calculated right tab stop.
    • Increased the after spacing for general summary paragraphs from 120 to 200 twips.
    • Updated tab stop positions for experience and earlier position dates, replacing TabStopPosition.MAX with the new RIGHT_TAB_POSITION.
    • Increased the after spacing for job summary paragraphs from 60 to 100 twips.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

Warning

Rate limit exceeded

@jbdevprimary has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49ac74f8-8d18-4b2f-83dd-1f421af28382

📥 Commits

Reviewing files that changed from the base of the PR and between 181435c and 6b9b5da.

⛔ Files ignored due to path filters (3)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • public/Jon_Bogaty_Resume.docx is excluded by !**/*.docx
  • public/Jon_Bogaty_Resume.pdf is excluded by !**/*.pdf
📒 Files selected for processing (9)
  • .github/workflows/automerge.yml
  • .gitignore
  • package.json
  • scripts/generate-resume-docx.ts
  • scripts/generate-resume-pdf.ts
  • scripts/resume-html.ts
  • tests/e2e/navigation.spec.ts
  • tests/e2e/resume-visual.spec.ts
  • tests/e2e/resume.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/resume-date-spacing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

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

Review Summary

The changes in this PR correctly improve DOCX document spacing and date alignment. The code modifications are functionally sound with no blocking issues identified.

Key Changes Validated:

  • Replaced unreliable TabStopPosition.MAX with explicit RIGHT_TAB_POSITION constant (10800 twips)
  • Increased paragraph spacing for better readability (summary: 120→200 twips, job summary: 60→100 twips)
  • Properly removed unused TabStopPosition import
  • All replacements applied consistently across both usage locations

Merge Status: ✅ No blocking defects found. The implementation is correct and ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to improve spacing and alignment in the generated DOCX resume. The changes are well-intentioned, especially the introduction of a constant for the right tab stop position. However, I've found a potential issue with the calculation of this constant's value which may not produce the desired alignment. My review includes a suggestion to correct this calculation for better accuracy and maintainability.

Comment thread scripts/generate-resume-docx.ts Outdated
Comment on lines +31 to +32
// Letter page (12240 twips) minus 720 left + 720 right margins
const RIGHT_TAB_POSITION = 10800
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The calculation for RIGHT_TAB_POSITION appears to be incorrect. According to the OOXML specification, tab stop positions are measured from the left edge of the page. With a Letter page width of 12240 twips and a right margin of 720 twips, the right-aligned tab stop should be at 12240 - 720 = 11520 to align correctly with the right margin.

The current value of 10800 corresponds to the text area's width (12240 - 720 - 720), which would place the tab stop 0.5 inches before the right margin.

For improved robustness, I also suggest explicitly setting the page size to 'Letter' within the document properties. This avoids reliance on the docx library's default (which may be A4) and ensures consistent output.

// Right tab at margin: page width (12240) - margin (720), from left edge.
const RIGHT_TAB_POSITION = 12240 - 720;

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

25 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@github-actions
Copy link
Copy Markdown
Contributor

Resume PDF and DOCX have been automatically regenerated from updated source files.

@jbdevprimary
Copy link
Copy Markdown
Contributor Author

Superseded by PR #113 (Astro migration) which replaced the Vite-based resume generator with Astro + pandoc. The DOCX spacing concerns addressed here are handled by the new pipeline.

@jbdevprimary jbdevprimary deleted the fix/resume-date-spacing branch April 15, 2026 19:34
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