Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

feat(map): filter trip places from the mobile map

EvKoh66f11602b210
diff --git a/client/src/components/Map/MapTogglePill.tsx b/client/src/components/Map/MapTogglePill.tsx
index 8d6493480..f78c125b2 100644
--- a/client/src/components/Map/MapTogglePill.tsx
+++ b/client/src/components/Map/MapTogglePill.tsx
@@ -6,7 +6,7 @@ import { MAP_CONTROL_SHADOW } from './mapControlShadow'
* One round on/off control in the frosted shell every map control wears, so a new
* one lines up with the compass, the layer switcher and the overview toggle.
*/
-export function MapTogglePill({ active, onToggle, label, icon, testId, tooltipPlacement = 'left' }: {
+export function MapTogglePill({ active, onToggle, label, icon, testId, tooltipPlacement = 'left', badge = 0 }: {
active: boolean
onToggle: () => void
label: string
@@ -14,9 +14,12 @@ export function MapTogglePill({ active, onToggle, label, icon, testId, tooltipPl
testId?: string
/** Away from the edge the control hugs: left on the right edge, right on the left one. */
tooltipPlacement?: 'left' | 'right'
+ /** A count pinned to the top right corner while above zero (how many filters are on, say). */
+ badge?: number
}) {
return (
<div style={{
+ position: 'relative',
display: 'inline-flex', alignItems: 'center', padding: 4, borderRadius: 999, pointerEvents: 'auto',
background: 'var(--sidebar-bg)',
backdropFilter: 'blur(20px) saturate(180%)',
@@ -45,6 +48,14 @@ export function MapTogglePill({ active, onToggle, label, icon, testId, tooltipPl
{icon}
</button>
</Tooltip>
+ {badge > 0 && (
+ <span
+ aria-hidden="true"
+ className="pointer-events-none absolute -right-[3px] -top-[3px] box-border flex h-4 min-w-[16px] items-center justify-center rounded-full bg-accent px-1 font-geist text-[0.5625rem] font-bold tabular-nums text-accent-text"
+ >
+ {badge}
+ </span>
+ )}
</div>
)
}
diff --git a/client/src/mobile/screens/trip/MTripShell.tsx b/client/src/mobile/screens/trip/MTripShell.tsx
index 61cb96c17..17074abd7 100644
--- a/client/src/mobile/screens/trip/MTripShell.tsx
+++ b/client/src/mobile/screens/trip/MTripShell.tsx
@@ -54,7 +54,7 @@ export type MTripCollabTab = 'chat' | 'notes' | 'links' | 'polls'
* { dayId, note? }), 'accommodation' (payload { dayId?, accId?, from? }),
* 'transport' (payload { reservationId }), 'bract'
* (payload { placeId, dayPicker? }), 'import', 'export', 'members',
- * 'tripedit', 'bags', 'task'. The place inspector keys off the planner's
+ * 'tripedit', 'bags', 'task', 'placesFilter' (the map's places filter). The place inspector keys off the planner's
* place selection instead of a sheet id, and planner-backed editors (place
* form, transport, booking, expense) keep using the planner's own modal flags.
*/
diff --git a/client/src/mobile/screens/trip/map/MMapArea.tsx b/client/src/mobile/screens/trip/map/MMapArea.tsx
index 9e9133834..22004de6d 100644
--- a/client/src/mobile/screens/trip/map/MMapArea.tsx
+++ b/client/src/mobile/screens/trip/map/MMapArea.tsx
@@ -4,6 +4,7 @@ import { MapCompassPill, type CompassMap } from '../../../../components/Map/MapC
import { MAP_LAYER_SWITCHER_INSET, MAP_ROUND_CONTROL_SIZE } from '../../../../components/Map/MapLayerSwitcher'
import { TripRouteOverviewPill, TripRouteOverviewPanel } from '../../../../components/Map/TripRouteOverview'
import { DawarichTrailPill } from '../../../../components/Map/DawarichTrailPill'
+import { MPlacesFilterPill } from './MPlacesFilterPill'
import PoiCategoryPill from '../../../../components/Map/PoiCategoryPill'
import { usePoiExplore } from '../../../../components/Map/usePoiExplore'
import { useMergedMapPois } from '../../../../components/Map/useMergedMapPois'
@@ -452,8 +453,11 @@ export default function MMapArea({ planner, shell }: MMapAreaProps) {
clear of the round-controls band below it and of the base-layer switcher and
the compass, which both sit bottom left. The offset is Tailwind rather than
inline because the compass band is identified by being the one element with
- an inline --bottom-nav-h, and a second would make that ambiguous. */}
- {mapActive && !onStage && (!planner.roadtripActive || planner.dawarichEnabled) && (
+ an inline --bottom-nav-h, and a second would make that ambiguous. The places
+ filter closes the stack, under the toggles, so the overview card stays
+ right above its own toggle: it decides which pins the plan map shows, so it is
+ there whatever else is; the stage draws its own pins and has no use for it. */}
+ {mapActive && !onStage && (
<div className="pointer-events-none absolute left-3 right-3 z-[25] flex flex-col items-end gap-2 bottom-[calc(var(--bottom-nav-h,84px)+58px)]">
{!planner.roadtripActive && planner.overviewActive && (
<TripRouteOverviewPanel
@@ -478,6 +482,7 @@ export default function MMapArea({ planner, shell }: MMapAreaProps) {
onToggle={planner.toggleDawarichTrail}
/>
)}
+ <MPlacesFilterPill onOpen={() => shell.openSheet('placesFilter')} />
</div>
)}
</div>
diff --git a/client/src/mobile/screens/trip/map/MPlacesFilterPill.tsx b/client/src/mobile/screens/trip/map/MPlacesFilterPill.tsx
new file mode 100644
index 000000000..a6f5c41ac
--- /dev/null
+++ b/client/src/mobile/screens/trip/map/MPlacesFilterPill.tsx
@@ -0,0 +1,29 @@
+import { SlidersHorizontal } from 'lucide-react'
+import { MapTogglePill } from '../../../../components/Map/MapTogglePill'
+import { useTripStore } from '../../../../store/tripStore'
+import { countActivePlacesFilters } from '../../../../utils/placesFilter'
+import { useTranslation } from '../../../../i18n'
+
+/**
+ * The phone map's way into the places filter: a round control in the right-hand
+ * stack, lit and badged with how many filters are narrowing the markers. The sheet
+ * it opens is the shell's 'placesFilter' sheet.
+ */
+export function MPlacesFilterPill({ onOpen }: { onOpen: () => void }) {
+ const { t } = useTranslation()
+ const filter = useTripStore(s => s.placesFilter)
+ const categoryFilters = useTripStore(s => s.placesCategoryFilter)
+ const ratingFilter = useTripStore(s => s.placesRatingFilter)
+ const count = countActivePlacesFilters({ filter, categoryFilters, ratingFilter })
+ const label = count > 0 ? `${t('places.filters')} (${count})` : t('places.filters')
+ return (
+ <MapTogglePill
+ active={count > 0}
+ onToggle={onOpen}
+ label={label}
+ badge={count}
+ testId="places-filter-pill"
+ icon={<SlidersHorizontal size={17} strokeWidth={2} />}
+ />
+ )
+}
diff --git a/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx b/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx
index cec484c77..db8d6a21b 100644
--- a/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx
+++ b/client/src/mobile/screens/trip/places/MPlacesBrowser.tsx
@@ -1,6 +1,6 @@
import { ReactNode, useEffect, useMemo, useState } from 'react'
import {
- Bookmark, Check, CheckCheck, CheckCircle2, Download, ListChecks, Loader2, MapPin, Plus,
+ Bookmark, CheckCheck, CheckCircle2, Download, ListChecks, Loader2, Plus,
SlidersHorizontal, Tag, Trash2, X,
} from 'lucide-react'
import MDancingTrek from '../../../components/MDancingTrek'
@@ -22,13 +22,15 @@ import type { Place } from '../../../../types'
import MPlacesBulkCategorySheet from './MPlacesBulkCategorySheet'
import MPlacesSaveToCollectionSheet from './MPlacesSaveToCollectionSheet'
import { filterPool, firstPlannedDayNumbers, plannedPlaceIds } from './placesBrowserModel'
+import { MCategoryFilterList, MRatingFloorChips, SquareCheck } from './MPlacesFilterControls'
/**
* Fullscreen places pool (mode === 'browse'): All/Unplanned/Tracks filter
- * chips, search, the category filter panel, multi-select with the bulk
+ * chips, search, the rating + category filter panel, multi-select with the bulk
* toolbar (delete / category / save to collection) and the place list with
- * DAY badge / quick-add. The pool filter and the category set live in the
- * trip store, so the map markers filter with the exact same values (#1541).
+ * DAY badge / quick-add. The pool filter, the category set and the rating floor
+ * live in the trip store, so the map markers filter with the exact same values
+ * (#1541).
*
* Row taps and quick-add open the 'bract' place-actions sheet via
* shell.openSheet('bract', { placeId, dayPicker }) — the sheet host renders
@@ -44,7 +46,7 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
const filter = useTripStore(s => s.placesFilter)
const setFilter = useTripStore(s => s.setPlacesFilter)
const categoryFilters = useTripStore(s => s.placesCategoryFilter)
- const setCategoryFilters = useTripStore(s => s.setPlacesCategoryFilter)
+ const ratingFilter = useTripStore(s => s.placesRatingFilter)
const [search, setSearch] = useState('')
const [catOpen, setCatOpen] = useState(false)
@@ -74,8 +76,8 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
)
const dayNumberByPlace = useMemo(() => firstPlannedDayNumbers(assignments, days), [assignments, days])
const filtered = useMemo(
- () => filterPool(places, { filter, categoryFilters, search, plannedIds }),
- [places, filter, categoryFilters, search, plannedIds],
+ () => filterPool(places, { filter, categoryFilters, ratingFilter, search, plannedIds }),
+ [places, filter, categoryFilters, ratingFilter, search, plannedIds],
)
// A bulk delete (or a remote edit) can remove selected places — drop the
@@ -126,13 +128,6 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
else setSelectedIds(new Set(filtered.map(p => p.id)))
}
- const toggleCategory = (catId: string) => {
- const next = new Set(categoryFilters)
- if (next.has(catId)) next.delete(catId)
- else next.add(catId)
- setCategoryFilters(next)
- }
-
const openAddPlace = () => {
planner.setEditingPlace(null)
planner.setEditingAssignmentId(null)
@@ -148,7 +143,8 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
shell.openSheet('bract', { placeId: place.id, dayPicker: false })
}
- const hasUncategorized = places.some(p => p.category_id == null)
+ // The panel holds the categories and the rating floor; the badge counts both.
+ const panelFilterCount = categoryFilters.size + (ratingFilter === 'all' ? 0 : 1)
return (
<div className="flex h-full flex-col">
@@ -205,9 +201,9 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
className="relative flex w-[42px] flex-none items-center justify-center rounded-full border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] text-m-muted"
>
<SlidersHorizontal size={15} strokeWidth={2} />
- {categoryFilters.size > 0 && (
+ {panelFilterCount > 0 && (
<span className="absolute -right-[3px] -top-[3px] box-border flex h-4 min-w-[16px] items-center justify-center rounded-full bg-m-act px-1 font-geist text-[0.5625rem] font-bold text-m-actfg">
- {categoryFilters.size}
+ {panelFilterCount}
</span>
)}
</button>
@@ -290,31 +286,13 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
</div>
)}
- {/* ── Category filter panel ── */}
+ {/* ── Rating + category filter panel ── */}
{catOpen && (
<div className="mt-[6px] overflow-hidden rounded-2xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-glass)]">
- {categories.map(c => {
- const CatIcon = getCategoryIcon(c.icon)
- return (
- <CategoryFilterRow
- key={c.id}
- checked={categoryFilters.has(String(c.id))}
- onToggle={() => toggleCategory(String(c.id))}
- label={c.name}
- >
- <CatIcon size={14} strokeWidth={2} className="flex-none" style={{ color: c.color || 'var(--m-muted)' }} />
- </CategoryFilterRow>
- )
- })}
- {hasUncategorized && (
- <CategoryFilterRow
- checked={categoryFilters.has('uncategorized')}
- onToggle={() => toggleCategory('uncategorized')}
- label={t('places.noCategory')}
- >
- <MapPin size={14} strokeWidth={2} className="flex-none text-m-faint" />
- </CategoryFilterRow>
- )}
+ <div className="border-b border-[color:var(--m-rowbr)] px-[13px] py-[10px]">
+ <MRatingFloorChips />
+ </div>
+ <MCategoryFilterList categories={categories} places={places} />
</div>
)}
@@ -329,7 +307,7 @@ export default function MPlacesBrowser({ planner, shell }: MPlacesBrowserProps)
{/* ── Place list ── */}
{filtered.length === 0 ? (
- filter === 'unplanned' && !search && categoryFilters.size === 0 ? (
+ filter === 'unplanned' && !search && categoryFilters.size === 0 && ratingFilter === 'all' ? (
<div className="flex min-h-[60vh] flex-col items-center justify-center px-8 py-10 text-center">
<MDancingTrek scene="idle" mood="happy" className="mb-2" />
<p className="font-geist text-[0.8125rem] font-medium text-m-muted">{t('places.allPlanned')}</p>
@@ -470,37 +448,3 @@ function BulkBtn({ label, onClick, disabled = false, children }: {
</button>
)
}
-
-/** 17px (panel) / 19px (row) square checkbox in the demo's act-fill style. */
-function SquareCheck({ checked, big = false }: { checked: boolean; big?: boolean }) {
- return (
- <span
- className={`flex flex-none items-center justify-center border-[1.5px] ${
- big ? 'h-[19px] w-[19px] rounded-[6px]' : 'h-[17px] w-[17px] rounded-[5px]'
- } ${checked ? 'border-[color:var(--m-act)] bg-m-act text-m-actfg' : 'border-[color:var(--m-trackoff)] text-transparent'}`}
- >
- <Check size={big ? 12 : 11} strokeWidth={3} />
- </span>
- )
-}
-
-function CategoryFilterRow({ checked, onToggle, label, children }: {
- checked: boolean
- onToggle: () => void
- label: string
- children: ReactNode
-}) {
- return (
- <button
- type="button"
- onClick={onToggle}
- role="checkbox"
- aria-checked={checked}
- className="flex w-full items-center gap-[10px] border-b border-[color:var(--m-rowbr)] px-[13px] py-[10px] text-left last:border-b-0"
- >
- <SquareCheck checked={checked} />
- {children}
- <span className="min-w-0 flex-1 truncate text-[0.78125rem] font-medium text-m-ink">{label}</span>
- </button>
- )
-}
diff --git a/client/src/mobile/screens/trip/places/MPlacesFilterControls.tsx b/client/src/mobile/screens/trip/places/MPlacesFilterControls.tsx
new file mode 100644
index 000000000..bb5317d03
--- /dev/null
+++ b/client/src/mobile/screens/trip/places/MPlacesFilterControls.tsx
@@ -0,0 +1,108 @@
+import { ReactNode } from 'react'
+import { Check, MapPin, Star } from 'lucide-react'
+import MChip from '../../../components/MChip'
+import { useTripStore } from '../../../../store/tripStore'
+import { getCategoryIcon } from '../../../../components/shared/categoryIcons'
+import { RATING_FLOORS, UNCATEGORIZED } from '../../../../utils/placesFilter'
+import { useTranslation } from '../../../../i18n'
+import type { Category, Place } from '../../../../types'
+
+/**
+ * The phone's places filter controls, shared by the places browser's filter panel
+ * and the map's filter sheet. Both read and write the trip store, so whichever one
+ * the user touches, the list and the map markers follow (#1541).
+ */
+
+/** 17px (panel) / 19px (row) square checkbox in the demo's act-fill style. */
+export function SquareCheck({ checked, big = false }: { checked: boolean; big?: boolean }) {
+ return (
+ <span
+ className={`flex flex-none items-center justify-center border-[1.5px] ${
+ big ? 'h-[19px] w-[19px] rounded-[6px]' : 'h-[17px] w-[17px] rounded-[5px]'
+ } ${checked ? 'border-[color:var(--m-act)] bg-m-act text-m-actfg' : 'border-[color:var(--m-trackoff)] text-transparent'}`}
+ >
+ <Check size={big ? 12 : 11} strokeWidth={3} />
+ </span>
+ )
+}
+
+function CategoryFilterRow({ checked, onToggle, label, children }: {
+ checked: boolean
+ onToggle: () => void
+ label: string
+ children: ReactNode
+}) {
+ return (
+ <button
+ type="button"
+ onClick={onToggle}
+ role="checkbox"
+ aria-checked={checked}
+ className="flex min-h-[44px] w-full items-center gap-[10px] border-b border-[color:var(--m-rowbr)] px-[13px] py-[10px] text-left last:border-b-0"
+ >
+ <SquareCheck checked={checked} />
+ {children}
+ <span className="min-w-0 flex-1 truncate text-[0.78125rem] font-medium text-m-ink">{label}</span>
+ </button>
+ )
+}
+
+/** The trip's categories as a multi-select, plus "no category" while a place has none. */
+export function MCategoryFilterList({ categories, places }: { categories: Category[]; places: Place[] }) {
+ const { t } = useTranslation()
+ const categoryFilters = useTripStore(s => s.placesCategoryFilter)
+ const setCategoryFilters = useTripStore(s => s.setPlacesCategoryFilter)
+ const toggle = (catId: string) => {
+ const next = new Set(categoryFilters)
+ if (next.has(catId)) next.delete(catId)
+ else next.add(catId)
+ setCategoryFilters(next)
+ }
+ return (
+ <>
+ {categories.map(c => {
+ const CatIcon = getCategoryIcon(c.icon)
+ return (
+ <CategoryFilterRow
+ key={c.id}
+ checked={categoryFilters.has(String(c.id))}
+ onToggle={() => toggle(String(c.id))}
+ label={c.name}
+ >
+ <CatIcon size={14} strokeWidth={2} className="flex-none" style={{ color: c.color || 'var(--m-muted)' }} />
+ </CategoryFilterRow>
+ )
+ })}
+ {places.some(p => p.category_id == null) && (
+ <CategoryFilterRow
+ checked={categoryFilters.has(UNCATEGORIZED)}
+ onToggle={() => toggle(UNCATEGORIZED)}
+ label={t('places.noCategory')}
+ >
+ <MapPin size={14} strokeWidth={2} className="flex-none text-m-faint" />
+ </CategoryFilterRow>
+ )}
+ </>
+ )
+}
+
+/** A minimum of stars, the same floors as the desktop list and the collections bar (#1435). */
+export function MRatingFloorChips() {
+ const { t } = useTranslation()
+ const ratingFilter = useTripStore(s => s.placesRatingFilter)
+ const setRatingFilter = useTripStore(s => s.setPlacesRatingFilter)
+ return (
+ <div role="group" aria-label={t('places.filterByRating')} className="flex flex-wrap gap-[6px]">
+ {RATING_FLOORS.map(floor => (
+ <MChip key={String(floor)} size="tap" active={ratingFilter === floor} onClick={() => setRatingFilter(floor)}>
+ {floor === 'all' ? t('common.all') : (
+ <>
+ <Star size={12} strokeWidth={2.2} fill="currentColor" className="flex-none" />
+ {`${floor}+`}
+ </>
+ )}
+ </MChip>
+ ))}
+ </div>
+ )
+}
diff --git a/client/src/mobile/screens/trip/places/MPlacesFilterSheet.tsx b/client/src/mobile/screens/trip/places/MPlacesFilterSheet.tsx
new file mode 100644
index 000000000..ce558a35f
--- /dev/null
+++ b/client/src/mobile/screens/trip/places/MPlacesFilterSheet.tsx
@@ -0,0 +1,97 @@
+import { RotateCcw, X } from 'lucide-react'
+import MSheet from '../../../components/MSheet'
+import MIconBtn from '../../../components/MIconBtn'
+import MChip from '../../../components/MChip'
+import { useTripStore } from '../../../../store/tripStore'
+import { countActivePlacesFilters } from '../../../../utils/placesFilter'
+import { useTranslation } from '../../../../i18n'
+import type { Category, Place } from '../../../../types'
+import { MCategoryFilterList, MRatingFloorChips } from './MPlacesFilterControls'
+
+interface MPlacesFilterSheetProps {
+ open: boolean
+ onClose: () => void
+ places: Place[]
+ categories: Category[]
+}
+
+/** Uppercase eyebrow over each group of the sheet. */
+function SectionTitle({ children }: { children: string }) {
+ return (
+ <div className="mb-2 font-geist text-[0.625rem] font-bold uppercase tracking-[.09em] text-m-faint">{children}</div>
+ )
+}
+
+/**
+ * The places filter, opened from the phone map: which pool to show, a minimum
+ * rating and the trip's categories, with one button that lifts them all. Every
+ * choice lands in the trip store at once, so the markers behind the sheet and the
+ * places list change with it (#1541). Routed as shell sheet 'placesFilter'.
+ */
+export default function MPlacesFilterSheet({ open, onClose, places, categories }: MPlacesFilterSheetProps) {
+ const { t } = useTranslation()
+ const filter = useTripStore(s => s.placesFilter)
+ const categoryFilters = useTripStore(s => s.placesCategoryFilter)
+ const ratingFilter = useTripStore(s => s.placesRatingFilter)
+ const setFilter = useTripStore(s => s.setPlacesFilter)
+ const resetPlacesFilters = useTripStore(s => s.resetPlacesFilters)
+ const activeCount = countActivePlacesFilters({ filter, categoryFilters, ratingFilter })
+
+ const pools = [
+ { id: 'all', label: t('places.all') },
+ { id: 'unplanned', label: t('places.unplanned') },
+ { id: 'planned', label: t('places.planned') },
+ ]
+ if (places.some(p => p.route_geometry)) pools.push({ id: 'tracks', label: t('places.filterTracks') })
+ const hasCategoryChoice = categories.length > 0 || places.some(p => p.category_id == null)
+
+ return (
+ <MSheet open={open} onClose={onClose} variant="bottom" ariaLabel={t('places.filters')}>
+ <div className="flex flex-none items-center border-b border-[color:var(--m-rowbr)] px-[18px] pb-[11px] pt-4">
+ <div className="min-w-0 flex-1 text-[1.03125rem] font-bold text-m-ink">{t('places.filters')}</div>
+ <MIconBtn variant="neutral" size={34} onClick={onClose} ariaLabel={t('common.close')}>
+ <X size={15} strokeWidth={2.2} />
+ </MIconBtn>
+ </div>
+
+ <div className="min-h-0 flex-1 overflow-y-auto px-[18px] pb-3 pt-[14px]">
+ <section>
+ <SectionTitle>{t('places.filterShow')}</SectionTitle>
+ <div role="group" aria-label={t('places.filterShow')} className="flex flex-wrap gap-[6px]">
+ {pools.map(pool => (
+ <MChip key={pool.id} size="tap" active={filter === pool.id} onClick={() => setFilter(pool.id)}>
+ {pool.label}
+ </MChip>
+ ))}
+ </div>
+ </section>
+
+ <section className="mt-[18px]">
+ <SectionTitle>{t('places.filterByRating')}</SectionTitle>
+ <MRatingFloorChips />
+ </section>
+
+ {hasCategoryChoice && (
+ <section className="mt-[18px]">
+ <SectionTitle>{t('categories.title')}</SectionTitle>
+ <div className="overflow-hidden rounded-2xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)]">
+ <MCategoryFilterList categories={categories} places={places} />
+ </div>
+ </section>
+ )}
+ </div>
+
+ <div className="flex flex-none border-t border-[color:var(--m-rowbr)] px-[18px] py-3">
+ <button
+ type="button"
+ onClick={resetPlacesFilters}
+ disabled={activeCount === 0}
+ className="flex min-h-[44px] flex-1 items-center justify-center gap-2 rounded-full border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] text-[0.8125rem] font-semibold text-m-ink disabled:opacity-40"
+ >
+ <RotateCcw size={14} strokeWidth={2.2} />
+ {t('common.reset')}
+ </button>
+ </div>
+ </MSheet>
+ )
+}
diff --git a/client/src/mobile/screens/trip/sheets/MTripSheets.tsx b/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
index 1ce2053e3..3b3aca377 100644
--- a/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
+++ b/client/src/mobile/screens/trip/sheets/MTripSheets.tsx
@@ -25,6 +25,7 @@ import MNoteSheet, { type MNoteSheetPayload } from './MNoteSheet'
import MImportSheet from './MImportSheet'
import MExportSheet from './MExportSheet'
import MMehrSheet from './MMehrSheet'
+import MPlacesFilterSheet from '../places/MPlacesFilterSheet'
import MRtStopSheet from '../roadtrip/MRtStopSheet'
import MRtStaySheet from '../roadtrip/MRtStaySheet'
import MRtKindSheet from '../roadtrip/MRtKindSheet'
@@ -91,6 +92,12 @@ export default function MTripSheets({ planner, shell }: MTripSheetsProps) {
onClose={shell.closeSheet}
/>
<MImportSheet planner={planner} open={sheet?.id === 'import'} onClose={shell.closeSheet} />
+ <MPlacesFilterSheet
+ open={sheet?.id === 'placesFilter'}
+ onClose={shell.closeSheet}
+ places={planner.places}
+ categories={planner.categories}
+ />
{/* ── Planner-flag editors (also serve ?create= and the import review) ── */}
<MPlaceEditSheet planner={planner} onOpenExpense={openBookingExpense} />
diff --git a/client/tests/unit/mobile/trip/MMapArea.test.tsx b/client/tests/unit/mobile/trip/MMapArea.test.tsx
index 3912e62c0..ef683de0a 100644
--- a/client/tests/unit/mobile/trip/MMapArea.test.tsx
+++ b/client/tests/unit/mobile/trip/MMapArea.test.tsx
@@ -17,7 +17,7 @@ import { openLeg } from '../../../helpers/legAlternatives'
import { RT_ALT_BAR_LIFT } from '../../../../src/mobile/screens/trip/roadtrip/useMRtAlternatives'
import { corePoiCategories, pluginPoiCategories } from '../../../../src/components/Map/usePoiCategories'
-// FE-MOB-MAPAREA-001 to FE-MOB-MAPAREA-045
+// FE-MOB-MAPAREA-001 to FE-MOB-MAPAREA-048
//
// The stage's pins come out of the trip store rather than the planner's map list, so the
// stage fixtures seed the store and leave `mapPlaces` to stand for what the plan tab shows.
@@ -183,7 +183,7 @@ beforeEach(() => {
moved: false, toggle: vi.fn(), searchArea: vi.fn(), onViewportChange: vi.fn(),
}
useSettingsStore.setState(s => ({ settings: { ...s.settings, map_poi_pill_enabled: true } }))
- seedStore(useTripStore, { places: [], placesFilter: 'all', placesCategoryFilter: new Set<string>() })
+ seedStore(useTripStore, { places: [], placesFilter: 'all', placesCategoryFilter: new Set<string>(), placesRatingFilter: 'all' })
})
describe('MMapArea', () => {
@@ -952,3 +952,30 @@ describe('MMapArea and a booked night at the edge of the stage', () => {
expect(mocks.poi.toggle).toHaveBeenCalledWith('plugin:trail-finder/trailheads')
})
})
+
+describe('MMapArea — places filter', () => {
+ it('FE-MOB-MAPAREA-046: the plan map offers the places filter, and a tap opens its sheet', () => {
+ const { shell } = renderArea({ trTab: 'plan' })
+ const pill = screen.getByTestId('places-filter-pill')
+ expect(pill).toHaveAccessibleName('Filters')
+ expect(pill).toHaveAttribute('aria-pressed', 'false')
+ act(() => { pill.click() })
+ expect(shell.openSheet).toHaveBeenCalledWith('placesFilter')
+ })
+
+ it('FE-MOB-MAPAREA-047: the pill lights up and counts the filters narrowing the pins', () => {
+ seedStore(useTripStore, { placesFilter: 'unplanned', placesRatingFilter: 4 })
+ renderArea({ trTab: 'plan' })
+ const pill = screen.getByTestId('places-filter-pill')
+ expect(pill).toHaveAttribute('aria-pressed', 'true')
+ expect(pill).toHaveAccessibleName('Filters (2)')
+ expect(screen.getByText('2')).toHaveAttribute('aria-hidden', 'true')
+ })
+
+ it('FE-MOB-MAPAREA-048: the stage draws its own pins, so it has no places filter, and neither has a covered map', () => {
+ renderArea({ trTab: 'roadtrip', mapFront: true })
+ expect(screen.queryByTestId('places-filter-pill')).not.toBeInTheDocument()
+ renderArea({ view: 'plan', mapFront: false })
+ expect(screen.queryByTestId('places-filter-pill')).not.toBeInTheDocument()
+ })
+})
diff --git a/client/tests/unit/mobile/trip/MPlacesBrowser.test.tsx b/client/tests/unit/mobile/trip/MPlacesBrowser.test.tsx
index 49a192689..a2e352d6a 100644
--- a/client/tests/unit/mobile/trip/MPlacesBrowser.test.tsx
+++ b/client/tests/unit/mobile/trip/MPlacesBrowser.test.tsx
@@ -1,5 +1,5 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
-import { act, fireEvent, render, screen, waitFor } from '../../../helpers/render'
+import { act, fireEvent, render, screen, waitFor, within } from '../../../helpers/render'
import { buildPlanner, buildShell } from '../../../helpers/mobileTrip'
import MPlacesBrowser from '../../../../src/mobile/screens/trip/places/MPlacesBrowser'
import { collectionsApi } from '../../../../src/api/collections'
@@ -10,7 +10,7 @@ import { resetAllStores, seedStore } from '../../../helpers/store'
import type { MTripShellApi, TripPlanner } from '../../../../src/mobile/screens/trip/MTripShell'
import type { AssignmentsMap, Category, Day, Place } from '../../../../src/types'
-// FE-MOB-PBROW-001 to FE-MOB-PBROW-031
+// FE-MOB-PBROW-001 to FE-MOB-PBROW-034
const CATEGORIES = [
{ id: 1, name: 'Sights', color: '#123456', icon: 'landmark' },
@@ -168,10 +168,37 @@ describe('MPlacesBrowser', () => {
expect(useTripStore.getState().placesCategoryFilter.size).toBe(0)
})
+ it('FE-MOB-PBROW-032: the panel rating floor narrows the list, badges the button and lands in the store', () => {
+ const planner = makePlanner({
+ places: [{ ...LOUVRE, rating_avg: 4.5 }, { ...EIFFEL, rating_avg: 3 }, SEINE],
+ } as Partial<TripPlanner>)
+ renderBrowser(planner)
+ const panelBtn = screen.getByRole('button', { name: 'places.allCategories' })
+ fireEvent.click(panelBtn)
+ const floors = screen.getByRole('group', { name: 'Filter by rating' })
+ fireEvent.click(within(floors).getByRole('button', { name: '4+' }))
+ expect(useTripStore.getState().placesRatingFilter).toBe(4)
+ expect(screen.getByText('Louvre')).toBeInTheDocument()
+ expect(screen.queryByText('Eiffel Tower')).not.toBeInTheDocument()
+ expect(screen.queryByText('Seine Track')).not.toBeInTheDocument()
+ expect(panelBtn).toHaveTextContent('1')
+
+ fireEvent.click(within(floors).getByRole('button', { name: 'All' }))
+ expect(useTripStore.getState().placesRatingFilter).toBe('all')
+ expect(screen.getByText('Seine Track')).toBeInTheDocument()
+ })
+
+ it('FE-MOB-PBROW-033: a floor set from the map sheet already thins the list on arrival', () => {
+ seedStore(useTripStore, { placesRatingFilter: 5 })
+ renderBrowser(makePlanner({ places: [{ ...LOUVRE, rating_avg: 5 }, EIFFEL] } as Partial<TripPlanner>))
+ expect(screen.getByText('Louvre')).toBeInTheDocument()
+ expect(screen.queryByText('Eiffel Tower')).not.toBeInTheDocument()
+ })
+
it('FE-MOB-PBROW-011: the uncategorized row filters the places without a category', () => {
renderBrowser()
fireEvent.click(screen.getByRole('button', { name: 'places.allCategories' }))
- fireEvent.click(screen.getByRole('checkbox', { name: 'places.noCategory' }))
+ fireEvent.click(screen.getByRole('checkbox', { name: 'No Category' }))
expect([...useTripStore.getState().placesCategoryFilter]).toEqual(['uncategorized'])
expect(screen.getByText('Eiffel Tower')).toBeInTheDocument()
expect(screen.queryByText('Louvre')).not.toBeInTheDocument()
@@ -181,7 +208,7 @@ describe('MPlacesBrowser', () => {
const planner = makePlanner({ places: [LOUVRE, SEINE] } as Partial<TripPlanner>)
renderBrowser(planner)
fireEvent.click(screen.getByRole('button', { name: 'places.allCategories' }))
- expect(screen.queryByRole('checkbox', { name: 'places.noCategory' })).not.toBeInTheDocument()
+ expect(screen.queryByRole('checkbox', { name: 'No Category' })).not.toBeInTheDocument()
expect(screen.getByRole('checkbox', { name: 'Food' })).toBeInTheDocument()
})
@@ -362,6 +389,13 @@ describe('MPlacesBrowser', () => {
expect(screen.queryByText('places.noneFound')).not.toBeInTheDocument()
})
+ it('FE-MOB-PBROW-034: an unplanned pool emptied by the rating floor reports no matches, not "all planned"', () => {
+ seedStore(useTripStore, { placesRatingFilter: 5 })
+ renderBrowser(makePlanner({ places: [EIFFEL] } as Partial<TripPlanner>), buildShell({ browseFromEdit: true }))
+ expect(screen.getByText('places.noneFound')).toBeInTheDocument()
+ expect(screen.queryByText('places.allPlanned')).not.toBeInTheDocument()
+ })
+
it('FE-MOB-PBROW-028: a search without hits reports no matches', () => {
renderBrowser()
fireEvent.change(screen.getByPlaceholderText('places.search'), { target: { value: 'zzz' } })
diff --git a/client/tests/unit/mobile/trip/MPlacesFilterSheet.test.tsx b/client/tests/unit/mobile/trip/MPlacesFilterSheet.test.tsx
new file mode 100644
index 000000000..4e878684b
--- /dev/null
+++ b/client/tests/unit/mobile/trip/MPlacesFilterSheet.test.tsx
@@ -0,0 +1,112 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest'
+import { fireEvent, render, screen, within } from '../../../helpers/render'
+import MPlacesFilterSheet from '../../../../src/mobile/screens/trip/places/MPlacesFilterSheet'
+import { useTripStore } from '../../../../src/store/tripStore'
+import { resetAllStores, seedStore } from '../../../helpers/store'
+import { buildPlace } from '../../../helpers/factories'
+import type { Category, Place } from '../../../../src/types'
+
+// FE-MOB-PFSHEET-001 to FE-MOB-PFSHEET-009
+
+const CATEGORIES = [
+ { id: 1, name: 'Sights', color: '#123456', icon: 'landmark' },
+ { id: 2, name: 'Food', color: '', icon: 'utensils' },
+] as unknown as Category[]
+
+const TAGGED = buildPlace({ id: 1, category_id: 1 })
+const BARE = buildPlace({ id: 2, category_id: null })
+const TRACK = buildPlace({ id: 3, category_id: 2, route_geometry: '[[1,2],[3,4]]' })
+
+function renderSheet({ places = [TAGGED, BARE], categories = CATEGORIES, open = true }: {
+ places?: Place[]
+ categories?: Category[]
+ open?: boolean
+} = {}) {
+ const onClose = vi.fn()
+ render(<MPlacesFilterSheet open={open} onClose={onClose} places={places} categories={categories} />)
+ return { onClose }
+}
+
+const group = (name: string) => screen.getByRole('group', { name })
+
+describe('MPlacesFilterSheet', () => {
+ beforeEach(() => {
+ resetAllStores()
+ })
+
+ it('FE-MOB-PFSHEET-001: shows the pool, the rating floors and the categories under one title', async () => {
+ renderSheet()
+ const sheet = await screen.findByRole('dialog', { name: 'Filters' })
+ expect(within(sheet).getByText('Show')).toBeInTheDocument()
+ expect(within(group('Show')).getAllByRole('button').map(b => b.textContent)).toEqual(['All', 'Unplanned', 'Planned'])
+ expect(within(group('Filter by rating')).getAllByRole('button').map(b => b.textContent))
+ .toEqual(['All', '5+', '4+', '3+', '2+', '1+'])
+ expect(screen.getByRole('checkbox', { name: 'Sights' })).toBeInTheDocument()
+ expect(screen.getByRole('checkbox', { name: 'Food' })).toBeInTheDocument()
+ expect(screen.getByRole('checkbox', { name: 'No Category' })).toBeInTheDocument()
+ })
+
+ it('FE-MOB-PFSHEET-002: the tracks pool only shows once a place carries a track', async () => {
+ renderSheet({ places: [TAGGED, TRACK] })
+ await screen.findByRole('dialog', { name: 'Filters' })
+ expect(within(group('Show')).getByRole('button', { name: 'Tracks' })).toBeInTheDocument()
+ expect(screen.queryByRole('checkbox', { name: 'No Category' })).not.toBeInTheDocument()
+ })
+
+ it('FE-MOB-PFSHEET-003: picking a pool writes it to the trip store', async () => {
+ renderSheet()
+ await screen.findByRole('dialog', { name: 'Filters' })
+ fireEvent.click(within(group('Show')).getByRole('button', { name: 'Unplanned' }))
+ expect(useTripStore.getState().placesFilter).toBe('unplanned')
+ })
+
+ it('FE-MOB-PFSHEET-004: picking a floor writes the rating filter to the trip store', async () => {
+ renderSheet()
+ await screen.findByRole('dialog', { name: 'Filters' })
+ fireEvent.click(within(group('Filter by rating')).getByRole('button', { name: '3+' }))
+ expect(useTripStore.getState().placesRatingFilter).toBe(3)
+ })
+
+ it('FE-MOB-PFSHEET-005: categories toggle in and out of the shared set, "no category" included', async () => {
+ renderSheet()
+ await screen.findByRole('dialog', { name: 'Filters' })
+ fireEvent.click(screen.getByRole('checkbox', { name: 'Food' }))
+ fireEvent.click(screen.getByRole('checkbox', { name: 'No Category' }))
+ expect([...useTripStore.getState().placesCategoryFilter]).toEqual(['2', 'uncategorized'])
+ expect(screen.getByRole('checkbox', { name: 'Food' })).toHaveAttribute('aria-checked', 'true')
+ fireEvent.click(screen.getByRole('checkbox', { name: 'Food' }))
+ expect([...useTripStore.getState().placesCategoryFilter]).toEqual(['uncategorized'])
+ })
+
+ it('FE-MOB-PFSHEET-006: reset lifts every filter, and stays off while nothing filters', async () => {
+ seedStore(useTripStore, { placesFilter: 'planned', placesCategoryFilter: new Set(['1']), placesRatingFilter: 5 })
+ renderSheet()
+ await screen.findByRole('dialog', { name: 'Filters' })
+ const reset = screen.getByRole('button', { name: 'Reset' })
+ expect(reset).toBeEnabled()
+ fireEvent.click(reset)
+ const s = useTripStore.getState()
+ expect(s.placesFilter).toBe('all')
+ expect(s.placesCategoryFilter.size).toBe(0)
+ expect(s.placesRatingFilter).toBe('all')
+ expect(screen.getByRole('button', { name: 'Reset' })).toBeDisabled()
+ })
+
+ it('FE-MOB-PFSHEET-007: without any category to choose, the categories section is left out', async () => {
+ renderSheet({ places: [TAGGED], categories: [] })
+ const sheet = await screen.findByRole('dialog', { name: 'Filters' })
+ expect(within(sheet).queryByText('Categories')).not.toBeInTheDocument()
+ expect(screen.queryByRole('checkbox')).not.toBeInTheDocument()
+ })
+
+ it('FE-MOB-PFSHEET-008: the close button hands back to the caller', async () => {
+ const { onClose } = renderSheet()
+ fireEvent.click(within(await screen.findByRole('dialog', { name: 'Filters' })).getByRole('button', { name: 'Close' }))
+ expect(onClose).toHaveBeenCalledTimes(1)
+ })
+
+ it('FE-MOB-PFSHEET-009: nothing is rendered while closed', () => {
+ renderSheet({ open: false })
+ expect(screen.queryByRole('dialog', { name: 'Filters' })).not.toBeInTheDocument()
+ })
+})
diff --git a/client/tests/unit/mobile/trip/MTripSheets.test.tsx b/client/tests/unit/mobile/trip/MTripSheets.test.tsx
index 4d303407d..2c189a1c8 100644
--- a/client/tests/unit/mobile/trip/MTripSheets.test.tsx
+++ b/client/tests/unit/mobile/trip/MTripSheets.test.tsx
@@ -10,9 +10,9 @@ import { useSettingsStore } from '../../../../src/store/settingsStore'
import { useTripStore } from '../../../../src/store/tripStore'
import { buildPlanner, buildShell } from '../../../helpers/mobileTrip'
import { resetAllStores, seedStore } from '../../../helpers/store'
-import { fireEvent, render, screen, waitFor } from '../../../helpers/render'
+import { fireEvent, render, screen, waitFor, within } from '../../../helpers/render'
-// FE-MOB-SHOST-001 to FE-MOB-SHOST-029 and FE-MOB-SHOST-032 (030 and 031 live in MTripSheets.members.test.tsx)
+// FE-MOB-SHOST-001 to FE-MOB-SHOST-029, FE-MOB-SHOST-032 and FE-MOB-SHOST-033 (030 and 031 live in MTripSheets.members.test.tsx)
//
// Every child sheet is stubbed: this file is about the host — which sheet is
// mounted for which shell.sheet id, and how the host's own callbacks wire the
@@ -237,6 +237,18 @@ describe('MTripSheets', () => {
}
})
+ it('FE-MOB-SHOST-033: the map\'s places filter opens for its own id and closes through the shell', async () => {
+ const { shell } = renderHost({}, { sheet: { id: 'placesFilter' } })
+ const sheet = await screen.findByRole('dialog', { name: 'Filters' })
+ fireEvent.click(within(sheet).getByRole('button', { name: 'Close' }))
+ expect(shell.closeSheet).toHaveBeenCalledTimes(1)
+ })
+
+ it('FE-MOB-SHOST-033b: no places filter while another sheet is open', () => {
+ renderHost({}, { sheet: { id: 'day' } })
+ expect(screen.queryByRole('dialog', { name: 'Filters' })).not.toBeInTheDocument()
+ })
+
it('FE-MOB-SHOST-004: hands the note payload to the note sheet and only for that id', () => {
renderHost({}, { sheet: { id: 'note', payload: { dayId: 4 } } })
expect(screen.getByTestId('stub-note')).toHaveAttribute('data-day', '4')
diff --git a/shared/src/i18n/ar/places.ts b/shared/src/i18n/ar/places.ts
index f02ee24d3..1ab17583e 100644
--- a/shared/src/i18n/ar/places.ts
+++ b/shared/src/i18n/ar/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'تصفية حسب البلد أو المنطقة',
'places.allLocations': 'كل الدول',
'places.filterShow': 'عرض',
+ 'places.filters': 'عوامل التصفية',
'places.clearSearch': 'مسح البحث',
'places.yourRating': 'تقييمك',
'places.notRated': 'لم يُقيَّم بعد',
diff --git a/shared/src/i18n/az/places.ts b/shared/src/i18n/az/places.ts
index 0aaef1e94..1fdfe4332 100644
--- a/shared/src/i18n/az/places.ts
+++ b/shared/src/i18n/az/places.ts
@@ -70,6 +70,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Ölkə və ya regiona görə filtrlə',
'places.allLocations': 'Bütün ölkələr',
'places.filterShow': 'Göstər',
+ 'places.filters': 'Filtrlər',
'places.clearSearch': 'Axtarışı təmizlə',
'places.yourRating': 'Sizin reytinqiniz',
'places.notRated': 'Hələ qiymətləndirilməyib',
diff --git a/shared/src/i18n/br/places.ts b/shared/src/i18n/br/places.ts
index 264628d38..fa5fb5e4e 100644
--- a/shared/src/i18n/br/places.ts
+++ b/shared/src/i18n/br/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrar por país ou região',
'places.allLocations': 'Todos os países',
'places.filterShow': 'Mostrar',
+ 'places.filters': 'Siloù',
'places.clearSearch': 'Limpar busca',
'places.yourRating': 'Sua avaliação',
'places.notRated': 'Ainda sem avaliações',
diff --git a/shared/src/i18n/ca/places.ts b/shared/src/i18n/ca/places.ts
index 078ec5c50..f68f3bca8 100644
--- a/shared/src/i18n/ca/places.ts
+++ b/shared/src/i18n/ca/places.ts
@@ -60,6 +60,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtra per país o regió',
'places.allLocations': 'Tots els països',
'places.filterShow': 'Mostrar',
+ 'places.filters': 'Filtres',
'places.clearSearch': 'Esborra la cerca',
'places.yourRating': 'La teva valoració',
'places.notRated': 'Encara sense valoració',
diff --git a/shared/src/i18n/cs/places.ts b/shared/src/i18n/cs/places.ts
index 032c413a0..abc4656ad 100644
--- a/shared/src/i18n/cs/places.ts
+++ b/shared/src/i18n/cs/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrovat podle země nebo regionu',
'places.allLocations': 'Všechny země',
'places.filterShow': 'Zobrazit',
+ 'places.filters': 'Filtry',
'places.clearSearch': 'Vymazat hledání',
'places.yourRating': 'Tvé hodnocení',
'places.notRated': 'Zatím bez hodnocení',
diff --git a/shared/src/i18n/de/places.ts b/shared/src/i18n/de/places.ts
index 5f1e62caf..d16b51d76 100644
--- a/shared/src/i18n/de/places.ts
+++ b/shared/src/i18n/de/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Nach Land oder Region filtern',
'places.allLocations': 'Alle Länder',
'places.filterShow': 'Anzeigen',
+ 'places.filters': 'Filter',
'places.clearSearch': 'Suche leeren',
'places.yourRating': 'Deine Bewertung',
'places.notRated': 'Noch nicht bewertet',
diff --git a/shared/src/i18n/en/places.ts b/shared/src/i18n/en/places.ts
index bd483125a..33241eb1d 100644
--- a/shared/src/i18n/en/places.ts
+++ b/shared/src/i18n/en/places.ts
@@ -64,6 +64,8 @@ const places: TranslationStrings = {
/** The button that opens the filter panel, and the panel's name. */
/** Label over the all/unplanned/planned/tracks choice in the filter panel. */
'places.filterShow': 'Show',
+ /** The phone map's button that opens the places filter sheet, and the sheet's title. */
+ 'places.filters': 'Filters',
'places.clearSearch': 'Clear search',
'places.yourRating': 'Your rating',
'places.notRated': 'Not rated yet',
diff --git a/shared/src/i18n/es/places.ts b/shared/src/i18n/es/places.ts
index 750b76092..49dbf1a39 100644
--- a/shared/src/i18n/es/places.ts
+++ b/shared/src/i18n/es/places.ts
@@ -62,6 +62,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrar por país o región',
'places.allLocations': 'Todos los países',
'places.filterShow': 'Mostrar',
+ 'places.filters': 'Filtros',
'places.clearSearch': 'Borrar búsqueda',
'places.yourRating': 'Tu valoración',
'places.notRated': 'Sin valorar todavía',
diff --git a/shared/src/i18n/et/places.ts b/shared/src/i18n/et/places.ts
index 1d24bd472..19d52bb72 100644
--- a/shared/src/i18n/et/places.ts
+++ b/shared/src/i18n/et/places.ts
@@ -62,6 +62,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtreeri riigi või piirkonna järgi',
'places.allLocations': 'Kõik riigid',
'places.filterShow': 'Näita',
+ 'places.filters': 'Filtrid',
'places.clearSearch': 'Tühjenda otsing',
'places.yourRating': 'Sinu hinnang',
'places.notRated': 'Veel hindamata',
diff --git a/shared/src/i18n/fr/places.ts b/shared/src/i18n/fr/places.ts
index 80730f335..97238e2d7 100644
--- a/shared/src/i18n/fr/places.ts
+++ b/shared/src/i18n/fr/places.ts
@@ -62,6 +62,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrer par pays ou région',
'places.allLocations': 'Tous les pays',
'places.filterShow': 'Afficher',
+ 'places.filters': 'Filtres',
'places.clearSearch': 'Effacer la recherche',
'places.yourRating': 'Ta note',
'places.notRated': 'Pas encore noté',
diff --git a/shared/src/i18n/gr/places.ts b/shared/src/i18n/gr/places.ts
index 10ca96197..498af63f5 100644
--- a/shared/src/i18n/gr/places.ts
+++ b/shared/src/i18n/gr/places.ts
@@ -62,6 +62,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Φιλτράρισμα ανά χώρα ή περιοχή',
'places.allLocations': 'Όλες οι χώρες',
'places.filterShow': 'Εμφάνιση',
+ 'places.filters': 'Φίλτρα',
'places.clearSearch': 'Καθαρισμός αναζήτησης',
'places.yourRating': 'Η βαθμολογία σου',
'places.notRated': 'Χωρίς βαθμολογία ακόμη',
diff --git a/shared/src/i18n/hu/places.ts b/shared/src/i18n/hu/places.ts
index 42f3017cc..7f44a986a 100644
--- a/shared/src/i18n/hu/places.ts
+++ b/shared/src/i18n/hu/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Szűrés ország vagy régió szerint',
'places.allLocations': 'Minden ország',
'places.filterShow': 'Megjelenítés',
+ 'places.filters': 'Szűrők',
'places.clearSearch': 'Keresés törlése',
'places.yourRating': 'Az értékelésed',
'places.notRated': 'Még nincs értékelve',
diff --git a/shared/src/i18n/id/places.ts b/shared/src/i18n/id/places.ts
index db53829ab..1a804f524 100644
--- a/shared/src/i18n/id/places.ts
+++ b/shared/src/i18n/id/places.ts
@@ -60,6 +60,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Saring menurut negara atau wilayah',
'places.allLocations': 'Semua negara',
'places.filterShow': 'Tampilkan',
+ 'places.filters': 'Filter',
'places.clearSearch': 'Hapus pencarian',
'places.yourRating': 'Rating kamu',
'places.notRated': 'Belum dinilai',
diff --git a/shared/src/i18n/it/places.ts b/shared/src/i18n/it/places.ts
index e69726f88..b917c03be 100644
--- a/shared/src/i18n/it/places.ts
+++ b/shared/src/i18n/it/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtra per paese o regione',
'places.allLocations': 'Tutti i paesi',
'places.filterShow': 'Mostra',
+ 'places.filters': 'Filtri',
'places.clearSearch': 'Cancella ricerca',
'places.yourRating': 'La tua valutazione',
'places.notRated': 'Non ancora valutato',
diff --git a/shared/src/i18n/ja/places.ts b/shared/src/i18n/ja/places.ts
index 711a9f85e..7f35bc3bf 100644
--- a/shared/src/i18n/ja/places.ts
+++ b/shared/src/i18n/ja/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': '国または地域で絞り込む',
'places.allLocations': 'すべての国',
'places.filterShow': '表示',
+ 'places.filters': 'フィルター',
'places.clearSearch': '検索をクリア',
'places.yourRating': 'あなたの評価',
'places.notRated': '未評価',
diff --git a/shared/src/i18n/ko/places.ts b/shared/src/i18n/ko/places.ts
index 1373a7524..348332064 100644
--- a/shared/src/i18n/ko/places.ts
+++ b/shared/src/i18n/ko/places.ts
@@ -60,6 +60,7 @@ const places: TranslationStrings = {
'places.filterByLocation': '국가 또는 지역으로 필터링',
'places.allLocations': '모든 국가',
'places.filterShow': '표시',
+ 'places.filters': '필터',
'places.clearSearch': '검색 지우기',
'places.yourRating': '내 평점',
'places.notRated': '아직 평점 없음',
diff --git a/shared/src/i18n/nl/places.ts b/shared/src/i18n/nl/places.ts
index 7ba46c47f..86849da59 100644
--- a/shared/src/i18n/nl/places.ts
+++ b/shared/src/i18n/nl/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filteren op land of regio',
'places.allLocations': 'Alle landen',
'places.filterShow': 'Tonen',
+ 'places.filters': 'Filters',
'places.clearSearch': 'Zoekopdracht wissen',
'places.yourRating': 'Jouw beoordeling',
'places.notRated': 'Nog niet beoordeeld',
diff --git a/shared/src/i18n/pl/places.ts b/shared/src/i18n/pl/places.ts
index eb721e9c0..2b329514f 100644
--- a/shared/src/i18n/pl/places.ts
+++ b/shared/src/i18n/pl/places.ts
@@ -51,6 +51,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtruj według kraju lub regionu',
'places.allLocations': 'Wszystkie kraje',
'places.filterShow': 'Pokaż',
+ 'places.filters': 'Filtry',
'places.clearSearch': 'Wyczyść wyszukiwanie',
'places.yourRating': 'Twoja ocena',
'places.notRated': 'Jeszcze nie oceniono',
diff --git a/shared/src/i18n/ru/places.ts b/shared/src/i18n/ru/places.ts
index fae8ba678..b96d20cd2 100644
--- a/shared/src/i18n/ru/places.ts
+++ b/shared/src/i18n/ru/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Фильтр по стране или региону',
'places.allLocations': 'Все страны',
'places.filterShow': 'Показать',
+ 'places.filters': 'Фильтры',
'places.clearSearch': 'Очистить поиск',
'places.yourRating': 'Твоя оценка',
'places.notRated': 'Ещё нет оценок',
diff --git a/shared/src/i18n/sk/places.ts b/shared/src/i18n/sk/places.ts
index 21f7e7d81..08418207a 100644
--- a/shared/src/i18n/sk/places.ts
+++ b/shared/src/i18n/sk/places.ts
@@ -62,6 +62,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrovať podľa krajiny alebo regiónu',
'places.allLocations': 'Všetky krajiny',
'places.filterShow': 'Zobraziť',
+ 'places.filters': 'Filtre',
'places.clearSearch': 'Vymazať hľadanie',
'places.yourRating': 'Vaše hodnotenie',
'places.notRated': 'Zatiaľ bez hodnotenia',
diff --git a/shared/src/i18n/sv/places.ts b/shared/src/i18n/sv/places.ts
index 86675fae1..748cd9b8c 100644
--- a/shared/src/i18n/sv/places.ts
+++ b/shared/src/i18n/sv/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Filtrera efter land eller region',
'places.allLocations': 'Alla länder',
'places.filterShow': 'Visa',
+ 'places.filters': 'Filter',
'places.clearSearch': 'Rensa sökning',
'places.yourRating': 'Ditt betyg',
'places.notRated': 'Inte betygsatt ännu',
diff --git a/shared/src/i18n/th/places.ts b/shared/src/i18n/th/places.ts
index 46beee441..11a45cdf4 100644
--- a/shared/src/i18n/th/places.ts
+++ b/shared/src/i18n/th/places.ts
@@ -55,6 +55,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'กรองตามประเทศหรือภูมิภาค',
'places.allLocations': 'ทุกประเทศ',
'places.filterShow': 'แสดง',
+ 'places.filters': 'ตัวกรอง',
'places.clearSearch': 'ล้างการค้นหา',
'places.yourRating': 'คะแนนของคุณ',
'places.notRated': 'ยังไม่ได้รับการจัดอันดับ',
diff --git a/shared/src/i18n/tr/places.ts b/shared/src/i18n/tr/places.ts
index a8c0ea971..ae125af18 100644
--- a/shared/src/i18n/tr/places.ts
+++ b/shared/src/i18n/tr/places.ts
@@ -63,6 +63,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Ülke veya bölgeye göre filtrele',
'places.allLocations': 'Tüm ülkeler',
'places.filterShow': 'Göster',
+ 'places.filters': 'Filtreler',
'places.clearSearch': 'Aramayı temizle',
'places.yourRating': 'Senin puanın',
'places.notRated': 'Henüz puanlanmadı',
diff --git a/shared/src/i18n/uk/places.ts b/shared/src/i18n/uk/places.ts
index df379f2d9..d6ab8b737 100644
--- a/shared/src/i18n/uk/places.ts
+++ b/shared/src/i18n/uk/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Фільтр за країною або регіоном',
'places.allLocations': 'Усі країни',
'places.filterShow': 'Показати',
+ 'places.filters': 'Фільтри',
'places.clearSearch': 'Очистити пошук',
'places.yourRating': 'Твоя оцінка',
'places.notRated': 'Ще не оцінено',
diff --git a/shared/src/i18n/vi/places.ts b/shared/src/i18n/vi/places.ts
index b3e5e6293..411e6d7d4 100644
--- a/shared/src/i18n/vi/places.ts
+++ b/shared/src/i18n/vi/places.ts
@@ -61,6 +61,7 @@ const places: TranslationStrings = {
'places.filterByLocation': 'Lọc theo quốc gia hoặc vùng',
'places.allLocations': 'Tất cả quốc gia',
'places.filterShow': 'Hiển thị',
+ 'places.filters': 'Bộ lọc',
'places.clearSearch': 'Xóa tìm kiếm',
'places.yourRating': 'Đánh giá của bạn',
'places.notRated': 'Chưa có đánh giá',
diff --git a/shared/src/i18n/zh-TW/places.ts b/shared/src/i18n/zh-TW/places.ts
index fd25d62b2..646a8cf3b 100644
--- a/shared/src/i18n/zh-TW/places.ts
+++ b/shared/src/i18n/zh-TW/places.ts
@@ -60,6 +60,7 @@ const places: TranslationStrings = {
'places.filterByLocation': '依國家或地區篩選',
'places.allLocations': '所有國家',
'places.filterShow': '顯示',
+ 'places.filters': '篩選',
'places.clearSearch': '清除搜尋',
'places.yourRating': '你的評分',
'places.notRated': '尚未評分',
diff --git a/shared/src/i18n/zh/places.ts b/shared/src/i18n/zh/places.ts
index a5a78d658..c1f4dbde1 100644
--- a/shared/src/i18n/zh/places.ts
+++ b/shared/src/i18n/zh/places.ts
@@ -60,6 +60,7 @@ const places: TranslationStrings = {
'places.filterByLocation': '按国家或地区筛选',
'places.allLocations': '所有国家',
'places.filterShow': '显示',
+ 'places.filters': '筛选',
'places.clearSearch': '清除搜索',
'places.yourRating': '你的评分',
'places.notRated': '暂无评分',