You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: scroll to the right button renders for short lists on playground #2999
The playground files will render a scroll to the right button when the the files view overflows (which makes sense):
However, when I select a different framework that doesn't overflow, then the scroll to the right button still shows. This only happens when at least one framework has tabs that overflow.
Expected Behavior
I expect to not see the scroll to the right button when the current tabs don't overflow.
changed the title [-]bug: scroll to the right button renders for short list on playground[/-][+]bug: scroll to the right button renders for short lists on playground[/+]on Jun 15, 2023
Thanks! I'm able to reproduce this. It looks like we need to re-update the navVisible states whenever the selected framework changes. (Theoretically, this should be as simple as adding selectedValue to the array passed into the useEffecthere.)
Right now, the scroll buttons are only updated on init and on scroll in the file list, so I suspect that whether they're set initially is dependent entirely on the Angular files, since Angular is the default. Thankfully, Angular generally has the most files, so we're less likely to have the opposite situation where you should be able to scroll but can't. That will change if we implement #2798, though, so we should definitely fix this before then.
Side note: I actually didn't see the bug trigger on my first try, but every subsequent refresh (including incognito) did trigger it. Maybe I just clicked on React too fast the first time?
Activity
[-]bug: scroll to the right button renders for short list on playground[/-][+]bug: scroll to the right button renders for short lists on playground[/+]averyrousseau commentedon Jun 16, 2023
Thanks! I'm able to reproduce this. It looks like we need to re-update the
navVisiblestates whenever the selected framework changes. (Theoretically, this should be as simple as addingselectedValueto the array passed into theuseEffecthere.)Right now, the scroll buttons are only updated on init and on scroll in the file list, so I suspect that whether they're set initially is dependent entirely on the Angular files, since Angular is the default. Thankfully, Angular generally has the most files, so we're less likely to have the opposite situation where you should be able to scroll but can't. That will change if we implement #2798, though, so we should definitely fix this before then.
Side note: I actually didn't see the bug trigger on my first try, but every subsequent refresh (including incognito) did trigger it. Maybe I just clicked on React too fast the first time?
thetaPC commentedon Jun 22, 2023
This will be available on the site soon!