Adds a Share button to the place details actions row.
On systems with the Web Share API (mobile), the button opens the native share sheet. Everywhere else it opens a small fallback menu offering "Copy link" and "Copy coordinates". Options are feature-detected, so nothing that cannot work is shown, and the button is hidden while editing or when there is nothing to share.
Sharing stays Marco/OSM-first, with no external map links:
OSM places share the public Marco place URL, plus the place name and coordinates as text.
Custom/private places share only the name and coordinates, because their internal id is private and a Marco URL for them would not resolve for anyone else.
"Copy coordinates" copies plain lat, lon. Copying falls back to document.execCommand, so the feature keeps working on non-secure origins such as a LAN dev server, where the async Clipboard API is unavailable.
Implementation: app/utils/share.js (pure helpers), app/components/place-share-menu.gjs (the fallback popover), and the Share button in app/components/place-details.gjs.
Tests: new unit tests for the share helpers and integration tests for the button and menu, including the insecure-origin copy fallback. pnpm lint passes and the full suite passes (440 tests) locally.
Adds a Share button to the place details actions row.
On systems with the Web Share API (mobile), the button opens the native share sheet. Everywhere else it opens a small fallback menu offering "Copy link" and "Copy coordinates". Options are feature-detected, so nothing that cannot work is shown, and the button is hidden while editing or when there is nothing to share.
Sharing stays Marco/OSM-first, with no external map links:
- OSM places share the public Marco place URL, plus the place name and coordinates as text.
- Custom/private places share only the name and coordinates, because their internal id is private and a Marco URL for them would not resolve for anyone else.
- "Copy coordinates" copies plain `lat, lon`. Copying falls back to `document.execCommand`, so the feature keeps working on non-secure origins such as a LAN dev server, where the async Clipboard API is unavailable.
Implementation: `app/utils/share.js` (pure helpers), `app/components/place-share-menu.gjs` (the fallback popover), and the Share button in `app/components/place-details.gjs`.
Tests: new unit tests for the share helpers and integration tests for the button and menu, including the insecure-origin copy fallback. `pnpm lint` passes and the full suite passes (440 tests) locally.
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
raucao
added the feature label 2026-11-16 08:31:23 +00:00
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.
raucao
merged commit 32c2dbe206 into master2026-11-16 09:25:36 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a Share button to the place details actions row.
On systems with the Web Share API (mobile), the button opens the native share sheet. Everywhere else it opens a small fallback menu offering "Copy link" and "Copy coordinates". Options are feature-detected, so nothing that cannot work is shown, and the button is hidden while editing or when there is nothing to share.
Sharing stays Marco/OSM-first, with no external map links:
lat, lon. Copying falls back todocument.execCommand, so the feature keeps working on non-secure origins such as a LAN dev server, where the async Clipboard API is unavailable.Implementation:
app/utils/share.js(pure helpers),app/components/place-share-menu.gjs(the fallback popover), and the Share button inapp/components/place-details.gjs.Tests: new unit tests for the share helpers and integration tests for the button and menu, including the insecure-origin copy fallback.
pnpm lintpasses and the full suite passes (440 tests) locally.