getodk / getodk/web-forms

Prepare for standardization of `Temporal`

Open
#199 1 comment 0 reactions 0 assignees View on GitHub
@odk/xpath
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

ODK XForms specifies a variety of date/time/datetime XPath functionality, much of which we have implemented with a polyfill for the [`Temporal` proposal](https://github.com/tc39/proposal-temporal).

We haven’t since updated that polyfill (my bad! I should have tracked this much sooner). While `Temporal` is [not yet supported](https://caniuse.com/?search=temporal) by any of our target browsers/runtimes, it is [Stage 3](https://tc39.es/process-document/):

> The proposal has been recommended for implementation. No changes to the proposal are expected, but some necessary changes may still occur due to web incompatibilities or feedback from production-grade implementations.

To do:

- [ ] Update to one of the polyfills [recommended for production](https://github.com/tc39/proposal-temporal?tab=readme-ov-file#polyfills), making updates to our usage as necessary
- [ ] Establish a plan for phasing out the polyfill as runtimes implement pertinent aspects of the proposal
- [ ] Periodically check for updates to both of the above until they become moot (at which point we can close this issue)

I don’t expect usage updates to be a terribly heavy lift, and there should be little guesswork involved as I believe we have excellent test coverage of the affected functionality.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Temporal polyfill usage and the existing tests covering the affected date, time, and datetime XPath functionality. Update the polyfill and any usage required by the production recommendation, then run those tests to confirm behavior. Document a plan for phasing out the polyfill as target runtimes add support.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.