Skip to content

Conversation

@latin-panda
Copy link
Collaborator

@latin-panda latin-panda commented Dec 30, 2025

Closes #560

WIP

Questions:

  • Advance panel - UX to verify:
    • Longitude and latitude should always have a value. So, when the field is cleared, restore the last saved value.
    • Close panel after value was updated, save new values, and refresh the feature, refocus map view to fit the feature. Then, the user will need to select again a vertex to view. This simplifies updating the status bar and the advanced panel, and allows reusing logic within the dialog flow, too.
    • No validation or error messages are displayed in the advanced panel
  • Dialog - UX to verify:
    • Paste on input or upload a GeoJSON/CSV file to replace the coordinates of the feature (point, trace, shape).
      • Basic validation errors are displayed in the dialog
      • When the value is correct, the dialog is closed, save new value, refresh feature, refocus map, deselect feature (same flow as advanced panel)
      • If a file is uploaded, the paste input is cleared. If a value is pasted in the input, then the upload input is cleared.

I have verified this PR works in these browsers (latest versions):

  • Chrome
  • Firefox
  • Safari (macOS)
  • Safari (iOS)
  • Chrome for Android
  • Not applicable

What else has been done to verify that this works as intended?

Why is this the best possible solution? Were any other approaches considered?

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Do we need any specific form for testing your changes? If so, please attach one.

What's changed

@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2025

🦋 Changeset detected

Latest commit: b910e8b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@getodk/web-forms Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

mapFeatures?.saveFeature(feature);
// Refresh selected vertex.
const vertexIndex = feature.get(SELECTED_VERTEX_INDEX_PROPERTY) as number | undefined;
events.onVertexSelect(getVertexByIndex(feature, vertexIndex));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refresh updates the status bar and the advanced panel after a vertex is deleted or updated.

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.

Editing coordinates for a vertex

2 participants