Skip to content

Mobile: time and date-time questions, new display logic, unknown question types - #1145

Open
idormenco wants to merge 9 commits into
mobilefrom
feat/mobile-time-datetime-questions
Open

idormenco wants to merge 9 commits into
mobilefrom
feat/mobile-time-datetime-questions

Conversation

@idormenco

@idormenco idormenco commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New question types

  • Time and date-time questions, in observer forms, the PSI questionnaire and citizen forms.
  • Answers are stored the way the API expects:
    • Time is a time of day, HH:mm:ss.
    • Date-time is an ISO timestamp.
  • Date questions pick a calendar day only and keep it without a time zone shift. Before, a date could move to the previous or next day depending on the phone's time zone.
  • On Android, date and time questions each open a single picker dialog, while date-time opens both, one after the other.

Display logic

  • Select parents support the new AnyOf / All conditions, matched against optionIds.
  • Older rules that name one option in value keep working.
  • Number and rating parents compare as numbers, so 10 > 9 is now true; before, they were compared as text.

Unknown question types

  • A question type this version doesn't know shows a notice asking the observer to update the app. It never blocks the form, even when the question is required.
  • Its existing answers are kept when the form is saved, not dropped.

Answer timestamps

  • Each answer carries createdAt / lastUpdatedAt. These stay the same when the answer is unchanged.

Translations

  • Placeholders for the new inputs and the unsupported-question notice, in every app language.

Splash screen

  • The logo on the loading screen was tiny. The old splash setting shrank the whole full-screen image into the small Android 12+ splash icon, so the logo ended up about 40dp wide.
  • The splash now uses the expo-splash-screen plugin with a logo-only image (assets/icons/splash-logo.png), 190dp wide on Android and 280pt on iOS. 190dp is the widest the logo can be while staying inside the circle Android shows.
  • Needs a new native build; an OTA update won't change the splash screen.

Deleting a submission

  • With multiple submissions per form enabled, pressing back after deleting a submission returned to that deleted submission's delete preview. Deleting now goes back to the form's submissions list the preview was opened from.

Checks

  • tsc --noEmit and ESLint pass.
  • Not yet tested on a device.

ion.dormenco added 2 commits October 28, 2026 11:38
… question types

- Answer time and date-time questions; date questions pick and keep a calendar day
  without a time zone shift.
- Display logic compares number and rating answers as numbers.
- A question type the app doesn't know shows a notice and never blocks the form.
- Translations for the new placeholders and notice.
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
votemonitor Ready Ready Preview Nov 3, 2026 9:17am UTC

Request Review

The legacy splash config shrank the whole full-screen image into the
Android 12+ splash icon, leaving the logo about 40dp wide. Use the
expo-splash-screen plugin with a logo-only image: 190dp on Android (the
widest that stays inside the splash icon's visible circle) and 280pt on iOS.
… preview

Deleting pushed the form's submissions screen on top of the delete preview,
so back went to the preview of the deleted submission. Go back to the
submissions screen it was opened from instead.
…e delete button

Long forms pushed the answers and the Delete button below the screen with no way to scroll, so observers couldn't confirm the deletion.
Saving updated the polling station information card on the home screen while
Android was still re-attaching it during the back transition, which crashed
with "addViewAt: failed to insert view". The home screen now shows changes
to that card only once its transition has ended.
They are expected on observers' phones and buried the real errors. One check,
isExpectedApiError, drops them in the API error reporter and in Sentry's
beforeSend, and the polling station and citizen form loaders no longer send
their own messages for them. The [API FAILED] console log, which Sentry kept as
a breadcrumb with the full stack, now prints only in development.
Add a "Time and date settings" page, reached from the More screen for
observers and citizens, where the user picks a 24 or 12-hour clock and a
date format (YYYY-MM-DD, DD.MM.YYYY, DD/MM/YYYY or MM/DD/YYYY). The choice
is stored on the device and used by every date and time shown in the app
and by the time pickers. Translations added for all app languages.
day: "2-digit",
year: "numeric",
})}
{time && formatDate(time)}
hour: "2-digit",
minute: "2-digit",
})}
{time && formatTime(time)}

This branch was successfully deployed

1 active deployment
Preview — 57a9c746 Deployed Nov 3, 2026 by vercel[bot]
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.

2 participants