Skip to content

Show read-only popups on GeoJSON pages by default#855

Closed
JeroenDeDauw wants to merge 2 commits into
masterfrom
fix/738-geojson-readonly-popups
Closed

Show read-only popups on GeoJSON pages by default#855
JeroenDeDauw wants to merge 2 commits into
masterfrom
fix/738-geojson-readonly-popups

Conversation

@JeroenDeDauw
Copy link
Copy Markdown
Member

@JeroenDeDauw JeroenDeDauw commented Apr 2, 2026

Summary

  • GeoJSON page marker popups now show read-only text by default, with an "Edit" link to switch to textarea editing
  • Previously, clicking any marker immediately showed editable textareas and a save button, which was confusing for users just viewing the page
  • The editor with draw controls still starts immediately for users with edit permissions (preserving the existing workflow)
  • The change is in LeafletEditor.js only — the _onEditableFeature popup now has a read view and an edit view

Closes #738

Test plan

  • All 217 Maps tests pass
  • CI passes
  • Clicking a GeoJSON marker shows read-only popup with "Edit" link
  • Clicking "Edit" link switches popup to textarea editing mode
  • Draw controls still appear immediately for authorized users

🤖 Generated with Claude Code

Previously, users with edit permissions would immediately see
editable textareas in GeoJSON map popups, even when just viewing
the page. This was confusing since the UI appeared editable in
read mode.

Now the map always starts in view-only mode with plain text
popups. Users with edit permissions see a pencil button on the
map that switches to the full editor with draw controls and
editable popups when clicked.

Closes #738

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JeroenDeDauw
Copy link
Copy Markdown
Member Author

Starting in edit mode is nice though, so this is not a good solution

Previously, clicking a marker on a GeoJSON page immediately showed
editable textareas and a save button, which was confusing in read
mode. Now popups show read-only text content by default, with an
"Edit" link that switches to the textarea editing interface.

The editor with draw controls still starts immediately for users
with edit permissions, preserving the existing workflow.

Closes #738

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JeroenDeDauw
Copy link
Copy Markdown
Member Author

JeroenDeDauw commented Apr 2, 2026

Claude: Thanks for the feedback! I've revised the approach: the editor still starts immediately (draw controls available right away), but the marker popups now show read-only text by default with an "Edit" link. Clicking the link switches the popup to the textarea editing interface. This way the editing workflow is preserved while the popups no longer look confusingly editable in read mode.

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.

Geojson popups should not be editable when not in editing mode

1 participant