feat(ui): simplify event date selection - #29
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR simplifies event date selection in CreateEventScreen by defaulting to a single-date selection and gating multi-date selection behind an explicit checkbox. It also extracts the selection logic into a reusable helper with unit tests, and shortens the participation CTA labels to Confirmar / Confirmado to avoid uneven button wrapping.
Changes:
- Extract
toggleCalendarDateSelectionandcollapseCalendarSelectionToSingleDatehelpers with unit tests, and use them inCreateEventScreento drive a checkbox-gated multi-date mode. - Shorten participation CTA labels in
ScheduleScreenandEditScheduleScreentoConfirmar/Confirmado. - Wire the new test file into
mobile/package.jsonand document the UX decisions inmobile/docs/TASKS.md.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mobile/src/utils/eventCalendarSelection.ts | New helper module for single/multi-date toggle and collapse logic. |
| mobile/tests/eventCalendarSelection.test.ts | Unit tests covering the new selection helpers. |
| mobile/src/screens/app/CreateEventScreen.tsx | Adds allowMultipleDates state, checkbox UI, and delegates day-press logic to the helper. |
| mobile/src/screens/app/ScheduleScreen.tsx | Shortens confirm CTA to Confirmar / Confirmado. |
| mobile/src/screens/app/EditScheduleScreen.tsx | Shortens confirm CTA to Confirmar / Confirmado. |
| mobile/package.json | Registers the new test file in the test:unit script. |
| mobile/docs/TASKS.md | Documents the CTA and single-date-by-default UX decisions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Confirmar/Confirmadoto avoid uneven button wrappingTesting
npx tsc --noEmitnpx tsc -p tsconfig.test.json --outDir C:/dev/mjcp/mobile/.tests-dist-event-calendar-uxC:/dev/mjcp/mobile/.tests-dist-event-calendar-ux/tests/*