Skip to content

fix: Compare location by id then long rather than just long - #844

Merged
RyanYensch merged 2 commits into
masterfrom
bug-lower-sort
Aug 1, 2026
Merged

fix: Compare location by id then long rather than just long#844
RyanYensch merged 2 commits into
masterfrom
bug-lower-sort

Conversation

@RyanYensch

Copy link
Copy Markdown
Member

What

Sorted the lower-to-upper campus by building ID, then by longitude, then by name, rather than just longitude.

Why

There are 3 buildings for which we do not have the location data but do have the ID for, so it was comparing by 0 and placing those buildings in the wrong location.

How

Got the ID for the room (e.g. K-D17 becomes 17) and used that as the main comparator; if they have the same ID, it then uses the longitude to determine which is higher/lower; if somehow they are identical, it then does it alphabetically for the building name.

Key checks:

  • 🚩Attached screenshot or recording of the changes in related tickets
  • No new warnings

Manual tests:

  • Big Screen (PC Monitor)
  • Small Screen (Laptop monitor)

Screenshot / Recording

Before (prod)

Lower sort

image

Upper sort

image

After

Lower Sort

image

Upper sort

image

Upper Sort

@RyanYensch
RyanYensch requested a review from a team as a code owner August 1, 2026 12:11
@RyanYensch RyanYensch added the bug Something isn't working label Aug 1, 2026

@CrispyKhim CrispyKhim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm <3

@RyanYensch
RyanYensch merged commit 5a646d8 into master Aug 1, 2026
4 checks passed
@RyanYensch
RyanYensch deleted the bug-lower-sort branch August 1, 2026 13:07
RyanYensch added a commit that referenced this pull request Aug 2, 2026
* 824 unable to select time all rooms page (#827)

* changed value to defaultValue to fix bug with not being able to select time on all rooms page

* added unit test

* removed comment

* fixed linting errors

* fix: Compare location by id then long rather than just long (#844)

* fix: Compare location by id then long rather than just long

* fix: linting issues

---------

Co-authored-by: Joshua Pozzolungo <jpozzolungo2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants