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): keep the result navigator clear of the search bar on mobile
Elian Doran0628d85cf206
diff --git a/apps/client/src/widgets/collections/geomap/ResultNavigator.css b/apps/client/src/widgets/collections/geomap/ResultNavigator.cssindex 00dd6c344f..44847d0bd8 100644--- a/apps/client/src/widgets/collections/geomap/ResultNavigator.css+++ b/apps/client/src/widgets/collections/geomap/ResultNavigator.css@@ -1,8 +1,8 @@-/* Under the search bar, in the same corner: the room the bar keeps from the top, the bar's own- height, and as much air again. */+/* Under the search bar, in the same corner: where that bar stands, its own height, and as much air+ again — read from the bar's own top, which on mobile is below the attribution (see index.css). */.geo-map-container .geo-result-navigator {--overlay-group-inset-top: calc(- var(--geo-map-inset-top) + var(--geo-map-toolbar-height) + var(--geo-map-inset));+ var(--geo-map-search-top) + var(--geo-map-toolbar-height) + var(--geo-map-inset));}/* The count is read rather than pressed for its own sake, so it keeps a readout's room rather thandiff --git a/apps/client/src/widgets/collections/geomap/SearchBox.css b/apps/client/src/widgets/collections/geomap/SearchBox.cssindex 0d1fe46d49..425550d29b 100644--- a/apps/client/src/widgets/collections/geomap/SearchBox.css+++ b/apps/client/src/widgets/collections/geomap/SearchBox.css@@ -1,7 +1,7 @@/* Top leading corner of the map, using the insets and z-index every overlay here uses (seeindex.css). */.geo-map-container .geo-search-toolbar {- top: var(--geo-map-inset-top);+ top: var(--geo-map-search-top);inset-inline-start: var(--geo-map-inset-start);z-index: 3;gap: 6px;@@ -14,11 +14,6 @@border-color: var(--geo-map-panel-border-color);}-/* On mobile the attribution takes the top leading corner (see map.tsx), so start below it. */-body.mobile .geo-map-container .geo-search-toolbar {- top: calc(var(--geo-map-inset-top) * 2 + var(--geo-map-toolbar-height));-}-/* The bar is the field, icon and all, so it takes the focus outline an input group takes (see theinput group in theme-next/forms.css). Only Next names the colour. */.geo-map-container .geo-search-toolbar:focus-within {diff --git a/apps/client/src/widgets/collections/geomap/index.css b/apps/client/src/widgets/collections/geomap/index.cssindex 12bb439746..35eb33c347 100644--- a/apps/client/src/widgets/collections/geomap/index.css+++ b/apps/client/src/widgets/collections/geomap/index.css@@ -47,6 +47,10 @@height where no theme names one. */--geo-map-toolbar-height: var(--overlay-button-height, 28px);+ /* Where the head of the leading column stands: the search bar (see SearchBox.css) and the result+ navigator placed from it (see ResultNavigator.css). Overridden for mobile below. */+ --geo-map-search-top: var(--geo-map-inset-top);+/** 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.@@ -97,6 +101,12 @@}}+/* On mobile the attribution takes the top leading corner (see map.tsx), so the column starts below+ it: the room kept from the top, the attribution's own height, and as much air again. */+body.mobile .geo-map-container {+ --geo-map-search-top: calc(var(--geo-map-inset-top) * 2 + var(--geo-map-toolbar-height));+}+/* Read the other way round, the trailing corner is the left one. Only which side is which changes;what each side is worth is settled above and in fullscreen below, and is read through from here. */body[dir=rtl] .geo-map-container {