Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(geomap): stand the place panel at the foot of a mobile map
Elian Dorand0e3222635dd
diff --git a/apps/client/src/widgets/collections/geomap/DetailPane.css b/apps/client/src/widgets/collections/geomap/DetailPane.cssindex f725b5bd49..21d381f328 100644--- a/apps/client/src/widgets/collections/geomap/DetailPane.css+++ b/apps/client/src/widgets/collections/geomap/DetailPane.css@@ -10,17 +10,13 @@}.geo-map-container .geo-detail-pane {- /* Room at the foot for the bar of buttons, which stands in this same corner: wherever that bar- has been pushed up to (a home bar in fullscreen, say — see the insets in index.css), its own- height, and as much air again. Standing clear of it rather than moving it aside — the mind- map's panel reckons its foot the same way. */- --detail-pane-foot: calc(var(--geo-map-inset-bottom) + var(--geo-map-toolbar-height) + var(--geo-map-inset));-position: absolute;/* A fixed height rather than one sized to its contents, which would be a different pane for- every marker. What it holds scrolls within it (see OverlayPanel.css). */+ every marker. What it holds scrolls within it (see OverlayPanel.css). It stands clear of the+ bar of buttons in this same corner rather than moving it aside — the mind map's panel reckons+ its foot the same way. */top: var(--geo-map-inset-top);- bottom: var(--detail-pane-foot);+ bottom: var(--geo-map-foot);inset-inline-end: var(--geo-map-inset-end);width: var(--geo-detail-pane-width);/* An embedded map may be narrower than the pane would like to be — and in fullscreen the sidesdiff --git a/apps/client/src/widgets/collections/geomap/PlacePanel.css b/apps/client/src/widgets/collections/geomap/PlacePanel.cssindex a9c47a97c9..d5c0f1f4d9 100644--- a/apps/client/src/widgets/collections/geomap/PlacePanel.css+++ b/apps/client/src/widgets/collections/geomap/PlacePanel.css@@ -10,6 +10,17 @@z-index: 3;}+/* On a phone the panel is as wide as the map, so at the head it would cover the search bar and the+ result navigator standing under it (see index.css). It stands at the foot instead, which leaves+ those reachable: results can be stepped through with a place open. */+body.mobile .geo-map-container .geo-place-panel {+ top: auto;+ bottom: var(--geo-map-foot);+ /* Half the map at most, so a long address cannot grow the card back over the bar; what does not+ fit scrolls within it (see OverlayPanel.css). */+ max-height: 50%;+}+.geo-map-container .geo-place-panel .geo-place-panel-body {display: flex;flex-direction: column;diff --git a/apps/client/src/widgets/collections/geomap/index.css b/apps/client/src/widgets/collections/geomap/index.cssindex 35eb33c347..324bbe874b 100644--- a/apps/client/src/widgets/collections/geomap/index.css+++ b/apps/client/src/widgets/collections/geomap/index.css@@ -51,6 +51,11 @@navigator placed from it (see ResultNavigator.css). Overridden for mobile below. */--geo-map-search-top: var(--geo-map-inset-top);+ /* Where the foot of the map stops anything reaching down towards it: the room kept from the+ bottom, the height of the bars standing there (MapToolbar, EditToolbar), and as much air again.+ Read by the detail pane and by the place panel on mobile. */+ --geo-map-foot: calc(var(--geo-map-inset-bottom) + var(--geo-map-toolbar-height) + var(--geo-map-inset));+/** What everything standing over the map is dressed in — our own control groups and MapLibre's* scale and attribution alike, so that they read as one set rather than as ours beside theirs.diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Geo Map.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Geo Map.htmlindex 453a130434..dc6d886bfc 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Geo Map.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Geo Map.html@@ -97,8 +97,10 @@framed by the ground the place covers, so a country fills the view while ahouse is shown at street level. Where the service reports a boundary — acountry, a county, a park — that boundary is outlined under the pin.</p>-<p>A panel then opens in the top-right corner with the place's full address and- its coordinates. Pressing the coordinates copies them to the clipboard.</p>+<p>A panel then opens with the place's full address and its coordinates: in the+ top-right corner on desktop, and at the bottom of the map on mobile, where the+ top is kept for the search bar and the result counter. Pressing the+ coordinates copies them to the clipboard.</p><h3>Keeping a place as a marker</h3><p>Press <em>Add as marker</em> in that panel to keep the place. A child noteis created under the map, named as the place is named and with itsdiff --git a/docs/User Guide/User Guide/Collections/Geo Map.md b/docs/User Guide/User Guide/Collections/Geo Map.mdindex 4becd3c39d..6b7da9afba 100644--- a/docs/User Guide/User Guide/Collections/Geo Map.md+++ b/docs/User Guide/User Guide/Collections/Geo Map.md@@ -71,7 +71,7 @@ Selecting a note already on the map moves to its marker and opens the note besidSelecting a place found online moves the map to it and marks it with a temporary pin, distinct in colour from the map's own markers. The map is framed by the ground the place covers, so a country fills the view while a house is shown at street level. Where the service reports a boundary — a country, a county, a park — that boundary is outlined under the pin.-A panel then opens in the top-right corner with the place's full address and its coordinates. Pressing the coordinates copies them to the clipboard.+A panel then opens with the place's full address and its coordinates: in the top-right corner on desktop, and at the bottom of the map on mobile, where the top is kept for the search bar and the result counter. Pressing the coordinates copies them to the clipboard.### Keeping a place as a marker