feat(places): add a place straight into the day that is open

The places pool sits one click away from the plan, and a place you already know
belongs to today had to go through the day picker afterwards to get there. With
a day open, the add button splits: the left half still opens an empty form, the
right half opens one that assigns the place to that day on save.

The plumbing was already there. placeFormDayId has assigned a freshly created
place to a day since #1998; nothing in the places rail ever set it.

The main label shortens to "New place" while the split is out, so both buttons
fit side by side in the rail without either one truncating. The second button
stays mounted and collapsed rather than unmounted, so it has something to
animate out of: width, padding and opacity over 180ms, and nothing at all under
prefers-reduced-motion. Collapsed it is also out of the tab order and hidden
from screen readers, because a zero-width button is still focusable otherwise.

Both columns of the place form are 320px now. Two panels of different widths
flanking one form read as a mistake rather than as a hierarchy, and neither of
them is the more important one.
This commit is contained in:
Maurice
2026-09-08 17:35:40 +02:00
committed by Maurice
parent 900e4806ad
commit 9fa0ceaf49
29 changed files with 172 additions and 17 deletions
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'إضافة مكان/نشاط',
'places.addToSelectedDay': 'أضف إلى اليوم المفتوح',
'places.addPlaceShort': 'مكان جديد',
'places.addToDayShort': 'إلى اليوم',
'places.importFile': 'استيراد ملف',
'places.trackIndicator': 'مسار / طريق',
'places.sidebarDrop': 'أفلت للاستيراد',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Adicionar lugar/atividade',
'places.addToSelectedDay': 'Adicionar ao dia aberto',
'places.addPlaceShort': 'Novo local',
'places.addToDayShort': 'Para o dia',
'places.importFile': 'Importar arquivo',
'places.trackIndicator': 'Trilha / rota',
'places.sidebarDrop': 'Solte para importar',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Afegeix un lloc / activitat',
'places.addToSelectedDay': 'Afegeix al dia obert',
'places.addPlaceShort': 'Lloc nou',
'places.addToDayShort': 'Al dia',
'places.importFile': 'Importa un fitxer',
'places.trackIndicator': 'Track / ruta',
'places.sidebarDrop': 'Deixa anar per importar',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Přidat místo/aktivitu',
'places.addToSelectedDay': 'Přidat k otevřenému dni',
'places.addPlaceShort': 'Nové místo',
'places.addToDayShort': 'Ke dni',
'places.importFile': 'Importovat soubor',
'places.trackIndicator': 'Trasa',
'places.sidebarDrop': 'Pusťte pro import',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Ort/Aktivität hinzufügen',
'places.addToSelectedDay': 'Zum geöffneten Tag hinzufügen',
'places.addPlaceShort': 'Neuer Ort',
'places.addToDayShort': 'Zum Tag',
'places.importFile': 'Dateimport',
'places.trackIndicator': 'Strecke / Route',
'places.sidebarDrop': 'Ablegen zum Importieren',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Add Place/Activity',
'places.addToSelectedDay': 'Add to the open day',
'places.addPlaceShort': 'New place',
'places.addToDayShort': 'To day',
'places.importFile': 'Import file',
'places.trackIndicator': 'Track / route',
'places.sidebarDrop': 'Drop to import',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Añadir lugar/actividad',
'places.addToSelectedDay': 'Añadir al día abierto',
'places.addPlaceShort': 'Nuevo lugar',
'places.addToDayShort': 'Al día',
'places.importFile': 'Importar archivo',
'places.trackIndicator': 'Ruta / recorrido',
'places.sidebarDrop': 'Soltar para importar',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Ajouter un lieu/activité',
'places.addToSelectedDay': 'Ajouter au jour ouvert',
'places.addPlaceShort': 'Nouveau lieu',
'places.addToDayShort': 'Au jour',
'places.importFile': 'Importer un fichier',
'places.trackIndicator': 'Parcours / itinéraire',
'places.sidebarDrop': 'Déposer pour importer',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Προσθήκη Μέρους/Δραστηριότητας',
'places.addToSelectedDay': 'Προσθήκη στην ανοιχτή ημέρα',
'places.addPlaceShort': 'Νέο σημείο',
'places.addToDayShort': 'Στην ημέρα',
'places.importFile': 'Εισαγωγή αρχείου',
'places.trackIndicator': 'Ίχνος / διαδρομή',
'places.sidebarDrop': 'Αφήστε για εισαγωγή',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Hely/Tevékenység hozzáadása',
'places.addToSelectedDay': 'Hozzáadás a megnyitott naphoz',
'places.addPlaceShort': 'Új hely',
'places.addToDayShort': 'A naphoz',
'places.importFile': 'Fájl importálása',
'places.trackIndicator': 'Nyomvonal / útvonal',
'places.sidebarDrop': 'Ejtse el az importáláshoz',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Tambah Tempat/Aktivitas',
'places.addToSelectedDay': 'Tambahkan ke hari yang dibuka',
'places.addPlaceShort': 'Tempat baru',
'places.addToDayShort': 'Ke hari',
'places.importFile': 'Impor file',
'places.trackIndicator': 'Jalur / rute',
'places.sidebarDrop': 'Lepas untuk mengimpor',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Aggiungi Luogo/Attività',
'places.addToSelectedDay': 'Aggiungi al giorno aperto',
'places.addPlaceShort': 'Nuovo luogo',
'places.addToDayShort': 'Al giorno',
'places.importFile': 'Importa file',
'places.trackIndicator': 'Percorso / itinerario',
'places.sidebarDrop': 'Rilascia per importare',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': '場所/アクティビティを追加',
'places.addToSelectedDay': '開いている日に追加',
'places.addPlaceShort': '新しい場所',
'places.addToDayShort': 'この日へ',
'places.importFile': 'ファイルをインポート',
'places.trackIndicator': 'トラック / ルート',
'places.sidebarDrop': 'ドロップしてインポート',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': '장소/활동 추가',
'places.addToSelectedDay': '열린 날짜에 추가',
'places.addPlaceShort': '새 장소',
'places.addToDayShort': '해당 날짜로',
'places.importFile': '파일 가져오기',
'places.trackIndicator': '트랙 / 경로',
'places.sidebarDrop': '끌어다 가져오기',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Plaats/activiteit toevoegen',
'places.addToSelectedDay': 'Aan de geopende dag toevoegen',
'places.addPlaceShort': 'Nieuwe plek',
'places.addToDayShort': 'Naar dag',
'places.importFile': 'Bestand importeren',
'places.trackIndicator': 'Track / route',
'places.sidebarDrop': 'Loslaten om te importeren',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Dodaj miejsce/atrakcję',
'places.addToSelectedDay': 'Dodaj do otwartego dnia',
'places.addPlaceShort': 'Nowe miejsce',
'places.addToDayShort': 'Do dnia',
'places.importFile': 'Importuj plik',
'places.trackIndicator': 'Trasa / ślad',
'places.sidebarDrop': 'Upuść, aby zaimportować',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Добавить место/активность',
'places.addToSelectedDay': 'Добавить в открытый день',
'places.addPlaceShort': 'Новое место',
'places.addToDayShort': 'В день',
'places.importFile': 'Импортировать файл',
'places.trackIndicator': 'Трек / маршрут',
'places.sidebarDrop': 'Отпустите для импорта',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Lägg till plats/aktivitet',
'places.addToSelectedDay': 'Lägg till i den öppna dagen',
'places.addPlaceShort': 'Ny plats',
'places.addToDayShort': 'Till dagen',
'places.importFile': 'Importera fil',
'places.trackIndicator': 'Spår / rutt',
'places.sidebarDrop': 'Släpp för att importera',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Yer/etkinlik Ekle',
'places.addToSelectedDay': 'Açık güne ekle',
'places.addPlaceShort': 'Yeni yer',
'places.addToDayShort': 'Güne',
'places.importFile': 'Dosyayı içe aktar',
'places.trackIndicator': 'İz / rota',
'places.sidebarDrop': 'İçe aktarmak için bırakın',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Додати місце/активність',
'places.addToSelectedDay': 'Додати до відкритого дня',
'places.addPlaceShort': 'Нове місце',
'places.addToDayShort': 'До дня',
'places.importFile': 'Імпортувати файл',
'places.trackIndicator': 'Трек / маршрут',
'places.sidebarDrop': 'Відпустіть для імпорту',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': 'Thêm địa điểm/Hoạt động',
'places.addToSelectedDay': 'Thêm vào ngày đang mở',
'places.addPlaceShort': 'Địa điểm mới',
'places.addToDayShort': 'Vào ngày',
'places.importFile': 'Nhập tập tin',
'places.trackIndicator': 'Đường đi / tuyến đường',
'places.sidebarDrop': 'Thả để nhập',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': '新增地點/活動',
'places.addToSelectedDay': '加入目前開啟的日期',
'places.addPlaceShort': '新地點',
'places.addToDayShort': '加入當天',
'places.importFile': '匯入檔案',
'places.trackIndicator': '軌跡 / 路線',
'places.sidebarDrop': '拖放以匯入',
+3
View File
@@ -2,6 +2,9 @@ import type { TranslationStrings } from '../types';
const places: TranslationStrings = {
'places.addPlace': '添加地点/活动',
'places.addToSelectedDay': '添加到当前打开的日期',
'places.addPlaceShort': '新地点',
'places.addToDayShort': '加入当天',
'places.importFile': '导入文件',
'places.trackIndicator': '轨迹 / 路线',
'places.sidebarDrop': '拖放以导入',