Skip to content

Conversation

Ahmedhossamdev
Copy link
Member

Fix: #246

@coveralls
Copy link

coveralls commented Sep 25, 2025

Coverage Status

coverage: 74.664% (+0.09%) from 74.579%
when pulling a50ade1 on feat/sort-routes-by-id-246
into d0ce440 on main.

Copy link
Contributor

@Copilot 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

This PR implements route sorting by numeric ID to address issue #246. Routes are now sorted primarily by numeric values extracted from their shortName, with fallback to alphabetical sorting for non-numeric routes.

Key Changes

  • Added sorting logic to the ViewAllRoutesModal component to sort routes by numeric ID
  • Updated corresponding test to expect the first route after sorting rather than the first route in the original array

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/routes/ViewAllRoutesModal.svelte Added numeric sorting logic to the filterRoutes function
src/components/routes/tests/ViewAllRoutesModal.test.js Updated test to verify sorting behavior by expecting the first sorted route

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

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

looks good, nice work!

I'm creating a followup task for someone to do at some point to extract out this function into a helper, but it shouldn't hold up merging the change.

@aaronbrethorst aaronbrethorst merged commit 1befe0b into main Sep 29, 2025
4 checks passed
@aaronbrethorst aaronbrethorst deleted the feat/sort-routes-by-id-246 branch September 29, 2025 02:09
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.

Sort the list of available routes in numerical order by route_id:

3 participants