-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defaultOpenSidebar
option seems not to work in MM 3.1.4
#226
Comments
It's not clear why this is happening. There are no errors I can detect. It appears to be the result of a promise resolution not occurring when the webpage has loaded. The code which opens the sidebar is just not run as a resolution of the promise. Inserting trace logs, the resolution appears not to be failing either. |
Note that as mentioned in the ObO issue above, this appears not to be a problem there... |
I've found that the sidebar load can fail when the vocabs don't load in time, and an exception is thrown, which aborts the routine which does the opening. This was masked by a rejected promise with no handler, so the error wasn't reported anywhere, and the fact that the vocabs are there later when the sidebar is opened manually, so everything then works. I've added a handler which reports errors like this on the console. I've also altered the code slightly to avoid trigging this error - when vocabs are not available the sidebar is populated in a best-effort manner, instead of throwing an exception. Which should be temporary, as mentioned. This allows the sidebar auto-opening to complete successfully. Fix is in Mykomap v3.1.5 |
Small consequence of the above: on initial page load, sidebar opens, only "All Entries" shows for a moment, then the entries appear. |
Confirm it works in https://dev.maps.coop/ica/ on Firefox.
Not a problem. |
Describe the bug
If the
defaultOpenSidebar
configuration option is set in a mykomap page, the sidebar doesn't open automatically on opening the map. Appears to be the case whether or not this compiled into the config or is set in the URL parameters.To Reproduce
This is manifesting in the new ICA map at https://dev.maps.coop/ica/.
See https://github.com/DigitalCommons/ica-project/issues/27#issuecomment-1855529906
Currently you can just visit that above URL, and note that the sidebar is not open.
To attempt to reproduce it in other maps, append
?defaultOpenSidebar=true
to the map URLExpected behavior
The sidebar should be opened automatically when the map is opened.
Additional context
The text was updated successfully, but these errors were encountered: