Skip to content

Bug: Footer.of_children omits width=100% on its outer table (#20)#22

Draft
makerprism-bot wants to merge 1 commit into
mainfrom
automation/issue-20-34e0e9af
Draft

Bug: Footer.of_children omits width=100% on its outer table (#20)#22
makerprism-bot wants to merge 1 commit into
mainfrom
automation/issue-20-34e0e9af

Conversation

@makerprism-bot
Copy link
Copy Markdown
Contributor

Fixes #20.

Automated implementation for issue #20 (#20).

Produced by automation run 34e0e9af-f5c3-45a6-b1f4-58168e0107c2 using Claude Code on makerprism/typemail.

Agent's summary (last lines of output):

Implementation complete. I've successfully fixed issue #20 by adding `width="100%"` to the Footer component's outer table element.

**Changes made:**
- `lib/footer.ml`: Added `"width", "100%"` to the table attributes list (line 43)
- `test/structure_tests.ml`: Added assertions to verify `width="100%"` is present on both `Footer.v` and `Footer.of_children` paths
- `test/golden/footer.html`: Updated the expected output to include `width="100%"` in both test cases

The Footer component now matches the behavior of Section, Callout, and Spacer components, ensuring the footer table spans the full width and aligns correctly in Outlook and other email clients.

Review carefully; this is a first-attempt automated change.

@makerprism-bot makerprism-bot marked this pull request as ready for review April 19, 2026 02:58
@sabine sabine force-pushed the automation/issue-20-34e0e9af branch from 9ec9a0d to 9a41e5d Compare April 19, 2026 16:13
@sabine
Copy link
Copy Markdown
Contributor

sabine commented Apr 19, 2026

⚠️ CRITICAL: This PR has the wrong diff

Expected (from PR title and issue #20)

This PR should fix: "Footer.of_children omits width=100% on its outer table"

Expected changes:

  • File: lib/footer.ml
  • Add "width", "100%" to Footer outer table attributes
  • Update structure tests to assert width="100%" on footer

Actual (from PR diff)

This PR actually changes:

  • File: lib/render.ml and lib/render.mli
  • Adds body_background parameter to render_email
  • Has nothing to do with Footer at all

What happened?

This looks like a bot automation error - the diff from PR #21 (body_background feature) got applied to PR #22 (Footer width bug).

Action needed

Please revert this branch and apply the correct diff from issue #20:

(* lib/footer.ml - add width attribute to table *)
let of_children children =
  [...]
  make @@ builder
    ~tag:"table"
    ~attributes:[
      "border", "0";
      "cellpadding", "0";
      "cellspacing", "0";
      "role", "presentation";
      "width", "100%";  (* <-- Add this *)
    ]
    ~children:[...]

Reference issue #20 for the full requirements.

@makerprism-bot makerprism-bot marked this pull request as draft April 19, 2026 18:11
Outlook for Windows requires the HTML width attribute (not CSS) on tables
to prevent them from collapsing to content width. Without width="100%",
Footer tables shrink to fit their text content and align unpredictably
instead of spanning the full container width.

This matches the pattern already used by Section, Callout, and Spacer,
all of which emit width="100%" on their outer tables for the same reason.

caniemail reference: https://www.caniemail.com/features/html-table/

Changes:
- lib/footer.ml: Add "width", "100%" to table attributes
- test/structure_tests.ml: Assert width=100% on both Footer paths
- test/golden/footer.html: Update golden snapshot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@makerprism-bot makerprism-bot force-pushed the automation/issue-20-34e0e9af branch from 9a41e5d to b41bbc3 Compare April 19, 2026 21:26
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.

Bug: Footer.of_children omits width=100% on its outer table

2 participants