Skip to content

feat: Add event form items that use switches - #250

Open
LunarX wants to merge 5 commits into
mainfrom
add-event-form-items
Open

LunarX wants to merge 5 commits into
mainfrom
add-event-form-items

Conversation

@LunarX

@LunarX LunarX commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Put the switch item code from the kmeet button in a reusable component.

Fix the missing classification info in the detail UI when KMP returns an unspecified classification as explained by the rfc 5545.

I fixed the animation of the kmeet button that used sharedElement instead of sharedBounds.

@LunarX
LunarX requested a review from tevincent October 16, 2026 11:12
@LunarX LunarX self-assigned this Oct 16, 2026
Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Existing event values are not loaded into the new switches, and scrolling and accessibility issues remain unresolved.

3 open findings
What changed in this PR

Adds reusable switch rows to the shared event form and improves event-detail presentation.

Changes:

  • Adds all-day, occupied, and public switches with draft state and localized labels.
  • Reuses switch components and updates shared-bound transitions.
  • Displays unspecified event classification as public.
File Description
CalendarComponents/​Resources/​src/​main/​res/​values/​strings.xml Adds default all-day label.
CalendarComponents/​Resources/​src/​main/​res/​values-sv/​strings.xml Adds Swedish label.
CalendarComponents/​Resources/​src/​main/​res/​values-pt/​strings.xml Adds Portuguese label.
CalendarComponents/​Resources/​src/​main/​res/​values-pl/​strings.xml Adds Polish label.
CalendarComponents/​Resources/​src/​main/​res/​values-nl/​strings.xml Adds Dutch label.
CalendarComponents/​Resources/​src/​main/​res/​values-nb/​strings.xml Adds Norwegian label.
CalendarComponents/​Resources/​src/​main/​res/​values-it/​strings.xml Adds Italian label.
CalendarComponents/​Resources/​src/​main/​res/​values-fr/​strings.xml Adds French label.
CalendarComponents/​Resources/​src/​main/​res/​values-fi/​strings.xml Adds Finnish label.
CalendarComponents/​Resources/​src/​main/​res/​values-es/​strings.xml Adds Spanish label.
CalendarComponents/​Resources/​src/​main/​res/​values-el/​strings.xml Adds Greek label.
CalendarComponents/​Resources/​src/​main/​res/​values-de/​strings.xml Adds German label.
CalendarComponents/​Resources/​src/​main/​res/​values-da/​strings.xml Adds Danish label.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​modifier/​EventSharedBounds.kt Adds status transition keys.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​models/​EventDraft.kt Adds switch values to drafts.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​form/​EventFormState.kt Holds and exports switch state.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​form/​EventForm.kt Adds switches and shared bounds.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​form/​component/​AllDaySwitch.kt Adds all-day control.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​detail/​EventDetail.kt Updates shared-bound transitions.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​component/​OccupiedStatus.kt Shares occupancy display and switch.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​component/​ListItemSwitch.kt Extracts reusable switch row.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​component/​KMeetButton.kt Uses reusable switch row.
CalendarComponents/​EventDetail/​src/​main/​kotlin/​com/​infomaniak/​calendar/​components/​eventdetail/​component/​ClassificationStatus.kt Shares classification display and switch.
app/​src/​main/​java/​com/​infomaniak/​calendar/​utils/​EventExt.kt Maps unspecified classification to public.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +70 to +71
initialIsOccupied: Boolean = true,
initialIsPublic: Boolean = true,
onCheckedChange = onCheckedChange,
content = content,
leadingContent = leadingContent,
trailingContent = { Switch(checked = checked(), onCheckedChange = onCheckedChange) },
Comment on lines +89 to +93
Section {
OccupiedStatusSwitch(
checked = state.isOccupied::value,
onCheckedChange = { isChecked -> state.isOccupied.value = isChecked },
modifier = Modifier.eventSharedBounds(EventSharedElement.OccupiedStatus),
@sonarqubecloud

Copy link
Copy Markdown

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