Skip to content

fix: subway status pills overlapping with status text#3063

Merged
deanshi merged 1 commit into
mainfrom
deanshi/fix_subway_status_overlap
May 14, 2026
Merged

fix: subway status pills overlapping with status text#3063
deanshi merged 1 commit into
mainfrom
deanshi/fix_subway_status_overlap

Conversation

@deanshi
Copy link
Copy Markdown
Contributor

@deanshi deanshi commented May 12, 2026

Asana task: Screens bug: overlapping elements in Subway Status

Description
Screenshot 2026-05-12 at 3 14 04 PM

  • seems like having min-width was causing it so that the divs weren't respecting the full size of the pills
  • alongside that, we needed to add Shuttle as a specific alert type to show the alert link
  • removes min-width from the container for the RoutePill and also pulled out statuses into a boolean check for showing the alert URL

@deanshi deanshi requested a review from a team as a code owner May 12, 2026 19:28
if (
fittingStep === FittingStep.PerAlertEffect &&
(isStopsSkipped || isSuspension)
shouldShowAlertLink(alertStatus)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a little confused as to why we do this for specific statuses rather than "not delays", which is the one status that has its own shortening logic for the PerAlertEffect step. This is the last step — if we've reached this point, the text is still overflowing and there's nothing else left to try, so we should try something regardless of status.

Basically right now the logic for this PerAlertEffect step is:

  1. If stops-skipped, shuttle, or suspension: replace location with URL
  2. If delay: shorten status string to just "Delays"
  3. If (something that's not one of the above): do nothing?

I would propose this makes more sense as:

  1. If delay: shorten status string to just "Delays"
  2. Otherwise: replace location with URL

These two are sort of equivalent right now since Shuttle/Suspension/Skipped/Delay covers all the alert types that currently go into Subway Status, but I think simpler logic that covers all possibilities would be an improvement. (it actually doesn't currently account for "Single Tracking", which is status text that can result from a Delay alert)

Copy link
Copy Markdown
Contributor Author

@deanshi deanshi May 13, 2026

Choose a reason for hiding this comment

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

Yep, those changes make sense. I'll add those changes and try to clean-up the code a little bit as well.

Is there a world where we want to also replace the location with the URL when we're displaying "Delays" as well? Does shortening the Delays guarantee there will be enough space for the location?

It seems like it might, but wanted to check in case there were some locations that were particularly long for the GL.

Screenshot 2026-05-13 at 9 47 24 AM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a world where we want to also replace the location with the URL when we're displaying "Delays" as well? Does shortening the Delays guarantee there will be enough space for the location?

I think Yes and No, respectively, but delays actually having a location (as opposed to being whole-line, which leaves the location field blank) is unusual enough that maybe we could punt on that. The alternative would be creating an extra resizing step, which would be unused by any alert status other than delays, so delays could do something like full location => abbrev location => abbrev to "Delays" => replace location with URL (if that's even the right sequence, I'm not sure).

- seems like having min-width was causing it so that the divs weren't
  respecting the full size of the pills
- alongside that, we needed to add Shuttle as a specific alert type to
  show the alert link
- removes min-width from the container for the RoutePill and adjusted
  logic so that if it's a Delay, we only change the status whereas the
  other statuses change the location
@deanshi deanshi force-pushed the deanshi/fix_subway_status_overlap branch from 269491b to dd01824 Compare May 14, 2026 17:23
@deanshi deanshi merged commit dcbb38e into main May 14, 2026
12 checks passed
@deanshi deanshi deleted the deanshi/fix_subway_status_overlap branch May 14, 2026 17:33
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.

2 participants