Skip to content

Create the hide note layer button when that layer is active#6891

Closed
Robot8A wants to merge 4 commits intoopenstreetmap:masterfrom
Robot8A:add_remove_note_layer_button
Closed

Create the hide note layer button when that layer is active#6891
Robot8A wants to merge 4 commits intoopenstreetmap:masterfrom
Robot8A:add_remove_note_layer_button

Conversation

@Robot8A
Copy link
Copy Markdown
Member

@Robot8A Robot8A commented Mar 14, 2026

Description

Would solve #867 by adding a new button to hide the note layer just below the add note button. This button would only appear when the note layer is active. A user who activated the layer by clicking the add note button would expect a button to hide it in the vicinity of where they clicked.

image

How has this been tested?

Run locally via docker compose, open the locally hosted website in my browser.
Toggle the note layer via the layer panel, and the hide note layer button appears and disappears.
Click the add note button on the side, and the hide note layer button appears (as the note layer is activated).

Edit: Currently modifying the existing tests so they can handle the new functionality. I will remove the draft status when this is done.

Edit 2: Finally managed to get the tests to work correctly on my side. Removing the draft status.

@Robot8A Robot8A marked this pull request as draft March 14, 2026 12:31
@gravitystorm
Copy link
Copy Markdown
Collaborator

I don't think this is a good approach, for a few reasons:

  • We have multiple overlay layers, which are shown in the layers menu. I know that it's not great UI as-is, but adding a button for just one of the layers is inconsistent
  • There's some ambiguity here around activation state. When the button is in active mode (as shown), but the icon has a crossed out eye, it's not clear whether the button is to show the layer or to hide it.
  • If we added such a button, it should be grouped with the other note button
  • I think that it's too niche a problem to have the button showing all the time, but I also wouldn't want buttons appearing and disappearing.

So overall I don't think this is the answer.

@tomhughes
Copy link
Copy Markdown
Member

This is better than #6890 but I agree with @gravitystorm that it's not really very nice.

I suspect the correct solution is along the lines of that originally proposed in #867 of having the note layer turn off once the panel is closed - possibly the new note alone should be left to address my concerns in #867 (comment)?

@Robot8A Robot8A marked this pull request as ready for review March 16, 2026 11:29
@gravitystorm
Copy link
Copy Markdown
Collaborator

@Robot8A Thanks for your suggestion, but based on the comments above we're going to decline this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants