Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/test-baseline.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_comment": "Floor for how much testing this repo has. Raised by scripts/check-test-baseline.mjs when you add tests; lowering it is a deliberate, reviewable edit.",
"unit": 953,
"e2e": 122
"e2e": 123
}
27 changes: 27 additions & 0 deletions e2e/layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,30 @@ test('the header band and the day divider run the full width of the schedule car
expect(divider.width).toBeCloseTo(card!.width - 4, 0);
expect(day!.x).toBeGreaterThan(divider.x);
});

// The colophon is two one-line credits, and it used to carry a 52ch measure of
// its own — a reading width, on a footer that is not reading copy. Every locale
// broke the share line in two well short of the trimmed edge, and the whole
// block sat left against a page that is centred everywhere else. Only a
// rendered page can say how many lines a paragraph actually took.
test.describe('the colophon', () => {
test.use({ viewport: { width: 1440, height: 1000 } });

test('sits centred and on one line per credit at desktop width', async ({ page }) => {
await openRecipe(page, RECIPE);

const credits = page.locator('footer p');
await expect(credits).toHaveCount(3);

for (const p of await credits.all()) {
const { lines, align } = await p.evaluate((el) => ({
lines: Math.round(
el.getBoundingClientRect().height / parseFloat(getComputedStyle(el).lineHeight)
),
align: getComputedStyle(el).textAlign
}));
expect(lines, await p.textContent()).toBe(1);
expect(align).toBe('center');
}
});
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knead-time",
"version": "7.0.0",
"version": "7.0.1",
"private": true,
"type": "module",
"license": "Apache-2.0",
Expand Down
12 changes: 8 additions & 4 deletions src/lib/components/SiteFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@

<footer class="text-ink-soft mt-6">
<div class="tricolore border-rule border-y-2"></div>
<div class="view-pad py-8">
<!-- Centred, and with no measure of its own: these are two one-line credits,
not reading copy, and the 52ch measure they used to carry broke the
longer locales' share line in half a screen short of the trimmed edge.
The sheet's own max-w-6xl is the only width limit they need. -->
<div class="view-pad py-8 text-center">
<div class="min-w-0">
<p class="max-w-[52ch] text-sm leading-relaxed">{t.footer.about}</p>
<p class="mt-2 max-w-[52ch] text-sm leading-relaxed">{t.actions.share_help}</p>
<p class="mt-5 flex flex-wrap gap-x-5 gap-y-2">
<p class="text-sm leading-relaxed text-balance">{t.footer.about}</p>
<p class="mt-2 text-sm leading-relaxed text-balance">{t.actions.share_help}</p>
<p class="mt-5 flex flex-wrap justify-center gap-x-5 gap-y-2">
<!-- rel="external" because the href is a prop: the lint rule that keeps
in-app links going through resolve() cannot tell that every one of
these leaves the app. Same reason RecipeSection carries it. -->
Expand Down
Loading