Skip to content

(FEAT): Added support for room multi-filtering #155

Open
Yalilix wants to merge 33 commits into
mainfrom
104-story-1-21-sorting-ui
Open

(FEAT): Added support for room multi-filtering #155
Yalilix wants to merge 33 commits into
mainfrom
104-story-1-21-sorting-ui

Conversation

@Yalilix
Copy link
Copy Markdown
Collaborator

@Yalilix Yalilix commented Mar 24, 2026

What

  • Refactored Rooms filtering UI from a top filter row to a bottom-right floating action menu (FAB-style).
  • Added persistent quick actions for all filter categories: date, duration, room type, campus, and capacity.
  • Reintroduced Reset all filters in the floating menu.
  • Refactored RoomsTabView and BuildingsTabView into smaller view sections/bindings to reduce SwiftUI type-check complexity.
  • Removed legacy, now-unused filter bar components.
  • Updated local lint workflow to exclude generated/dependency sources from SwiftLint scope.

Why

  • Improve one-handed usability by moving filter controls to a thumb-reachable area.
  • Restore native navigation-title behavior (large -> inline on scroll) by removing top-row layout interference.
  • Address compile-time instability caused by overly complex SwiftUI view expressions.
  • Reduce maintenance overhead by deleting obsolete filtering code paths.
  • Eliminate noisy lint failures from third-party/generated files that are outside app ownership.

How

  • Replaced top FilterBar integration in Rooms with an anchored floating menu near the tab bar.
  • Wired floating actions to existing filter sheets/state and applied reset-all through existing view model APIs.
  • Split monolithic SwiftUI modifier chains into explicit computed subviews and bindings.
  • Performed dead-code cleanup of old filter-bar-era files after reference validation.
  • Enforced swiftlint --force-exclude behavior with explicit exclusion rules for .build/checkout paths.

Key checks:

  • 🚩Attached screenshot or recording of the changes in related tickets
  • Code comments where needed
  • No new warnings

Automated tests:

  • 🚩Unit tests added

Manual tests:

  • Big iPhone (iPhone 17 Pro Max)
  • Small iPhone (iPhone SE)

Screenshot / Recording

Screenshot 2026-03-24 at 17 28 45-2 Screenshot 2026-03-24 at 17 28 41

Capacity Filter:
simulator_screenshot_AD7099D7-A206-4C59-AEDE-411F9E97EA93

Campus Filter:
simulator_screenshot_98AF7DE8-4811-464F-8542-160B660ED678

Room Type Filter:

simulator_screenshot_CAFFB469-1757-48F5-9BBC-8DCB0D997BE2

Duration Filter:
simulator_screenshot_A7A5E720-3AF8-4B24-8EEE-D58BFDE8FE9C

Date Filter:
simulator_screenshot_5EEF3F94-FAC7-476D-B658-4FB5B5F13DD3

mmc03-ucb and others added 27 commits October 30, 2025 20:14
…v object for any viewModels, and refactored chain modifiers into readable modularised components
@xleonx0x xleonx0x linked an issue Mar 24, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@xleonx0x xleonx0x left a comment

Choose a reason for hiding this comment

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

The padding on your sheet heading isn't consistent between all the filters.

Some things that stick out:

Campus: You have an option for Any Campus, isn't this the same as not applying the filter at all? same with capacity, room type, duration you have clear options.
Duration: On iphone 16e ios 18 sim, the text looks squashed and distorted on the picker
Capacity: I don't really like the option to add your own capacity kinda defeats the purpose of the radio buttons? I'd change it to a slider if you want them to be able to specify exactly the amount.

@Yalilix
Copy link
Copy Markdown
Collaborator Author

Yalilix commented Mar 24, 2026

The padding on your sheet heading isn't consistent between all the filters.

Some things that stick out:

Campus: You have an option for Any Campus, isn't this the same as not applying the filter at all? same with capacity, room type, duration you have clear options. Duration: On iphone 16e ios 18 sim, the text looks squashed and distorted on the picker Capacity: I don't really like the option to add your own capacity kinda defeats the purpose of the radio buttons? I'd change it to a slider if you want them to be able to specify exactly the amount.

There's no padding involved when dealing with sheets, it's the sizing of the sheet that makes it look inconsistent. sure I can change the sizing of each sheet but I need to manually check each and then compare for all, not ideal workflow.

Duration: I'll remove the font modifier that i tried to enlarge the slider.
Capacity: I would have to disagree here. If UNSW decides to make a room smaller to fill equipments, then our old slider range isn't accurate, and we would have to adjust it. Also, it's not a user-friendly experience if the user wants to slide to a specific number, which sometimes it's not easy to slide to their target number.

@nareeco
Copy link
Copy Markdown

nareeco commented Mar 24, 2026

6 7

@xleonx0x
Copy link
Copy Markdown
Contributor

The padding on your sheet heading isn't consistent between all the filters.

Some things that stick out:

Campus: You have an option for Any Campus, isn't this the same as not applying the filter at all? same with capacity, room type, duration you have clear options. Duration: On iphone 16e ios 18 sim, the text looks squashed and distorted on the picker Capacity: I don't really like the option to add your own capacity kinda defeats the purpose of the radio buttons? I'd change it to a slider if you want them to be able to specify exactly the amount.

@avdn-dev wdyt?

@avdn-dev
Copy link
Copy Markdown
Contributor

The padding on your sheet heading isn't consistent between all the filters.
Some things that stick out:
Campus: You have an option for Any Campus, isn't this the same as not applying the filter at all? same with capacity, room type, duration you have clear options. Duration: On iphone 16e ios 18 sim, the text looks squashed and distorted on the picker Capacity: I don't really like the option to add your own capacity kinda defeats the purpose of the radio buttons? I'd change it to a slider if you want them to be able to specify exactly the amount.

@avdn-dev wdyt?

Just had crunch time at work, will look at this tomorrow

@avdn-dev
Copy link
Copy Markdown
Contributor

avdn-dev commented Apr 1, 2026

The padding on your sheet heading isn't consistent between all the filters.
Some things that stick out:
Campus: You have an option for Any Campus, isn't this the same as not applying the filter at all? same with capacity, room type, duration you have clear options. Duration: On iphone 16e ios 18 sim, the text looks squashed and distorted on the picker Capacity: I don't really like the option to add your own capacity kinda defeats the purpose of the radio buttons? I'd change it to a slider if you want them to be able to specify exactly the amount.

@avdn-dev wdyt?

  1. Agreed with visual padding between the sheet top and the header titles. The sheet content may have inconsistent vertical padding, to check just add a red border on all the sheet content.
  2. The clear options are alright, they are useful for when you add a filter but then want to remove it. We could communicate the intent better, e.g. using destructive button style.
  3. Yep the picker looks distorted, this may be an issue with the picker requiring too much space. Maybe just abbreviate the options to 30m, 1h, etc.
  4. I think the slider can be finicky particularly with a large range available

@Yalilix Yalilix requested a review from xleonx0x April 3, 2026 14:20
@Yalilix
Copy link
Copy Markdown
Collaborator Author

Yalilix commented Apr 10, 2026

Will revamp this PR as we’ve managed to reverse engineer Freerooms’ backend endpoints, allowing us to migrate the filtering logic server-side and better align with the existing API structure.

@Yalilix Yalilix self-assigned this Apr 25, 2026
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.

STORY#4-16: Filtering UI and Connecting Backend API

6 participants