fix(client): lint, theme and size ratchets of the quick-win round, and the tests that followed the features

New warnings fixed at their source (refs written in effects, typed tile
options, no stray imports, smaller functions and components), the payer and
split heads hold their switch instead of letting it overhang, the baselines
lowered where the round removed warnings, and the tests updated to the
solo trip, the shares view and the revisit status.
This commit is contained in:
Maurice
2026-11-13 12:40:17 +01:00
parent 75aeba29ed
commit c2ba78253d
33 changed files with 278 additions and 194 deletions
@@ -120,7 +120,7 @@ export default function MAdminSettingsSection({ admin, t }: MAdminSettingsSectio
<MToggle
checked={oidcAutoRedirect}
ariaLabel={t('admin.oidcAutoRedirect')}
onChange={(v) => handleToggleAuthSetting('oidc_auto_redirect', v, setOidcAutoRedirect)}
onChange={(v) => void handleToggleAuthSetting('oidc_auto_redirect', v, setOidcAutoRedirect)}
/>
}
/>
@@ -22,7 +22,8 @@ export default function MSettingsMap() {
const {
managed, presets: tilePresets, canMapbox, saving, provider, changeProvider, mapTileUrl, setMapTileUrl, mapboxToken, setMapboxToken,
cartoKey, setCartoKey, cartoNeedsKey, mapboxStyle, setMapboxStyle, mapbox3d, setMapbox3d,
mapboxQuality, setMapboxQuality, hideBasemapPois, setHideBasemapPois, previewPlaces, glPreview, webgl2Missing, save,
mapboxQuality, setMapboxQuality, hideBasemapPois, setHideBasemapPois, mapboxPreview, previewPlaces, glPreview,
webgl2Missing, save,
} = useMapSettingsForm({ mirrorStyleBeforeSave: true })
const [presetOpen, setPresetOpen] = useState(false)
const [styleOpen, setStyleOpen] = useState(false)
@@ -186,9 +187,9 @@ export default function MSettingsMap() {
lat={PREVIEW_CENTER[0]}
lng={PREVIEW_CENTER[1]}
zoom={PREVIEW_ZOOM}
enable3d={provider === 'mapbox-gl' && mapbox3d}
quality={provider === 'mapbox-gl' && mapboxQuality}
hidePois={provider === 'mapbox-gl' && hideBasemapPois}
enable3d={mapboxPreview.enable3d}
quality={mapboxPreview.quality}
hidePois={mapboxPreview.hidePois}
/>
</Suspense>
</ErrorBoundary>
@@ -24,7 +24,7 @@ export default function MPackingCategorySharingSheet({
currentUserId: number | null;
t: TripPlanner['t'];
}) {
const { category, visibility, recipientIds, ownCount, othersCount, busy, ready } = sharing;
const { category, visibility, recipientIds, ownCount, othersCount, ready } = sharing;
const others = tripMembers.filter((m) => m.id !== currentUserId);
const needsPeople = visibility === 'shared' && others.length > 0 && recipientIds.length === 0;
@@ -40,8 +40,8 @@ export default function MPackingCategorySharingSheet({
>
<Icon size={15} strokeWidth={2} className={`flex-none ${on ? 'text-m-ink' : 'text-m-muted'}`} />
<span className="min-w-0 flex-1">
<span className="block text-[0.8125rem] font-semibold text-m-ink">{label}</span>
{hint && <span className="block font-geist text-[0.6875rem] text-m-faint">{hint}</span>}
<span className="block text-body font-semibold text-m-ink">{label}</span>
{hint && <span className="block font-geist text-caption text-m-faint">{hint}</span>}
</span>
{on && <Check size={14} strokeWidth={2.4} className="flex-none text-m-ink" />}
</button>
@@ -49,7 +49,7 @@ export default function MPackingCategorySharingSheet({
};
const note = (text: string) => (
<p className="mt-3 font-geist text-[0.6875rem] leading-relaxed text-m-muted">{text}</p>
<p className="mt-3 font-geist text-caption leading-relaxed text-m-muted">{text}</p>
);
return (
@@ -63,7 +63,7 @@ export default function MPackingCategorySharingSheet({
/>
<FormSheetBody>
<p className="mb-3 font-geist text-[0.71875rem] leading-relaxed text-m-muted">
<p className="mb-3 font-geist text-caption leading-relaxed text-m-muted">
{ownCount === 0 ? t('packing.shareCat.noneOwn') : t('packing.shareCat.hint')}
</p>
@@ -73,7 +73,7 @@ export default function MPackingCategorySharingSheet({
{tier('shared', Share2, t('packing.tierShared'))}
{visibility === 'shared' &&
(others.length === 0 ? (
<div className="px-[10px] py-1 ps-9 font-geist text-[0.6875rem] text-m-faint">
<div className="px-[10px] py-1 ps-9 font-geist text-caption text-m-faint">
{t('packing.noOneToShare')}
</div>
) : (
@@ -87,7 +87,7 @@ export default function MPackingCategorySharingSheet({
onClick={() => sharing.toggleRecipient(m.id)}
className="flex items-center gap-[8px] rounded-[9px] py-[7px] pe-[10px] ps-9 text-start"
>
<span className="min-w-0 flex-1 truncate text-[0.78125rem] font-semibold text-m-ink">
<span className="min-w-0 flex-1 truncate text-body font-semibold text-m-ink">
{m.username}
</span>
{picked && <Check size={14} strokeWidth={2.4} className="flex-none text-m-ink" />}