-
Notifications
You must be signed in to change notification settings - Fork 0
職務経歴書PDFの余白修正とフォーム・出力表記の調整 #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
66fa027
d4dd291
e18d434
d7615f8
68152b5
5056c37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,8 @@ export function CareerExperienceEditor({ | |
| </> | ||
| } | ||
| > | ||
| <div className={shared.inline}> | ||
| {/* 会社名:事業内容:IT企業 = 4.5:5:0.5 の幅比で配置 */} | ||
| <div className={shared.inline} style={{ gridTemplateColumns: "4.5fr 5fr 0.5fr" }}> | ||
| <label> | ||
| {/* グローバル CSS で label { display: grid } のため、テキストと DirtyDot を span で | ||
| 束ねないと別々の行になる。span で 1 グリッド行に束ねることでラベル右側に並べる。 */} | ||
|
|
@@ -115,6 +116,26 @@ export function CareerExperienceEditor({ | |
| placeholder="例: SES事業、受託開発" | ||
| /> | ||
| </label> | ||
| {/* IT企業かどうか(非ITは案件を持たず詳細のみ)。会社名・事業内容と同じ行に配置。 | ||
| 上段は labelText のスペーサで隣のラベル行と高さを合わせ、下段のトグルを入力欄と横並びにする。 */} | ||
| <label> | ||
| <span className={shared.labelText} aria-hidden="true"> | ||
| | ||
| </span> | ||
| <span className={styles.companyTypeToggle}> | ||
| <input | ||
| type="checkbox" | ||
| checked={exp.is_it_company} | ||
| onChange={(e) => | ||
| onUpdateExperienceField(expIndex, "is_it_company", e.target.checked) | ||
| } | ||
| /> | ||
| <span> | ||
| IT企業 | ||
| <DirtyDot visible={Boolean(fieldDirty?.is_it_company)} /> | ||
| </span> | ||
| </span> | ||
| </label> | ||
| </div> | ||
|
|
||
| <div className={shared.inline}> | ||
|
|
@@ -215,19 +236,6 @@ export function CareerExperienceEditor({ | |
| </label> | ||
| </div> | ||
|
|
||
| {/* IT企業かどうか(非ITは取引先を持たず詳細のみ) */} | ||
| <label className={styles.clientCheckbox}> | ||
| <input | ||
| type="checkbox" | ||
| checked={exp.is_it_company} | ||
| onChange={(e) => onUpdateExperienceField(expIndex, "is_it_company", e.target.checked)} | ||
| /> | ||
| <span> | ||
| IT企業 | ||
| <DirtyDot visible={Boolean(fieldDirty?.is_it_company)} /> | ||
| </span> | ||
| </label> | ||
|
|
||
| {!exp.is_it_company && ( | ||
| <div className={styles.stackSection}> | ||
| <label> | ||
|
|
@@ -250,7 +258,7 @@ export function CareerExperienceEditor({ | |
|
|
||
| {exp.is_it_company && ( | ||
| <div className={styles.stackSection}> | ||
| <h3>取引先</h3> | ||
| <h3>案件情報</h3> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incomplete terminology migration creates user confusion. The section heading now reads "案件情報" (Project Information), but the action button below at line 280 still says "取引先を追加" (Add Client). This inconsistency confuses users—are they adding "案件" or "取引先"? For a coherent user experience, either complete the terminology migration throughout (all "取引先" → "案件") or reconsider whether the heading should remain "取引先情報" to match the button text. Proposed fix for terminology consistencyIf the intent is to fully migrate to "案件" terminology: - <button type="button" className="ghost" onClick={() => onAddClient(expIndex)}>
- 取引先を追加
- </button>
+ <button type="button" className="ghost" onClick={() => onAddClient(expIndex)}>
+ 案件を追加
+ </button>And similarly update ClientEditor.tsx line 232: - {client.is_vacation ? "休業を削除" : "取引先を削除"}
+ {client.is_vacation ? "休業を削除" : "案件を削除"}And line 91: - 取引先なし
+ 案件なし🤖 Prompt for AI Agents |
||
| {exp.clients.map((client, clientIndex) => ( | ||
| <ClientEditor | ||
| key={`client-${expIndex}-${clientIndex}`} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,7 @@ export function ClientEditor({ | |
| {!client.is_vacation && client.has_client && ( | ||
| <label className={styles.clientNameLabel}> | ||
| <span> | ||
| 取引先名(呼称) | ||
| 案件名 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for remaining "取引先" usage in frontend form components
rg -n --type=tsx -C2 '取引先' frontend/src/components/forms/Repository: yusuke0610/devforge Length of output: 91 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Correctly search for remaining Japanese terminology in the target area
echo "== occurrences of '取引先' in frontend/src/components/forms/ (ts/tsx/js/ts?) =="
rg -n -C2 -g'*.{ts,tsx,js,jsx}' '取引先' frontend/src/components/forms/ || true
# 2) Inspect the specific file around the cited lines
echo
echo "== ClientEditor.tsx around label change =="
# show manageable ranges around the referenced line numbers
nl -ba frontend/src/components/forms/CareerFormEditors/ClientEditor.tsx | sed -n '50,120p'
echo
echo "== ClientEditor.tsx around line 220-260 =="
nl -ba frontend/src/components/forms/CareerFormEditors/ClientEditor.tsx | sed -n '210,260p'
# 3) Open the frontend message management guidelines to confirm SSoT / literal rules
echo
echo "== .claude/rules/frontend/messages.md =="
nl -ba .claude/rules/frontend/messages.md | sed -n '1,220p'
# 4) Also confirm if there's any message/i18n pattern used in this file
echo
echo "== ClientEditor.tsx: find uses of i18n/message helpers =="
rg -n 'useTranslation|t\(|message\.|i18n|SSoT|messages' frontend/src/components/forms/CareerFormEditors/ClientEditor.tsx || true
echo
echo "== ClientEditor.tsx: find occurrences of '案件名' =="
rg -n '案件名' frontend/src/components/forms/CareerFormEditors/ClientEditor.tsx || trueRepository: yusuke0610/devforge Length of output: 7667 🏁 Script executed: #!/bin/bash
set -euo pipefail
TARGET="frontend/src/components/forms/CareerFormEditors/ClientEditor.tsx"
FORMS_DIR="frontend/src/components/forms/"
echo "== occurrences of '取引先' in $FORMS_DIR (ts/tsx/js/jsx) =="
rg -n -C2 -t ts -t tsx -t js -t jsx '取引先' "$FORMS_DIR" || true
echo
echo "== occurrences of '案件名' in $TARGET =="
rg -n '案件名' "$TARGET" || true
echo
echo "== ClientEditor.tsx line 60-110 (around the label change) =="
awk 'NR>=60 && NR<=110 {printf "%d\t%s\n", NR, $0}' "$TARGET"
echo
echo "== ClientEditor.tsx line 210-250 (around delete button) =="
awk 'NR>=210 && NR<=250 {printf "%d\t%s\n", NR, $0}' "$TARGET"
echo
echo "== .claude/rules/frontend/messages.md (message-literal / SSoT rules) =="
# Print only the sections that mention literals/SSoT/i18n to keep output small
rg -n 'SSoT|literal|message|i18n|t\(' .claude/rules/frontend/messages.md || true
awk 'NR>=1 && NR<=260 {printf "%d\t%s\n", NR, $0}' .claude/rules/frontend/messages.mdRepository: yusuke0610/devforge Length of output: 7603 Fix remaining “client” terminology + move UI strings to frontend SSoT messages
🤖 Prompt for AI Agents |
||
| <DirtyDot visible={Boolean(dirty?.self)} /> | ||
| </span> | ||
| <input | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: yusuke0610/devforge
Length of output: 187
🏁 Script executed:
Repository: yusuke0610/devforge
Length of output: 1635
🏁 Script executed:
Repository: yusuke0610/devforge
Length of output: 1635
🌐 Web query:
WeasyPrint support for break-after CSS Fragmentation Module Level 3 page-break-after💡 Result:
WeasyPrint support for “break-after” from the CSS Fragmentation Module Level 3 (and CSS2’s page-break-after alias) is only for page fragmentation, not for multi-column/region fragmentation. 1) Fragmentation Module Level 3: break-after is supported for pages WeasyPrint’s documentation states that the “break-before”, “break-after”, and “break-inside” properties are supported, specifically for pages (but not for columns and regions). [1] So, in terms of the exact question (“break-after CSS Fragmentation Module Level 3 … page-break-after”): - break-after: page (and related break-after values that create page breaks) should work because break-after is supported for pages. [1][2] - page-break-after (CSS2 alias) is also supported. [1] 2) Not supported for columns and regions The same WeasyPrint docs explicitly say break properties are not supported “for columns and regions”. [1] So if you are inside a multi-column container or other fragmentation context where columns/regions apply, break-after may not behave as expected (and WeasyPrint’s multi-column docs also note break-before/after/inside are not supported for multi-column layout). [3] 3) Practical note for your template pattern In a simple single-column paged flow, using page-break-after: always should usually force page breaks after each repeated section. However, real-world behavior can be affected by surrounding layout (e.g., margins, flex/grid/other supported-but-not-perfect layout scenarios, and where in the DOM the break element lands). If you’re trying to force a break after each “section”, a common reliable pattern is to apply the break to an element that produces/ends the section content and is not empty (e.g., a block-level element wrapping the section), and to test with a single instance first. (Your own experience of “it only works when I add it twice” can happen with edge cases where the break opportunity is suppressed or where the added element creates additional layout that changes break positioning.) Bottom line - Yes: WeasyPrint supports break-after (Fragmentation Module Level 3) for pages, and supports page-break-* aliases too. [1] - No: It does not support break-after for columns and regions. [1][3] If you share whether your template is single-column or uses multi-columns (or any CSS that creates column/region fragmentation), I can suggest the most WeasyPrint-compatible way to structure the break element.
Citations:
🌐 Web query:
WeasyPrint page-break-after break-after💡 Result:
WeasyPrint supports both the modern
break-afterCSS property and the legacypage-break-afteralias [1]. Key points regarding their usage: 1. Compatibility: WeasyPrint supports the properties defined in the CSS Fragmentation Module (Level 3/4), specificallybreak-before,break-after, andbreak-inside[1]. It also maintains support for legacypage-break-*aliases, such aspage-break-after[1]. 2. Preferred Usage: While both work,break-afteris the modern standard [2][3]. When using these properties, common values includealways(to force a break),avoid(to prevent a break), and position-specific values likeleftorright[1][4][2]. 3. Troubleshooting Common Issues: - Empty Pages: If you experience unexpected blank pages, ensure that you are not applying breaks to elements that are already at the end of a page or applying them in a way that forces multiple breaks unintentionally [5]. - Box Model Effects: WeasyPrint relies on the box model to determine break points [6]. Applying a break property to an empty element (e.g.,<p style="page-break-after: always;"></p>) can sometimes lead to unpredictable behavior if the element itself creates layout interference. - Alternative Approaches: If a standard break is not working as expected within complex layouts (like tables), try applying the CSS property directly to the block-level element (e.g., a orCitations:
🌐 Web query:
CSS Fragmentation Module Level 3 page-break-after deprecated break-after avoid💡 Result:
The page-break-after property is deprecated and has been superseded by the break-after property [1][2][3]. As part of the CSS Fragmentation Module Level 3 specification, browsers are required to treat page-break-after as a legacy shorthand alias for break-after to maintain backward compatibility [4][5][6]. While it remains supported for compatibility reasons, its use is no longer recommended, and developers are encouraged to update their code to use break-after [1][3]. The following table summarizes how the legacy property maps to the modern property: Legacy (page-break-after) | Modern (break-after) --- | --- auto | auto left | left right | right avoid | avoid always | page Note that the legacy always value is aliased to page in the modern specification [5][6]. The break-after property is more robust, as it extends beyond paged media (printing) to support fragmentation in multi-column layouts and regions [2][6].
Citations:
Replace deprecated
page-break-afterwith modernbreak-afterbackend/app/services/pdf/templates/resume.css uses
page-break-after: avoidinh2,.company-header, and.client-name(lines 44, 63, 115).page-break-afteris deprecated in favor of CSS Fragmentation Level 3break-after; WeasyPrint supports both, so this keeps behavior while aligning with the current standard.♻️ Proposed fix
h2 { font-size: 12pt; border-bottom: 2px solid `#333`; padding-bottom: 1mm; margin: 6mm 0 3mm 0; /* 見出しがページ末尾に孤立して直後の本文だけ次ページに行くのを防ぐ */ - page-break-after: avoid; + break-after: avoid; }.company-header { background: `#d6dce8`; padding: 3px 4px; font-size: 10pt; font-weight: bold; border-bottom: 0.3px solid `#999`; /* ヘッダがページ末尾に孤立し本文だけ次ページに分かれるのを防ぐ */ - page-break-after: avoid; + break-after: avoid; }.client-name { font-size: 10pt; font-weight: bold; margin: 3mm 0 2mm 0; padding-bottom: 1mm; border-bottom: 2px solid `#333`; /* 案件名見出しの孤立防止 */ - page-break-after: avoid; + break-after: avoid; }🧰 Tools
🪛 Stylelint (17.12.0)
[error] 44-44: Expected "page-break-after" to be "break-after" (property-no-deprecated)
(property-no-deprecated)
🤖 Prompt for AI Agents