Open tiffon opened 6 years ago
Improved performance and maintainability.
Nothing. This change is an implementation detail.
Remove the current smooth scrolling behavior, which animates the scroll position in JavaScript:
https://github.com/jaegertracing/jaeger-ui/blob/e31801d1a283cc40b360cfda01e4e061a124c0d8/packages/jaeger-ui/src/components/TracePage/scroll-page.js#L26-L31
And, instead, use the scroll-behavior: smooth CSS property on the root element.
scroll-behavior: smooth
https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior#Values
Consider adding the CSS class u-simple-scrollbars to the <body> or making the styling global, so scroll bars are always present.
u-simple-scrollbars
<body>
Note, this feature is not available in all browsers targeted by Jaeger UI.
https://caniuse.com/#feat=css-scroll-behavior
The following can be used to guard for support.
'scrollBehavior' in document.body.style
Requirement - what kind of business use case are you trying to solve?
Improved performance and maintainability.
Problem - what in Jaeger blocks you from solving the requirement?
Nothing. This change is an implementation detail.
Proposal - what do you suggest to solve the problem or improve the existing situation?
Remove the current smooth scrolling behavior, which animates the scroll position in JavaScript:
https://github.com/jaegertracing/jaeger-ui/blob/e31801d1a283cc40b360cfda01e4e061a124c0d8/packages/jaeger-ui/src/components/TracePage/scroll-page.js#L26-L31
And, instead, use the
scroll-behavior: smooth
CSS property on the root element.https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior#Values
Any open questions to address
Consider adding the CSS class
u-simple-scrollbars
to the<body>
or making the styling global, so scroll bars are always present.