mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-24 15:22:20 +10:00
refactor(pdf): introduce createBaseTemplateStyles factory (~1,150 lines removed)
Move 14 identical style slots (text/heading/div/inline/link/small/bold/ richParagraph/richListItemRow/richListItemMarker/richListItemContent/ splitRow/alignEnd/picture) from all 15 template Page.tsx files into a single createBaseTemplateStyles factory in templates/shared. Each template now spreads …base and keeps only its real overrides. Resolved StyleSheet values are identical to before. Update rtl-fixture and rich-text-template- styles tests to guard the factory file rather than each template directly. Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
@@ -20,7 +20,8 @@ describe("RTL PDF fixture", () => {
|
||||
const source = readFileSync(pagePath, "utf8");
|
||||
|
||||
expect(source).toContain("createRtlStyleHelpers");
|
||||
expect(source).toContain("alignEnd");
|
||||
// ponytail: alignEnd moved to createBaseTemplateStyles factory; either direct or factory counts.
|
||||
expect(source.includes("alignEnd") || source.includes("createBaseTemplateStyles")).toBe(true);
|
||||
expect(source).not.toContain("alignRight");
|
||||
expect(source).not.toContain('from "@reactive-resume/utils/locale"');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user