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: Open the detour modal from a notification #2825

Conversation

joshlarson
Copy link
Contributor

@joshlarson joshlarson marked this pull request as ready for review September 26, 2024 22:23
@joshlarson joshlarson requested a review from a team as a code owner September 26, 2024 22:23
@firestack firestack force-pushed the kf/asn/detour-notifications branch 4 times, most recently from a0d12e6 to 20eaec5 Compare September 27, 2024 12:51
Comment on lines +93 to +97
detourId: 79,
headsign: "79 - Wooded Mountains",
route: "79",
direction: "Inbound",
origin: "Maple Knoll",
Copy link
Member

Choose a reason for hiding this comment

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

question: is it possible to not hardcode these values?

Copy link
Member

Choose a reason for hiding this comment

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

It's a bit of a struggle when tests assume hardcoded values from factories and then in the future we decide to make them generated, so I'd prefer to start with generated values.

I'd be open to pulling in faker @mbta/skate-developers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree - I did this just to get something working, but I'd rather get non-hardcoded values in before merging.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was done in #2819

Copy link
Member

@firestack firestack Sep 27, 2024

Choose a reason for hiding this comment

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

note(non-blocking): I would like to change the <NotificationCard/> component into a switch which then renders some other component, like, <DetourNotificationCard/> to make it a bit simpler to understand what's going on (like the activate detour modal!) I'd be open to that happening in this PR, or a followup, or just noting it as a future tech debt item.

Based on the work you did for this @joshlarson does that seem worth it or do you think that it's beneficial to keep it this way for now? I'm worried this would be too early of a "component-ization" but there's also a bunch of different logic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a good time to component-ize, but I'm on the fence about whether I want to do it in this PR versus teasing the different notification cards apart as a "fast"(indeterminate-speed)-follow.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given this PR has already changed hands, I think I'll consider this a "future do"

@joshlarson joshlarson force-pushed the jdl/feat/open-detour-modal-from-notification-card branch from e698891 to 394e0a0 Compare September 27, 2024 15:02
@firestack firestack deleted the branch kf/asn/detour-notifications October 1, 2024 20:22
@firestack firestack closed this Oct 1, 2024
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.

3 participants