getodk / getodk/web-forms

The select1 with "map" appearance shows "Point saved" when no itemset options loaded

Open
#834 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior

When the GeoJSON itemset data is malformed (missing the `id` / `title` properties used by the form), the form should not claim that a selection has been made. Either no "Point saved" should appear, or the form should surface a clear "options could not be loaded" error so the form author can fix the data.

## Observed Behavior

The map renders with no pins, but the status bar reads "Point saved" as if the user had selected something. Nothing is actually selected, the consumer's option lookup matches undefined === undefined against the empty option list, so the UI treats the empty current value as a valid selection.

[Reported here.](https://github.com/getodk/web-forms/issues/828#issuecomment-4733293475)

## Reproduction Steps

Form (XML or XLSX file): Select one from map bounds.xml + attachment bounds.geojson (features have empty properties: {}).
https://test.getodk.cloud/projects/649/forms/Select%20one%20from%20map%20bounds/submissions

Steps:
1. Open the form for a new submission.
2. Navigate to the select1 appearance="map" question.
3. Without tapping any pin, observe the map and the status banner.

## Environment

- Browser version:
- OS:
- Web Forms version:

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the “Select one from map bounds” form and its bounds.geojson attachment, then trace the select1 map appearance and status banner behavior when the GeoJSON features have empty properties. Done means an empty option list no longer produces “Point saved” without a selection, and the behavior is covered by an appropriate test or verified against the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.