Skip to content
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

feat: hide CR timetable in the presence of special alerts #2301

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

paulswartz
Copy link
Member

@paulswartz paulswartz commented Jan 3, 2025

Summary of changes

Asana Ticket: CR disruption timetable improvements

This adds special-case handling for two types of alerts where we want to hide the timetable from view. One case is expected to have a PDF as the URL for the alert, and the other does not. In the PDF case, we hide the timetable and provide the link to the PDF. In the other, we hide the timetable and say "PDF upcoming."

This also changes the rendering of the alert to drop the special-case text, and to say "View PDF schedule" if the PDF link is available.


General checks

  • Are the changes organized into self-contained commits with descriptive and well-formatted commit messages? This is a good practice that can facilitate easier reviews.
  • Testing. Do the changes include relevant passing updates to tests? This includes updating screenshots. Preferably tests are run locally to verify that there are no test failures created by these changes, before opening a PR.
  • Tech debt. Have you checked for tech debt you can address in the area you're working in? This can be a good time to address small issues, or create Asana tickets for larger issues.

New UI, or substantial UI changes

  • Cross-browser compatibility is less of an issue now that we're no longer supporting IE, but changes still need to work as expected in Safari, Chrome, and Firefox.
  • Are interactive elements accessible? This includes at minimum having relevant keyboard interactions and visible focus, but can also include verification with screen reader testing.
  • Other accessibility checks such as sufficient color constrast, or whether the layout holds up at 200% zoom level.

New endpoints, or non-trivial changes to current endpoints

  • Have we load-tested any new pages or internal API endpoints that will receive significant traffic? See load testing docs
  • If this change involves routes, does it work correctly with pertinent "unusual" routes such as the combined Green Line, Silver Line, Foxboro commuter rail, and single-direction bus routes like the 170?

@paulswartz paulswartz added the dev-green Deploy to dev-green label Jan 3, 2025
@paulswartz paulswartz force-pushed the ps-cr-alerts-hide-timetable branch from d2c8407 to aaf921d Compare January 3, 2025 19:56
@github-actions github-actions bot removed the dev-green Deploy to dev-green label Jan 6, 2025
@paulswartz paulswartz marked this pull request as ready for review January 7, 2025 13:47
@paulswartz paulswartz requested a review from a team as a code owner January 7, 2025 13:47
@paulswartz paulswartz force-pushed the ps-cr-alerts-hide-timetable branch from c546788 to f945883 Compare January 7, 2025 17:01
@thecristen thecristen self-assigned this Jan 7, 2025
@paulswartz paulswartz force-pushed the ps-cr-alerts-hide-timetable branch from 6ada120 to ca24b5c Compare January 8, 2025 14:29
@paulswartz paulswartz requested a review from thecristen January 8, 2025 14:47
@paulswartz
Copy link
Member Author

@thecristen I made the changes as fixup! commits; I'll clean up the history after approval.

else
alerts
end
Enum.uniq_by(alerts, & &1.id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!!

Copy link
Collaborator

@thecristen thecristen left a comment

Choose a reason for hiding this comment

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

Love it!! Thanks so much 👍🏼

@paulswartz paulswartz force-pushed the ps-cr-alerts-hide-timetable branch from ca24b5c to f8fcfcc Compare January 9, 2025 21:03
@paulswartz paulswartz merged commit 8ff8ca0 into main Jan 9, 2025
17 checks passed
@paulswartz paulswartz deleted the ps-cr-alerts-hide-timetable branch January 9, 2025 21:18
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