Skip to content

Fix/disable multi resource select#1377

Open
n3xta wants to merge 3 commits intomainfrom
fix/disable-multi-resource-select
Open

Fix/disable multi resource select#1377
n3xta wants to merge 3 commits intomainfrom
fix/disable-multi-resource-select

Conversation

@n3xta
Copy link
Copy Markdown
Collaborator

@n3xta n3xta commented Apr 7, 2026

Summary of Changes

#1366

Note on the changes: the calendar do have built-in selection parameters but it's for calendar time-slot selection, not for this sidebar resource checklist.

Our code already uses FullCalendar built-ins, the room picker itself is custom MUI UI logic, so FullCalendar can gate drag/select behavior on the grid. It does not natively control this checklist’s single vs multi resource selection state.

Checklist

  • I linked relevant issue(s) in the Development section
  • I checked for existing implementations and confirmed there is no duplication
  • I thoroughly tested this feature locally
  • I added or updated unit tests (or explained why not in the PR description)
  • I attached screenshots or a video demonstrating the feature (or explained why not in the PR description)
  • I incorporated Copilot's feedback (or explained why not in the PR description), and marked conversations as resolved
  • I confirmed my PR passed all unit and end-to-end (E2E) tests
  • I confirmed there are no conflicts
  • I requested a code review from at least one other teammate

Screenshots / Video

Screen.Recording.2026-04-06.at.21.51.16.mov

Copilot AI review requested due to automatic review settings April 7, 2026 01:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds tenant-controlled configuration to disable multi-resource selection in the booking sidebar room checklist (per #1366), including UI plumbing in the schema editor and default schema values.

Changes:

  • Introduces calendarConfig.multipleResourceSelect in the tenant schema (default false).
  • Updates the booking SelectRooms component to enforce single-resource selection when disabled (and adjusts UI cues).
  • Adds unit coverage for SelectRooms behavior under both config modes and updates test tenant schema helpers.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
booking-app/components/src/client/routes/booking/components/SelectRooms.tsx Enforces/visualizes single- vs multi-select based on calendarConfig.multipleResourceSelect.
booking-app/components/src/client/routes/components/SchemaProvider.tsx Extends schema typing and sets default for multipleResourceSelect.
booking-app/components/src/client/routes/super/schemaEditor.tsx Adds schema editor toggle for calendarConfig.multipleResourceSelect.
booking-app/components/src/testHelpers/testTenantSchemas.ts Updates test tenant schema defaults to include multipleResourceSelect: false.
booking-app/tests/unit/SelectRooms.multipleResourceSelect.unit.test.tsx New unit tests validating selection behavior for both config states.
Comments suppressed due to low confidence (1)

booking-app/components/src/client/routes/booking/components/SelectRooms.tsx:176

  • In single-select mode the component still renders a MUI Checkbox (screen reader role: checkbox) but swaps in radio-style icons. This can be confusing for assistive tech and keyboard expectations; if the intent is single-select, consider using Radio/RadioGroup (or otherwise keep checkbox visuals/semantics aligned with behavior).
                checkedIcon={
                  allowMultipleResourceSelect ? undefined : <CheckCircleIcon />
                }
                inputProps={{
                  "aria-label": `${room.roomId} ${room.name}`,
                }}
                data-testid={`room-option-${room.roomId}`}
                disabled={disabled}
              />
            }
            label={`${room.roomId} ${room.name}`}
            key={room.name}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@n3xta
Copy link
Copy Markdown
Collaborator Author

n3xta commented Apr 7, 2026

Didn't commit copilot's review: UX choice. I've thought of this but this will increase user's chance of accidentally losing their selected time slots and will have to do it again.

@n3xta n3xta requested a review from rlho April 7, 2026 02:11
Copy link
Copy Markdown
Collaborator

@rlho rlho left a comment

Choose a reason for hiding this comment

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

LGTM!
@n3xta (cc: @nopivnick)
The default is false, so please remember to set this value to true in prod schema before the prod release.

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.

3 participants