fix(ci): layering and theme counts after the places changes

- LibraryFilterBar reads the list statuses from the component-level
  collectionStatus model instead of reaching into pages/.
- The phone filter kit moved out of MCollections with its raw text sizes; it
  now uses the type tiers (control, caption), so the user's text size applies.
- The cover of a place of All places on the phone keeps its scrim, close button
  and name colours in a small stylesheet, as the desktop sheet does.
- theme-baseline: ratingBadge back to the two corner-badge literals it holds,
  MapView, MapViewGL and MCollections lowered to what they hold now.
This commit is contained in:
Maurice
2026-11-29 16:48:45 +01:00
parent f99c7f5421
commit 026d593c8d
5 changed files with 26 additions and 12 deletions
@@ -1,7 +1,7 @@
import type { CollectionStatus, PlacesLibraryCounts, PlacesLibrarySort } from '@trek/shared';
import { ArrowDownUp, Bookmark, CopyCheck, Globe2, Layers, Luggage, Tag } from 'lucide-react';
import React from 'react';
import { STATUS_META, STATUS_ORDER } from '../../pages/collections/collectionsModel';
import { STATUS_META, STATUS_ORDER } from './collectionStatus';
import type { Category, TranslationFn } from '../../types';
import { getCategoryIcon } from '../shared/categoryIcons';
import FilterDropdown, { type FilterOption } from './FilterDropdown';
@@ -7,7 +7,7 @@ import MDancingTrek, { type TrekScene } from '../../components/MDancingTrek';
*/
export const FILTER_CHIP =
'flex min-w-0 flex-1 items-center justify-center gap-[5px] rounded-full py-2 text-[0.75rem] font-semibold';
'flex min-w-0 flex-1 items-center justify-center gap-[5px] rounded-full py-2 text-caption font-semibold';
export const CHIP_IDLE = 'border border-m-rowbr bg-m-sheetop text-m-ink';
export const CHIP_ON = 'border border-transparent bg-m-act text-m-actfg';
@@ -32,13 +32,13 @@ export function DropRow({
<button
type="button"
onClick={onPick}
className={`flex w-full items-center gap-[9px] rounded-[11px] p-[10px] text-[0.8125rem] font-semibold text-m-ink ${on ? 'bg-m-ic' : ''}`}
className={`flex w-full items-center gap-[9px] rounded-[11px] p-[10px] text-control font-semibold text-m-ink ${on ? 'bg-m-ic' : ''}`}
>
{icon}
<span dir="auto" className="min-w-0 flex-1 truncate text-start">
{label}
</span>
{count != null && <span className="font-geist text-[0.6875rem] font-bold text-m-faint">{count}</span>}
{count != null && <span className="font-geist text-caption font-bold text-m-faint">{count}</span>}
</button>
);
}
@@ -51,7 +51,7 @@ export function EmptyNote({ icon, scene, title }: { icon?: ReactNode; scene?: Tr
) : (
<span className="flex h-10 w-10 items-center justify-center rounded-xl bg-m-ic text-m-faint">{icon}</span>
)}
<p className="font-geist text-[0.8125rem] font-medium text-m-muted">{title}</p>
<p className="font-geist text-control font-medium text-m-muted">{title}</p>
</div>
);
}
@@ -35,6 +35,7 @@ import type { TranslationFn } from '../../../types';
import { entityGradient } from '../../../utils/gradients';
import MSheet from '../../components/MSheet';
import { categoryMeta, STATUS_SPEC, tint, UNCATEGORIZED_META } from './collectionsMobileModel';
import './libraryCover.css';
import { Eyebrow } from './MCollSheetKit';
interface MLibraryPlaceSheetProps {
@@ -94,7 +95,7 @@ function SheetCover({
style={cover ? undefined : { backgroundImage: entityGradient(gradient) }}
>
{cover && <img src={cover} alt="" className="absolute inset-0 h-full w-full object-cover" />}
<div className="absolute inset-0 bg-gradient-to-b from-transparent to-black/60" />
<div className="m-libcover-scrim absolute inset-0" />
<div className="absolute inset-x-3 top-3 flex items-center gap-2">
{entry?.category && (
<span
@@ -109,13 +110,13 @@ function SheetCover({
type="button"
onClick={onClose}
aria-label={t('common.close')}
className="ms-auto flex h-8 w-8 items-center justify-center rounded-full bg-black/30 text-white"
className="m-libcover-btn ms-auto flex h-8 w-8 items-center justify-center rounded-full"
>
<X size={16} />
</button>
</div>
{entry && (
<h2 dir="auto" className="absolute inset-x-4 bottom-3 m-0 truncate text-title font-extrabold text-white">
<h2 dir="auto" className="m-libcover-name absolute inset-x-4 bottom-3 m-0 truncate text-title font-extrabold">
{entry.name}
</h2>
)}
@@ -0,0 +1,13 @@
/* The cover of a place of "All places" on the phone sits on a photo or a gradient,
so its scrim, close button and name keep the same dark glass and white in every
theme, as the desktop sheet's cover does in collections.css. */
.m-libcover-scrim {
background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6));
}
.m-libcover-btn {
background: rgba(0, 0, 0, 0.3);
color: #fff;
}
.m-libcover-name {
color: #fff;
}