Skip to content

fix(cv): align certification org column width across rows#931

Merged
santifer merged 4 commits into
santifer:mainfrom
mskadu:fix/cert-column-alignment
Jun 11, 2026
Merged

fix(cv): align certification org column width across rows#931
santifer merged 4 commits into
santifer:mainfrom
mskadu:fix/cert-column-alignment

Conversation

@mskadu

@mskadu mskadu commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #930.

Each .cert-item was an independent CSS grid (minmax(0,1fr) | minmax(90px,max-content) | 44px). Long org names like "McKinsey & Company" stretched their row's second column, squeezing the title column differently per row.

Switched to a table-row layout: display: table-row on each item with display: table-cell on its children. Table semantics naturally share column widths across all rows, so the title column stays consistent.

Changes

templates/cv-template.html — replaced per-row grid with table-row layout.

Testing

Visual check only — this is a CSS change in a template rendered by Playwright during PDF generation. The HTML structure (.cert-item > .cert-title + .cert-org + .cert-year) is unchanged.

Summary by CodeRabbit

  • Style
    • Redesigned the certifications section in the CV template to a table-like layout for improved alignment and spacing.
    • Ensures consistent column sizing with a fixed-width, right-aligned year column for predictable presentation.
    • Adds right-to-left rendering support so certification layout displays correctly in RTL contexts.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a60d0290-677d-44ef-8575-f1dffe46229c

📥 Commits

Reviewing files that changed from the base of the PR and between acf53c7 and b4ba721.

📒 Files selected for processing (1)
  • templates/cv-template.html

📝 Walkthrough

Walkthrough

Updates CV template: certifications rows changed from a per-row grid to table-row/table-cell layout inside a new .cert-table wrapper; cells are baseline-aligned, .cert-year is fixed at 44px, and RTL rendering sets direction: rtl on .cert-table.

Changes

Certifications Layout Alignment

Layer / File(s) Summary
CSS and template wiring for certifications
templates/cv-template.html
Replaced .cert-item grid styling with display: table-row and made direct children display: table-cell with vertical-align: baseline and bottom padding; added .cert-table wrapper and RTL direction: rtl; set .cert-year width: 44px; wrapped {{CERTIFICATIONS}} in <div class="cert-table">.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • santifer/career-ops#638: Prior change that converted certifications layout to a per-row grid with minmax sizing; this PR replaces that per-row grid with a table-row/table-cell approach.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: converting independent per-row grid layouts to a shared table layout that aligns certification column widths across all rows.
Linked Issues check ✅ Passed The PR fully addresses issue #930 by replacing per-row independent grid sizing with table-based semantics, ensuring consistent column widths across all certification rows.
Out of Scope Changes check ✅ Passed All changes are scoped to the certification layout refactoring in templates/cv-template.html with no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
templates/cv-template.html (1)

306-306: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Remove redundant width: auto declaration.

The width: auto is the default value for display: table-cell elements, making this declaration unnecessary.

♻️ Simplify by removing redundant property
 .cert-org {
   color: hsl(270, 70%, 45%);
   white-space: nowrap;
-  width: auto;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/cv-template.html` at line 306, Remove the redundant CSS declaration
"width: auto" from the rule where it is applied (the selector that sets display:
table-cell); since display: table-cell defaults to width: auto, simply delete
the width: auto line to simplify the stylesheet and avoid unnecessary clutter.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@templates/cv-template.html`:
- Around line 387-389: The RTL CSS only changes .cert-year text alignment but
not the visual column order; update the RTL rules (targeting html[lang="ar"] and
the certificate row/container selectors such as .cert-row or .cert-table and the
cell selectors .cert-year, .cert-org, .cert-title) to reverse the visual order —
e.g., set the container to use flexbox/grid row-reverse (or apply explicit order
values: .cert-year {order:0}, .cert-org {order:1}, .cert-title {order:2}
switched to row-reverse so visual becomes year→org→title) and keep text
alignment adjusted for RTL; this preserves HTML structure while reversing the
column order in Arabic mode.

---

Outside diff comments:
In `@templates/cv-template.html`:
- Line 306: Remove the redundant CSS declaration "width: auto" from the rule
where it is applied (the selector that sets display: table-cell); since display:
table-cell defaults to width: auto, simply delete the width: auto line to
simplify the stylesheet and avoid unnecessary clutter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 43177297-c683-41ec-aa69-9a1375195bc7

📥 Commits

Reviewing files that changed from the base of the PR and between 23954b3 and acf53c7.

📒 Files selected for processing (1)
  • templates/cv-template.html

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
templates/cv-template.html (1)

306-306: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Remove redundant width: auto declaration.

The width: auto is the default value for display: table-cell elements, making this declaration unnecessary.

♻️ Simplify by removing redundant property
 .cert-org {
   color: hsl(270, 70%, 45%);
   white-space: nowrap;
-  width: auto;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/cv-template.html` at line 306, Remove the redundant CSS declaration
"width: auto" from the rule where it is applied (the selector that sets display:
table-cell); since display: table-cell defaults to width: auto, simply delete
the width: auto line to simplify the stylesheet and avoid unnecessary clutter.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@templates/cv-template.html`:
- Around line 387-389: The RTL CSS only changes .cert-year text alignment but
not the visual column order; update the RTL rules (targeting html[lang="ar"] and
the certificate row/container selectors such as .cert-row or .cert-table and the
cell selectors .cert-year, .cert-org, .cert-title) to reverse the visual order —
e.g., set the container to use flexbox/grid row-reverse (or apply explicit order
values: .cert-year {order:0}, .cert-org {order:1}, .cert-title {order:2}
switched to row-reverse so visual becomes year→org→title) and keep text
alignment adjusted for RTL; this preserves HTML structure while reversing the
column order in Arabic mode.

---

Outside diff comments:
In `@templates/cv-template.html`:
- Line 306: Remove the redundant CSS declaration "width: auto" from the rule
where it is applied (the selector that sets display: table-cell); since display:
table-cell defaults to width: auto, simply delete the width: auto line to
simplify the stylesheet and avoid unnecessary clutter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 43177297-c683-41ec-aa69-9a1375195bc7

📥 Commits

Reviewing files that changed from the base of the PR and between 23954b3 and acf53c7.

📒 Files selected for processing (1)
  • templates/cv-template.html
🛑 Comments failed to post (1)
templates/cv-template.html (1)

387-389: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

RTL certification layout should reverse column order, not just text alignment.

For Arabic (RTL) mode, the current override only changes .cert-year text alignment from right to left, but doesn't reverse the visual order of the table cells. In a proper RTL layout, the columns should appear in reverse visual order (year → org → title, reading right-to-left), not just reverse text alignment within each cell.

🔄 Proposed fix to reverse column order in RTL mode
 html[lang="ar"] .cert-year {
   text-align: left;
 }
+
+html[lang="ar"] .cert-item {
+  direction: rtl;
+}

This will cause the table cells to display in reverse order visually while maintaining the same HTML structure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/cv-template.html` around lines 387 - 389, The RTL CSS only changes
.cert-year text alignment but not the visual column order; update the RTL rules
(targeting html[lang="ar"] and the certificate row/container selectors such as
.cert-row or .cert-table and the cell selectors .cert-year, .cert-org,
.cert-title) to reverse the visual order — e.g., set the container to use
flexbox/grid row-reverse (or apply explicit order values: .cert-year {order:0},
.cert-org {order:1}, .cert-title {order:2} switched to row-reverse so visual
becomes year→org→title) and keep text alignment adjusted for RTL; this preserves
HTML structure while reversing the column order in Arabic mode.

@santifer santifer merged commit e27b051 into santifer:main Jun 11, 2026
7 checks passed
@santifer

Copy link
Copy Markdown
Owner

Merged — same-day fix for a same-day report (#930, thanks @jibion for the catch). The community loop is getting fast. 🚀 (And the OpenCode round on #707 is waiting on you whenever you're ready.)

@mskadu mskadu deleted the fix/cert-column-alignment branch June 11, 2026 16:48
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.

Certification org column misaligns when org names vary in length

2 participants