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

ref(breadcrumbs): Update breadcrumbs drawer from feedback #74034

Merged
merged 15 commits into from
Jul 10, 2024

Conversation

leeandher
Copy link
Member

@leeandher leeandher commented Jul 9, 2024

Lots of fixes here:

  • Clicking the icon from issue details will show some focus styles for the control. Currently we cant open the menu as the tooltip will be incorrectly positioned as it tries to appear while the drawer is animating onto the page. For now it at least draws attention to the correct part of the drawer.
focus icon
  • The default crumbs have a new icon
new default icon
  • The replay colors match those chosen for issues.
replay colors and time
  • HTTP items will fully expand by default in the drawer
expand http items
  • The header is sticky and now contains the nav crumbs in it
custom sticky header
  • There is no excess space/line on the breadcrumb list for longer entries anymore
no excess line on breadcrumb list
  • The display time icon changes when toggled.
relative icon
  • [Update] More accurate timestamps that respect user preferences (for 24h clocks, and timezone)
timestamps

@leeandher leeandher requested a review from a team as a code owner July 9, 2024 20:08
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 9, 2024
Copy link

codecov bot commented Jul 9, 2024

Bundle Report

Changes will increase total bundle size by 6.86kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 27.29MB 6.86kB ⬆️

Copy link
Member

@michellewzhang michellewzhang left a 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!

Copy link
Member

@roggenkemper roggenkemper left a 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;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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!

Copy link
Member

@malwilley malwilley left a 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?

CleanShot 2024-07-10 at 10 21 11

@leeandher
Copy link
Member Author

leeandher commented Jul 10, 2024

Noticed this on an event: https://sentry-539of4nfw.sentry.dev/issues/2382970109/events/da370e7cf6674bbd829629d9507ca68b/

Seems confusing, not sure if this is expected behavior?

CleanShot 2024-07-10 at 10 21 11

Long living bug in the util function! fixed it!

@leeandher leeandher merged commit 048c825 into master Jul 10, 2024
42 checks passed
@leeandher leeandher deleted the leander/breadcrumbs-touchups branch July 10, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants