Single source of truth for geo coordinate formatting
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
### Description
[We implemented a manual format](https://github.com/getodk/central-frontend/pull/1661) for geo coordinates on the client side (padding integers with `.0` and removing spaces). This was required to ensure the client's emitted value matches what xforms-engine returns, preventing a reactivity loop that was destroying in-flight map edits. Having formatting in both places isn't ideal, since it can easily regress.
Investigate the best architectural approach to establish a single source of truth for geo coordinate formatting.
- Exposing the engine's internal codec functions was considered during the fix, but this doesn't cleanly fit the engine's current structure.
- The solution doesn't strictly have to be sharing the codec, as long as we can find a sustainable way to keep the client and engine formatting in sync.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the client-side geo-coordinate formatting with the formatting returned by xforms-engine, including the manual padding and space removal described in the issue. Investigate how the engine's codec functions and client formatting can stay synchronized without assuming the codec must be exposed. Done means establishing a sustainable single source of truth that prevents formatting regressions and reactivity loops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100