style: 14px text floor and one shared status wording

- app.css: add --hope-text-small (14px) and --hope-text-fine (13px, footer
  fine print). Every font size below 14px now uses them. The help-tip circle,
  event badge and date stamp grow to fit the larger text.
- schedule.ts: shared filledCount(), spotsSentence() and fillLabel().
  Public pages say "4 of 6 spots filled"; coordinator pills say
  "Full · 6 of 6" or "2 open · 4 of 6" (needs tone when under half full).
- admin-pages.tsx: drop needCopy(); dashboard, event page and shift lines
  all use fillLabel().
- tests: update wording expectations; add design-rules.test.ts to guard the
  14px floor and the wording.
- README: update example wording.
This commit is contained in:
Cosmically Creative committed 2026-11-20 13:24:23 -06:00
1 parent 085f2dc668
commit 1230030e39
9 files changed
+112 -67

No files matched your search

+7 -7
View File
@@ -40,8 +40,8 @@ describe('public pages', () => {
expect(home.headers.get('x-robots-tag')).toBe('noindex');
expect(html).toContain('class="roster-mark" src="/img/sunburst.png?v=');
expect(html).toContain('Live Greeting');
expect(html).toContain('0/2 spots filled');
expect(html).toContain('1/4 spots filled');
expect(html).toContain('0 of 2 spots filled');
expect(html).toContain('1 of 4 spots filled');
expect(html).toContain('9:00 AM');
expect(html).toContain('CDT');
expect(html).toContain('October 14');
@@ -131,8 +131,8 @@ describe('public pages', () => {
expect(calendar).toContain('October 2026');
expect(calendar).toContain('Open Sorting');
expect(calendar).toContain('Full Intake');
expect(calendar).toContain('1/3 spots filled');
expect(calendar).toContain('1/1 spots filled');
expect(calendar).toContain('1 of 3 spots filled');
expect(calendar).toContain('1 of 1 spots filled');
expect(calendar).toContain('class="cal-line"');
expect(calendar).toContain('Past Setup');
expect(calendar).toContain('class="cal-shift is-ended"');
@@ -161,7 +161,7 @@ describe('public pages', () => {
const shiftMain = shiftHtml.slice(shiftHtml.indexOf('<main'), shiftHtml.indexOf('class="footer"'));
expect(shiftMain).not.toContain('Weekly pantry');
expect(shiftMain).not.toContain('sunburst');
expect(shiftHtml).toContain('1/3 spots filled');
expect(shiftHtml).toContain('1 of 3 spots filled');
expect(shiftHtml).toContain('spots is-open');
expect(shiftHtml).toContain('<form');
expect(shiftHtml).toContain('name="first_name"');
@@ -199,7 +199,7 @@ describe('public pages', () => {
const full = await app.request(`/s/${ids.full}`);
const fullHtml = await full.text();
expect(fullHtml).toContain('1/1 spots filled');
expect(fullHtml).toContain('1 of 1 spots filled');
expect(fullHtml).toContain('spots is-full');
expect(fullHtml).not.toContain('<form');
@@ -476,7 +476,7 @@ describe('public pages', () => {
const html = await (await app.request('/')).text();
const start = html.indexOf('Full Wednesday');
const pane = html.slice(html.lastIndexOf('<section class="shift-pane"', start), html.indexOf('</section>', start));
expect(pane).toContain('1/1 spots filled');
expect(pane).toContain('1 of 1 spots filled');
expect(pane).toContain('class="btn-card is-static"');
expect(pane).toContain('>Full</span>');
expect(pane).toContain('Not accepting more signups');