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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ All notable changes to OpenSignup are documented here. Format follows [Keep a Ch

### Fixed

- A signup's three tabs (Build, Responses, Settings) now fit whole on a 320px phone (#1022). In Swedish and German the strip was wider than the screen, so a signup opened on Build showed its Settings tab cut in half at the right edge, with nothing to say the strip scrolls. Below the `sm` breakpoint the tabs, the counts beside them and the strip's own side margin are a little narrower; the tabs keep their height, and wider screens are unchanged. A count of three digits can still make the strip scroll.
- On a phone, the organizer header's crumbs no longer run under Help, Account and Sign out (#978). Below tablet width the header now shows only the site's name, which stays a link back to Your signups, beside Help, Account and Sign out; the page's own heading says where you are. From tablet width up the whole trail shows, and only the current page's crumb shortens with "…" when the row is full, so the links before it keep their words. On Your signups, **New signup** stays on one line in Swedish at 320px, and the heading beside it wraps instead.
- A long slot name now shows in full on a signup's page, on up to two lines (#869). It was cut to one line with "…", so on a phone "Cupcakes or muffins (a dozen)" read "Cupcakes or muffins (a d…" and the amount only showed once a participant tapped **Sign up**. A name longer than two lines still ends in "…". The organizer's preview shows the same.
- On the Build tab, a group heading on a signup grouped by a Number or Time field is now set with the same control as a slot's value (#1051): a number box for a Number field, the list of times for a Time field. It was a free-text box, and on a Number grouping a heading that wasn't a number saved as "Saved" while blanking that field on every slot in the group, which then moved to the empty group after a reload. A Number value that isn't a number is now sent to the server, which refuses it, so the Build tab says the save failed and puts the old value back. The Build tab's own Group by choice still doesn't offer Number or Time fields; a signup gets one from Magic Compose, the REST API or an AI assistant.
Expand Down
9 changes: 6 additions & 3 deletions src/components/signup/TabsNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ export function TabsNav({ signupId, counts, labels }: TabsNavProps) {
tab.offsetLeft - strip.offsetLeft - (strip.clientWidth - tab.offsetWidth) / 2;
}, [activeTab]);

// Below `sm` the tabs, their counts and the strip's side margin are
// narrower, so all three tabs fit whole on a 320px screen in every
// language (translated-organizer.spec.ts measures it).
return (
<div
ref={stripRef}
role="tablist"
aria-label={labels.strip}
className="-mx-4 mb-2 flex overflow-x-auto border-b border-surface-sunk px-4 [scrollbar-width:none] sm:mx-0 sm:px-0 [&::-webkit-scrollbar]:hidden"
className="-mx-4 mb-2 flex overflow-x-auto border-b border-surface-sunk px-2 [scrollbar-width:none] sm:mx-0 sm:px-0 [&::-webkit-scrollbar]:hidden"
>
{TABS.map((id) => {
const active = id === activeTab;
Expand All @@ -84,7 +87,7 @@ export function TabsNav({ signupId, counts, labels }: TabsNavProps) {
role="tab"
aria-selected={active}
aria-current={active ? 'page' : undefined}
className={`-mb-px inline-flex shrink-0 items-center gap-2 border-b-2 px-3 py-3 text-sm transition focus-visible:outline-offset-[-3px] ${
className={`-mb-px inline-flex shrink-0 items-center gap-1 border-b-2 px-1.5 py-3 text-sm transition focus-visible:outline-offset-[-3px] sm:gap-2 sm:px-3 ${
active
? 'border-brand font-semibold text-ink'
: 'border-transparent font-medium text-ink-muted hover:text-ink'
Expand All @@ -96,7 +99,7 @@ export function TabsNav({ signupId, counts, labels }: TabsNavProps) {
// Build's number alone says nothing of what it counts, so a
// screen reader hears the words after it instead.
aria-hidden={id === 'build' ? true : undefined}
className={`inline-flex min-w-[1.5rem] items-center justify-center rounded-full px-1.5 py-0.5 text-xs leading-none ${
className={`inline-flex min-w-[1.25rem] items-center justify-center rounded-full px-1 py-0.5 text-xs leading-none sm:min-w-[1.5rem] sm:px-1.5 ${
active ? 'bg-brand/10 text-brand' : 'bg-surface-raised text-ink-muted'
}`}
>
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/translated-organizer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ for (const locale of TEST_LOCALES) {
await page.setViewportSize(viewport);
await page.goto(`/app/signups/${id}/build`);

// The tabs: on a 320px screen the strip scrolls sideways, as it
// does in English, but each name stays whole.
// The tabs: each name whole, and all three in view without the
// strip scrolling sideways, even on a 320px screen. A signup opens
// on Build, so a tab cut off at the strip's edge is what the
// organizer would see first.
const strip = page.getByRole('tablist', { name: signup('tabs.label') });
await expect(strip.getByRole('tab'), `the tabs ${where}`).not.toHaveCount(0);
for (const tab of await strip.getByRole('tab').all()) await expectOneLine(tab, where);
if (viewport === PHONE) {
expect(
await strip.evaluate((el) => el.scrollWidth <= el.clientWidth),
`every tab in view ${where}`,
).toBe(true);
}
expect(
await strip.evaluate((el) => el.scrollWidth <= el.clientWidth),
`every tab in view ${where}`,
).toBe(true);

// The header across the top: Help, Account and Sign out.
const banner = page.getByRole('banner');
Expand Down