-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporate "Priority" levels in sorting #6
Comments
AFAIK the start/date time validity depends on how someone defines the public message in avail and can definitely not make sense (since someone might just pick a large arbitrary date range if it's unknown at the time and then go in and deactivate it when it's done). As such I'm thinking it's not worth it to add yet another level of sorting for it |
Had a chance to look back through old Avail issues. From https://github.com/umts/pvta-avail/issues/1932:
I think it's still worth sorting in descending order by the time portion of |
Ok so to sum up the plan for this, the sorting of public messages will consider, in order:
I don't think we need to preserve lexical ordering for messages as a final fallback - |
I spoke to @benmelz about this briefly but we wanted to get your opinion @sherson, for each priority level we could add some symbol/color to each message to indicate it's priority level (red for emergency, orange for high, etc). Especially since this would show the order of which the messages are appearing in, rather than it being seemingly random (especially since the sort order doesn't make apparent sense from the front end) |
Seems reasonable, though if that ends up increasing the height of each item, it might not be a bad idea to make it optional (via URL parameter) since we're displaying it in a small iframe. For reference, if you download the Avail myStop app, you can see how they render it. Not sure if Transit app distinguishes between priority levels... at a quick glance I don't see a difference between low and medium for the two public messages currently posted (both have yellow warning triangles). |
I might be a fan of just colored bars as you have here. As I did with this issue, I think I'm gonna break it out to keep to another ticket though, so we can move this convo there. |
Originally posted by @sherson in #4 (comment)
...
However, now that I think about it, we ought to sort by
Priority
too. How about:Priority
, then ascending by route (where general messages [ones that aren't associated with any routes] are after route-specific messages at the same priority level, and we use the lowest route number when there are multiple routes associated with a single detour), then descending by the date portion ofFromDate
, then descending by the time portion ofFromTime
(so newest detour shows first if route and priority are the same)Priority values appear to be:
No matter what we do, the nature of grouping by route means we may occasionally end up with detours for a specific route not being next to each other in the list (and sorting by priority will affect that as well).
I have a vague recollection of
FromTime
maybe not being used (or not being used in a way that make sense), and what there's now is weird (explained in this comment):But I can't think of harm being caused by sorting by
FromDate
and thenFromTime
.Am open to suggestions.
The text was updated successfully, but these errors were encountered: