-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(apm): Virtual horizontal scrollbar for span view #22504
Conversation
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.
src/sentry/static/sentry/app/components/events/interfaces/spans/header.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/header.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/scrollbarManager.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/scrollbarManager.tsx
Outdated
Show resolved
Hide resolved
}; | ||
|
||
registerEventListeners = (spanbar: HTMLDivElement) => { | ||
spanbar.onscroll = this.handleScroll.bind(this, spanbar); |
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.
Does this need to be throttled or debounced to prevent jank? Should this be using attachEventListener()
instead of the DOM1 interface?
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.
It's already throttled since requestAnimationFrame
is used within this.handleScroll
. Referenced here https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event
I didn't use attachEventListener()
, as that'll increase the complexity of having to track references of the attached event listeners. DOM0 event handlers can still be useful despite its age.
src/sentry/static/sentry/app/components/events/interfaces/spans/spanBar.tsx
Outdated
Show resolved
Hide resolved
…s/header.tsx Co-authored-by: Mark Story <mark@sentry.io>
…s/scrollbarManager.tsx Co-authored-by: Mark Story <mark@sentry.io>
c6f3aad
to
bbc999a
Compare
The two-pane span view doesn't provide sufficient real estate to allow users to read span descriptions that can be very long, or spans that pyramid aggressively to the right. This PR adds a horizontal scroll to address some of these UX issues.
Continuation from #20084
Horizontal scrollbars:
Measurements are moved to the minimap: