-
Notifications
You must be signed in to change notification settings - Fork 8
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: Display empty detour table icon when the table is empty #2777
Conversation
76c6374
to
b4ba629
Compare
c7cfa7e
to
8d4e0b6
Compare
6ed52d0
to
7fca2cf
Compare
8d4e0b6
to
4b1a60e
Compare
7fca2cf
to
8efa5ed
Compare
4b1a60e
to
ccff018
Compare
8efa5ed
to
b30b0d0
Compare
4c1be6c
to
67b3662
Compare
67b3662
to
38a1833
Compare
I originally did this work as two separate chunks - creating the icon (and the storybook story), and then adding it to the table, but then combined the work into this one PR. If you'd prefer that I split this back into two PR's (see the two commits on this branch), lemme know - I'm happy to do it. |
Coverage of commit
|
assets/stories/skate-components/icons/emptyDetourTableIcon.stories.tsx
Outdated
Show resolved
Hide resolved
Coverage of commit
|
@@ -61,6 +61,12 @@ $table-border-radius: 0.5rem; | |||
td:last-child { | |||
border-bottom-right-radius: $table-border-radius; | |||
} | |||
|
|||
@include media-breakpoint-down(md) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated visual bug fix, but I noticed it while working on this PR and didn't realize until just now that I had accidentally lumped it into this PR.
I can split it out to a separate PR if you'd all prefer, but I didn't necessarily think it was worth the effort.
2c933e0
to
26e6fb2
Compare
Coverage of commit
|
) | ||
|
||
export const EmptyDetourTableIcon = (props: ComponentProps<"svg">) => ( | ||
<svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer this icon to be stored with the others at like static/images/icon-bus-circle.svg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is previous conversion on why to prefer not doing it that way https://mbta.slack.com/archives/C047ZT8ACP5/p1725466195051749?thread_ts=1725464812.285259&cid=C047ZT8ACP5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh... I read this and then forgot about it once I saw the code out of context. Hmm, perhaps I should reply there? But how do we avoid distributing otherwise-reusable icons throughout the repo in a way that is hard to track?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another worthwhile question: should this icon (and other icons) be moved somewhere more consistent?
I figured it was likely that this icon would only ever be used on this page, so it wasn't necessary to create a separate home for it, but I don't feel strongly about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a skateIcons.tsx
similar to bsIcons.tsx
? Then we can have consistent tests for them. IMO This would be for "simple" icons which contain only SVG and don't take other props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me. Or perhaps a folder that contains a Reacty icon component per file? I prefer surfing icons by file name, but that's maybe too-personal a preference.
Also, turning my feedback to non-blocking, since this had already been discussed (and I forgot), and the requested change is mainly an organizational one at this point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the bsIcons
route because it makes it easy to apply uniform tests to all the icons without needing to edit the tests. But I'm open to other options.
<tbody> | ||
<DetourRows data={data} status={status} /> | ||
</tbody> | ||
</Table> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd prefer if we didn't abstract this yet, and avoid any prop drilling that we'd need to do by having this intermediate component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which part do you not want to abstract? I can't quite tell, but I think Github might be rendering this weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that <DetourRows/>
would be inlined here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage of commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marking as changes requested for github overview screens
d7f3495
to
2e70104
Compare
4d29c4e
to
f808297
Compare
f808297
to
e015206
Compare
51cde35
to
af3ad47
Compare
af3ad47
to
a14a65f
Compare
b2fe361
to
5c17e94
Compare
Coverage of commit
|
Coverage of commit
|
Before
Desktop
Mobile
After
Desktop
Mobile
Asana Ticket: https://app.asana.com/0/1205526445275136/1208226799631632/f
Depends on: