The map centering helpers gated their mobile branch on `sheetInsetPx > 0`,
but the inset is published on a deferred animation frame and is briefly 0
during a sheet-to-sheet transition. On mobile that skipped the mobile branch
and fell into the desktop sidebar branch, which shifts the map center left to
make room for the sidebar and pushed the selected pin to the right edge.
Make the mobile and desktop branches mutually exclusive by viewport so the
desktop logic can never run on mobile; with a 0 inset the mobile math is a
no-op and the existing sheet-snap re-pan corrects the vertical position once
the sheet publishes its height.
Drawer headers: a shared DrawerHeader component renders the desktop nav-bar
layout (back + centered title + close) and a mobile variant (left title, no
back button, a single X that dismisses the top sheet — back when there is a
parent, otherwise close). Place details uses the place name as its title with
a compact, borderless header, and on mobile moves the photos below the place
type. The X and back buttons now have aria-labels.
Sheet scrolling: the content only scrolls while the sheet is at its largest
detent; below that, dragging anywhere on the sheet (including list rows and
links, not just the header) resizes it. At the largest detent, pulling down on
the content while it is scrolled to the top shrinks the sheet (overscroll to
shrink).
Place details opens at the medium detent again. The mobile photo carousel no
longer bleeds to the sheet edges, gets a wider gap and the same corner radius
as the action buttons.
Give each bottom sheet its own default height and remember the size the
user drags it to, per sheet, so one sheet's height no longer leaks into the
next.
- App menu now opens at the medium detent instead of near-full-screen.
- Place details opens at the short (collapsed) detent; the results and list
sheets stay at medium.
- Detent memory is keyed by route (map-ui.sheetDetents) instead of one
shared slot, and the `detent` arg is authoritative on mount.
- Background (parent) sheets are pinned to the minimum reachable detent on
mount and on viewport changes, so they can never peek above the top sheet
no matter how short it is. They still never write the detent memory.
Derive the sheet stack from the URL instead of mutating it: the route
template keeps rendering the top sheet, and application.gjs renders the
service-driven parent (search results, lists index, app menu) behind it on
mobile, inert, so closing the top sheet reveals the parent at its
remembered size.
- bottom-sheet modifier: `background` arg — background instances settle
immediately, inject no handle, take no gestures, never own the inset slot,
and never write the remembered detent (restore-only).
- z-index: demote background sheets below the top sheet, including the app
menu whose desktop z-index was inverted.
- outside tap on mobile pops to the parent without hideSidebar(), keeping
the session and detent alive; desktop keeps today's close-all.
- tracked matchMedia-backed viewport service for the mobile breakpoint.
- lists index extracted into a component so it can render top or background.
- scope .sidebar-content lookups and test selectors to .sheet-top.
Known v1 limitation: popping hard-cuts to the parent route (no exit
animation). The full derived stack with independent detents for 3-level
chains is deferred.
Mobile sheets (search results, place details, lists, menu, contributions,
activity, new place) become draggable bottom sheets with three detents
(collapsed / medium / expanded), fling-snapping, and swipe-down-to-dismiss.
The sheet is transform-based and content never reflows while dragging.
The map, crosshair, and pin-centering react to the live covered height through
mapUi.sheetInsetPx, replacing the old hardcoded "bottom 50%" assumptions.
Also fixes a backtracking crash that made the drawer disappear when opening a
place from search results: the modifier no longer writes tracked service state
during render. Writes are coalesced into an animation-frame flush and gated by
an ownership token, so a stale sheet can't corrupt the inset.
On a cold cache the gallery opened on the linked photo, but the large main
view showed the place's first photo. The gallery opens as soon as the linked
event is in the store, then the remaining photos stream in and
parsePlacePhotos promotes the first landscape to index 0, shifting the linked
photo's offset. scrollToNewPhoto only re-ran when the focused event changed,
so the track stayed at the old offset while the thumbnail highlight (driven by
the template, not the scroll position) looked correct.
Re-align to the focused slide when the photo set changes, keyed by the joined
event ids so it only fires on a genuine add/remove/reorder. The re-align is
deferred with requestAnimationFrame so the DOM has updated, and setupCarousel
re-observes the slides the same way so the intersection observer keeps
tracking them.
The /e/:event_id route redirected to the place with a `photo` query param,
but that only scrolled the inline carousel. It now opens the gallery modal,
focused on the linked photo.
The photo list loads asynchronously (cache first, then relays) and more
photos can arrive while the gallery is open, so the auto-open waits for the
linked photo, opens exactly once, and keeps focus on the same event id.
A manual open or close consumes the pending link so a late-arriving photo
cannot reopen or hijack the gallery the user is looking at.
When the linked photo is hidden as untrusted, following the link reveals all
untrusted photos by that author for the current place. The reveal is
place-scoped and cleared when the place changes, so it never leaks into
other places, and other authors' hidden photos stay hidden.
The new menu item copies an absolute <origin>/e/<nevent> link. The /e/ route resolves the event from relays, reads its i tag and opens the place with the photo focused, so recipients land directly on the photo in Marco.
Extract the nevent-building logic into buildEventReference() so the raw event ID copy and the share link share one implementation, and use sentence case for the menu labels.
The photo event ID button called navigator.clipboard.writeText directly, so copying failed on insecure origins where that API is unavailable. Route it (and the invoice and connection-link copies) through app/utils/share.js copyText, which falls back to execCommand.
copyEventId also never stopped the click from bubbling. Because closeMenu() runs after an await, the dropdown unmounted before the event reached the overlay's background-click handler, whose detached-target check then closed the gallery. Stop propagation synchronously like the zap and delete actions.
The full-text search field now detects anything the /e/ handler can open
(raw 64-hex ids, note1/nevent1/naddr1 codes, nostr: URIs, kind:pubkey:d
coordinates and permalinks) and opens it instead of running a Photon or
bookmark search.
As-you-type, a pasted reference resolves through the event store while the
field shows a spinner and the popover offers a single row labelled by kind
("Place photo" / "Place review", or a generic "Nostr event"). A reference
that cannot be found shows the usual not-found toast, and an unlinked event
is flagged as such. Submitting a reference, and direct /search?q=<ref>
links, route straight to the /e/ handler.
Offer the nostrconnect:// link on desktop too, instead of only on mobile,
and stop calling it a mobile-only signer.
The connect modal now shows an "Open signer app" link on every device,
alongside "Copy connection link" and a "Show QR code" toggle (hidden by
default). When the link is used, watch for the signer app taking over the
page and otherwise reveal a hint pointing at the QR code and copy link.
The mobile-only auto-redirect is gone; launching now happens through the
explicit button on all platforms.
Refs #127
Tag published photos (kind 360), deletions (kind 5) and zap requests
(kind 9734) with ["client","Marco","31990:1f79058c…:marco.earth","wss://nostr.kosmos.org/"]
so clients can attribute them to Marco. Uses applesauce's EventFactory
clientTag via a shared app/utils/client-tag helper.
Add an /e/:event_id route that resolves a NIP-19 event reference (nevent
with relay hints, note, naddr, raw hex id, an optional nostr: prefix, or a
full permalink) to the event, reads its i tag and opens the place. When the
event is a place photo, focus it in the place details carousel via a
?photo= query param.
Also keep the selected place's photo subscription open instead of completing
on the first relay's EOSE, so photos that live on a slower relay are no
longer dropped (the submission relay holds only a subset).
Photo processing was slow on most devices because blurhash was encoded
from the full-resolution image, the original file was decoded up to five
times, and the Android fallback path skipped native resizing.
- Encode blurhash from a <=64px canvas instead of full resolution
- Process main image, thumbnail and blurhash in a single worker pass,
decoding the original only once and deriving the thumbnail from the
resized main image
- Retry createImageBitmap via an in-memory Blob before falling back to
stepped software scaling, and validate the browser honored the resize
- Avoid the redundant full-resolution canvas and release intermediate
canvases during stepped scaling
- Swap the preview to the processed thumbnail and decode it async
- Lower main image JPEG quality to 0.85
Adds unit tests for the image-processor service and documents the design
in doc/dev/photo-upload-performance.md.
Emit top-level x tags for the primary media and thumbnail SHA-256 hashes (with the primary also inside imeta) when publishing. Parsed photos expose the hash set, and photo deletion prefers it over extracting hashes from Blossom URLs, keeping URL extraction as a fallback for legacy events.
- Treat contacts as loaded only once the kind 3 event exists, so the first
home window is fetched with the follow list, and re-fetch the initial window
when contacts arrive late.
- Resolve sender kind 0 profiles from the user's relays and the content's
origin relays, and retry unresolved senders after the first load.
- Auto-load older pages while the end sentinel stays visible via a service-side
loop, guarded by hasMore and a fetch lock, with an epoch token so a mode
switch invalidates in-flight fetches.
- Deduplicate zap entries across window re-fetches.
The edit form only changes the saved entry's title and description, not the
OSM data, so surface it under the Save dropdown as "Edit saved place"
instead of a standalone action button.
This also keeps the actions row to Save and Share with even padding, so the
earlier equal-width row layout is no longer needed.
Add a Share button to the place details actions row. On systems with the
Web Share API it opens the native share sheet; everywhere else it opens a
small fallback menu offering "Copy link" and "Copy coordinates".
- OSM places share the public Marco place URL plus the name and
coordinates; custom places share name and coordinates only, since their
internal id is private and their Marco URL would not resolve for others
- No external map links; copy falls back to document.execCommand so the
feature keeps working on non-secure origins
- The button is hidden while editing and when there is nothing to share
By default, only automatically show photos for relays marked as trusted
(which by default is the required read relay). For other relays, only
show the user's own events by default, but allow showing all events via
link in place details (drawer bottom)