patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

BackToTop - full screen demo broken

Open nicolethoen opened this issue 1 year ago • 4 comments

The full screen demo is not displaying the backToTop component. https://staging-v6.patternfly.org/components/back-to-top/react-demos/using-name-selector/

I've noticed that the component is also not being displayed on staging-v6.surge.sh, i'm not sure if it's due to the same issue that's broken this demo. A followup issue in org might be necessary.

it also has two different scrollbars, is that intended? @srambach @andrew-ronaldson @mcoker

nicolethoen avatar Jun 10 '24 20:06 nicolethoen

I think the double scrollbars is maybe from <Page> as a child of <DashboardWrapper>? https://github.com/patternfly/patternfly-react/blob/bf19a673e58b5fa49d6b0320552acce2d016d860/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx#L25-L27

mcoker avatar Jun 11 '24 00:06 mcoker

I see there is a switch to turn on Always show BackToTopButton but is this demo supposed to show it only after scrolling? The fake text about overpass should probably be changed since that is no longer accurate.

Screenshot 2024-06-11 at 9 27 11 AM

andrew-ronaldson avatar Jun 11 '24 12:06 andrew-ronaldson

Ah - I was seeking a demo to show me how to make it appear on scroll because that was behavior that seemed broken on org. so if that's not the intention here, i still have to figure out why it's not working on the org side...

nicolethoen avatar Jun 11 '24 12:06 nicolethoen

Discussed in a working session

  • Need to remove the nested <Page> in <DashboardWrapper>
  • We can remove this from the currently scrollable page section https://github.com/patternfly/patternfly-react/blob/53ca336064c9e48edd17cf2b9365c9555bae430e/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx#L38-L41
  • Update the scrollableSelector on the <BackToTop> component in that demo (below) to scrollableSelector='[class="pf-v6-c-page__main-container"]' https://github.com/patternfly/patternfly-react/blob/53ca336064c9e48edd17cf2b9365c9555bae430e/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx#L62

mcoker avatar Jun 17 '24 19:06 mcoker