hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
37 stars 20 forks source link

Wagtail: LayerManager extra button inactive #2922

Closed jmacura closed 2 years ago

jmacura commented 2 years ago

Bug

Describe the bug In Wagtail integrated apps, the extra hamburger menu in LayerManager won't show.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://hub4everybody.lesprojekt.cz/map-demo/
  2. In LayerManager, click on the hamburger extra menu
  3. See nothing happening

Expected behavior The menu shows as usual.

Screenshots image image

Additional context From the inspector, it looks like the code is present, but the dropdown-menu is still invisible. I suspect a conflicting CSS styling.

fzadrazil commented 2 years ago

The issue is caused by missing Popper. I just don't know why it is missing.

image

raitisbe commented 2 years ago

The global jQuery from the cms takes over the operating dropdownmenus and the popper is missing there. Seems that execution doesn't even get to the ngBootstrap where poper should be present. The result should be that "show" class gets added tbesides "dropdown-menu" class

fzadrazil commented 2 years ago

We could remove jQuery included from the CodeRed by adding this code to /website/coderedcms/pages/base.html

{% block required_scripts %}
{% endblock %}

That will override the default block which does the actual import. The issue is it breaks dropdowns in CodeRed then :-)

raitisbe commented 2 years ago

https://github.com/hslayers/hslayers-ng/pull/2945/commits/7ef4991c18c55939a25de18b93e308c720b00edc Solves it