-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
ref(breadcrumbs): Update breadcrumbs drawer from feedback #74034
Conversation
Bundle ReportChanges will increase total bundle size by 6.86kB ⬆️
|
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.
looks good from the replay side!
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.
looks good to me! this might be personal preference but i feel like the time button for the breadcrumbs on the details page could benefit from a tooltip or something so the user knows what's happening/what option they currently are on. right now you only know what's going to happen when you press it, since there's no dropdown like there is in the drawer.
/** | ||
* Custom content for the header of the drawer | ||
*/ | ||
headerContent?: React.ReactNode; |
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.
As we increase the customizability of this component, it might be better to give more control to the consumer rather than add a new prop. Perhaps children
could render the drawer header and close button as well? That would give the greatest flexibility and simplify the interface a bit.
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.
Good call, I changed it to pass in a <Header />
component the same way it passes Body. I added a context provider as well so the header button would still fire the onClose handler specified in openDrawer
. I'll have to update tests as well since they all expect a close button to be rendered.
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.
Thanks for making that change!
And now, more unsolicited feedback! Not something to do in this PR surely, but something we may want to do in the future is stop passing in Header
and Body
in the renderDrawer
function. That's how GlobalModal works, but I don't think it's necessary for this component since we are using context which didn't exist when. GlobalModal was originally created. They could directly import Drawer.Body
and Drawer.Header
, right?
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's a very good point, makes sense. I'll defer to a later change, but thanks!
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.
Noticed this on an event: https://sentry-539of4nfw.sentry.dev/issues/2382970109/events/da370e7cf6674bbd829629d9507ca68b/
Seems confusing, not sure if this is expected behavior?
static/app/components/events/breadcrumbs/breadcrumbsDataSection.tsx
Outdated
Show resolved
Hide resolved
static/app/components/events/breadcrumbs/breadcrumbsDrawerContent.tsx
Outdated
Show resolved
Hide resolved
Long living bug in the util function! fixed it! |
Lots of fixes here: