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
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.
thetaPC
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
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?
Describe the Bug
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.
Steps to Reproduce
Screenshots
With bug:

Angular
React

Without bug:

Angular
React

Operating System
macOS
Browser
Firefox
Version
114.0.1
Additional Information
The code source can be found in the
PlaygrounTabs
index file.The text was updated successfully, but these errors were encountered: