georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

map details arent displayed in a child context #372

Open landryb opened 3 years ago

landryb commented 3 years ago

i've a context with very few plugins enabled (map, querypanel, toc, save, catalog)

i've saved the context template, visited it, and saved a copy of it via 'save as'. adding context 'details' in the save as dialog, whatever is selected (show as modal, show at startup) the context details arent available when viewing it. No item in the burger menu to show context details. In the network console, i see the context attributes being saved then correctly fetched: eg GET /mapstore/rest/geostore/resources/resource/117/attributes returns json with

name | "details"
type | "STRING"
value | "rest/geostore/data/147"
+  
name | "detailsSettings"
type | "STRING"
value | "{\"showAtStartup\":true,\"showAsModal\":false}"

and GET /mapstore/rest/geostore/data/147 returns the saved HTML for details, but it's not displayed anywhere.

is there a plugin that has to be enabled for this feature to work (eg hidden dep) ?

bonus buglet: in this context, i tried enabling the 'undo' button, this activated the right bottom toolbar, but at context startup the button to open the toolbar is 'shifted' on the left, as if the right pane was opened: image

landryb commented 3 years ago

fwiw, viewing the map itself separately from the context (ie loading https://FQDN/mapstore/#/viewer/openlayers/117 instead of https://FQDN/mapstore/#/context/parent_context/117) displays the map details fine in a pane on the right. image

closing the map details moves the toolbar back to its place on the right side.

landryb commented 11 months ago

A coworker tried to do this and reminded me of this issue .. fwiw still present on 2022.02 (havent been able to check other versions yet). Map details arent displayed in a context.. from my understanding, the HTML popup is displayed by the Details plugin (per https://mapstore.geosolutionsgroup.com/mapstore/docs/api/plugins#plugins.Details) but it isn't available in the plugins one can select when building a context. And importing a map which has details enabled in the context builder doesnt produce a context with details displayed.

any idea @tdipisa ? @catmorales are you seeing the same ?

landryb commented 11 months ago

issue is still present in 2023.02.00-rc2.

landryb commented 3 weeks ago

i've rechecked and it seems to work in current mapstore master, eg i have the popup if i open a map saved with details in a given context (eg /context/test/18), but doesn't work (eg doesn't display details) if i import the same map as the default context map and visit /context/test.

opening the map outside of the context (/viewer/18) correctly shows the details.

find attached the given context & map. I'm not fully sure but at some point i felt there was a conflict between the details plugin and the sidebar plugin.. will have to recheck what happens if the burger menu is used instead of the sidebar.

test-context.json map.json

landryb commented 3 weeks ago

from my understanding, the map loaded when loading the context is stored "inside" the context content, so doesn't have a numeric id and can't be linked to context details stored in the database by map id. that might also explain why it works when visiting the map (within or outside a specific context).

@tdipisa am i right ?