feat: enhance styling and layout for toolbar, map components, and editor

- Updated toolbar styles for improved layout and appearance, including padding and margin adjustments.
- Introduced new styles for scale menu and compact dropdowns.
- Enhanced map pin tooltips with better positioning and hover effects.
- Added new styles for map sheet filters, including search and date range controls.
- Improved editor styles for a more cohesive look and feel, including transport controls for video editing.
- Expanded GeoLocation interface to include additional address fields and formatted address.
- Updated MediaItem interface to include storage reference and uploadedBy fields.
- Enhanced MediaComment interface with author details for better user identification.
- Introduced GalleryUser interface to represent signed-in users in the host app.
This commit is contained in:
2026-07-23 07:34:20 +05:30
parent bc8bf2007d
commit 7673fc63ea
35 changed files with 3130 additions and 394 deletions
+40 -2
View File
@@ -25,7 +25,7 @@ designed to be **optional via flags** (`features={{ … }}`) — a consuming pro
## 2. Library, viewing & navigation
- ✅ Library views: Years / Months / All Photos (Days grouping supported) — **date/time grouping**
- ✅ Collections (Memories, Pinned, Albums, People, Featured, Shared, Recent Days, Trips, Utilities, Objects)
- ✅ Collections (Albums, Objects, Shared Albums, Recent Days) — trimmed of the placeholder-only sections (Memories / Pinned / Featured Photos / People & Pets / Trips / Utilities) for host-app embedding
- ✅ Adaptive responsive grid + zoom in/out, lazy images
-**Lightbox** photo viewer (prev/next, keyboard, actions) — 🚧 polish to 100% macOS parity
-**Video player** (native controls in lightbox) — 🚧 macOS-style custom controls/scrubber
@@ -58,6 +58,15 @@ designed to be **optional via flags** (`features={{ … }}`) — a consuming pro
location's photos in a **date-grouped sheet**; any GPS item (incl. screenshots) pins automatically
-**Grid tab = Memories mosaic**: date sections, full-width **auto-sliding hero** + irregular varied tiles
-**Mini-map** in the photo info panel
-**Fly-to on pin click** (`flyTo`, never zooms out) + per-location **count badge** + **hover mini-slider** strip;
the single-photo hover tooltip is edge-clamped (`--tip-dx` / `.apg-pin__tip--below`) and `user-select:none`
-**Location-sheet filter**: search (shared `searchMedia`) + object-label chips + a single **date-range** control
(`.apg-daterange` — presets *All dates / Last 7 days / Last 30 days / This year* + custom From/To), all AND-combined,
with a live "N of M" count and one Clear-all
-**Full-address reverse geocoding** — on opening a located item the Info panel reverse-geocodes once via OpenStreetMap
Nominatim (`addressdetails=1`), parsing road/neighbourhood/suburb/city/county/state/postcode/country/countryCode/formatted
into `GeoLocation` and persisting it via `updateMedia` (survives reload, never re-fetched). Host CSP must allow
`nominatim.openstreetmap.org` in `connect-src`
- Note: demo seed intentionally locates ~half the photos; real photos populate via EXIF GPS (§4)
## 6. Editor (photo & video)
@@ -92,7 +101,8 @@ designed to be **optional via flags** (`features={{ … }}`) — a consuming pro
> From a full feature audit vs. macOS Photos. HIGH = most-requested / highest value.
-**Custom video player** (glass scrubber, buffered/played, volume, PiP, fullscreen, keyboard)
-**HIGH — Lightbox zoom/pan** (scroll / double-click / pinch) for detail viewing
- **HIGH — Editable metadata** in the Info panel (caption, keywords/tags, title; bulk edit)
- **Editable metadata** in the Info panel — clicktoedit **caption** + multiline **`note`** (save on blur / Enter via
`updateMedia`; `note` is folded into the search haystack). ⬜ still: keywords/tags editing, title, bulk edit
-**HIGH — Slideshow / Memories playback** (auto-advance + Ken Burns transitions)
- ⬜ MED — Lightbox **filmstrip** of adjacent media; **timeline scrubber** to jump by date
- ⬜ MED — **Keyboard-shortcut help** modal (`?`); album **drag-to-reorder**
@@ -127,6 +137,34 @@ designed to be **optional via flags** (`features={{ … }}`) — a consuming pro
- ✅ Docs: README + `docs/SETUP.md` + `docs/ARCHITECTURE.md` + this roadmap + project-local `CLAUDE.md`
- ✅ Testing: Playwright e2e (manual runs); ⬜ automated CI suite
## 11. Embedding into a host app (CRM / host integration)
> The SDK is no longer just the macOS-Photos demo — it embeds into a host product's shell. All of it is opt-in.
-**Embedded layout** (`embedded`) — fills the host container (`height:100%`, `.apg--embedded`, `cursor:pointer`)
instead of assuming a full viewport; overlays stay `position:fixed` and honour `--apg-overlay-top`
-**Chrome suppression** (`chrome { titlebar, sidebar, toolbar, themeSwitcher }`, `DEFAULT_CHROME` exported) — hide the
pieces the host already provides; `showWindowChrome` kept as a legacy alias of `chrome.titlebar`
-**`hiddenViews: ViewId[]`** — drop sidebar rows + Collections cards (labels drop when empty; active hidden view falls back to `library`)
-**`keyboardShortcuts`** flag — bind (or not) global shortcuts to `window`
-**Host identity** (`currentUser: GalleryUser`) — identity-stamped **comments** (`authorId/author/authorAvatar`;
only the author sees delete), **uploads** (`MediaItem.uploadedBy`, never overwritten on re-import), and **versions**
(`addVersion`/`restoreVersion` stamp the author). Info panel shows an "Uploaded by" block + per-version author.
`be-crm` still owns `owner_principal_id`; `uploadedBy` is display identity only
-**`shareBaseUrl`** — host owns where share links point
-**Full ThemeTokens map (50+ keys)** → CSS variables (backgrounds, cards, toolbar/menu glass, separators, hover/active,
text tiers, glass border, font, shadows, tile-fav, overlay/editor bg, segmented pill, sidebar/toolbar sizing);
`xLight/xDark` theme-paired or bare; sanitized against `url()/expression()/javascript:/<>{}`. **Live config** — theme /
tokens / identity / chrome re-apply via `setConfig` without remounting
-**Full-screen / maximise** (`defaultFullscreen`, store `fullscreen`/`setFullscreen`/`toggleFullscreen`, toolbar button) —
adds `.apg--fullscreen` (`position:fixed; inset:0; z-index:1400; height:100dvh`); Escape un-maximises after the
lightbox/editor/camera/modal/menu checks
-**Server-backed Recently-Deleted lock** (`lockProvider: { status, set, verify }`) — replaces the device-local
`apg:lock-hash` entirely; `lockConfigured` is the UI source of truth, `lockError` separates `'wrong-password'` from `'unavailable'`
-**Incremental persistence**`StorageAdapter.applyChanges(StateChanges)` (diff-based, called instead of `save()`;
serialized writes, rollback-on-reject) + `putMedia(id, blob, meta) → { ref, url }` (durable bytes, sets
`MediaItem.src`/`storageRef`); types `StateChanges` / `StoredBlob` exported
-**Floating glass toolbar** + library-scale **dropdown** (`.apg-scalemenu`, replaces the Years/Months/All segmented)
- ⬜ Real multi-user auth / permissions in the host (identity is display-only in the SDK; the backend is the authority)
## Web-meaningful UI (done 2026-06-29)
- ✅ "All Projects / App Store" (iOS-only) → **"All Albums"** overview (My Albums + Create + Recent Days).
- ✅ Sidebar Albums section: All Albums + New Album + user albums (indented).