fixup: restore help contents and fix button icon

Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
This commit is contained in:
David Larlet 2025-02-06 10:28:05 -05:00
parent e8e06da149
commit b214f4109c
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
3 changed files with 20 additions and 2 deletions

View file

@ -193,6 +193,14 @@ export default class Help {
show(entries) { show(entries) {
const container = DomUtil.add('div') const container = DomUtil.add('div')
DomUtil.createTitle(container, translate('Help')) 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 }) this.dialog.open({ template: container })
} }

View file

@ -417,10 +417,10 @@ ul.photon-autocomplete {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-inline-start: 5px; margin-inline-start: 5px;
background-position: -4px -4px; background-position: 2px -4px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url('./img/16.svg'); background-image: url('./img/16.svg');
background-color: var(--color-darkGray) !important; background-color: transparent !important;
vertical-align: middle; vertical-align: middle;
text-indent: -9999px; text-indent: -9999px;
min-height: inherit; min-height: inherit;

View file

@ -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): def test_can_edit_name_on_click_on_toolbar(page, live_server, tilelayer):
page.goto(f"{live_server.url}/en/map/new/") page.goto(f"{live_server.url}/en/map/new/")
page.locator(".umap-main-edit-toolbox .map-name").click() page.locator(".umap-main-edit-toolbox .map-name").click()