diff --git a/umap/static/umap/js/modules/help.js b/umap/static/umap/js/modules/help.js index 37cbaedb..5d027e77 100644 --- a/umap/static/umap/js/modules/help.js +++ b/umap/static/umap/js/modules/help.js @@ -193,6 +193,14 @@ export default class Help { show(entries) { const container = DomUtil.add('div') DomUtil.createTitle(container, translate('Help')) + for (const name of entries) { + DomUtil.element({ + tagName: 'div', + className: 'umap-help-entry', + parent: container, + innerHTML: ENTRIES[name], + }) + } this.dialog.open({ template: container }) } diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 7d26aa67..ee13aa31 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -417,10 +417,10 @@ ul.photon-autocomplete { width: 16px; height: 16px; margin-inline-start: 5px; - background-position: -4px -4px; + background-position: 2px -4px; background-repeat: no-repeat; background-image: url('./img/16.svg'); - background-color: var(--color-darkGray) !important; + background-color: transparent !important; vertical-align: middle; text-indent: -9999px; min-height: inherit; diff --git a/umap/tests/integration/test_edit_map.py b/umap/tests/integration/test_edit_map.py index 78e87935..64d8fb13 100644 --- a/umap/tests/integration/test_edit_map.py +++ b/umap/tests/integration/test_edit_map.py @@ -21,6 +21,16 @@ def test_can_edit_name(page, live_server, tilelayer): ) +def test_can_display_help(page, live_server, tilelayer): + page.goto(f"{live_server.url}/en/map/new/") + + page.get_by_title("Edit map name and caption").click() + help_button = page.locator(".panel .umap-field-description .umap-help-button") + expect(help_button).to_be_visible() + help_button.click() + expect(page.locator("dialog").first).to_contain_text("Text formatting") + + def test_can_edit_name_on_click_on_toolbar(page, live_server, tilelayer): page.goto(f"{live_server.url}/en/map/new/") page.locator(".umap-main-edit-toolbox .map-name").click()