oui
                                
                                 oui copied to clipboard
                                
                                    oui copied to clipboard
                            
                            
                            
                        [BUG] Playground Toggle Missing in `Bottom Bar` and `Flex` Sections of Layout Docs
Describe the bug
When navigating to the "Layout" documentation and clicking on either the "Bottom bar" or "Flex" sections, both playground toggle is missing.
To Reproduce
- Go to Layout
- In Bottom barandFlextab
- The playground toggles are missing
Screenshots
v1.3
v2.0
Expected behavior
The playground toggle should appear in v2.0 too
Host/Environment (please complete the following information):
- OUI Version: v2.0
- OS: macOS arm64
Just by reading through this, I have a few thoughts:
- Does this occur over the entire docsite, or just in a few places?
- Does this occur on pages that have multiple playground sections? E.g. flex
@BSFishy,
Just to complement what @Willie-The-Lord is bringging, this also happened to me when I was playing with the OuiFlexItem and OuiBottomBar components on the Documentation page last week. Belo some Screenshots:
v1.3
v2.0
Regards,
Samuel
@BSFishy @joshuarrrr
I want to work on this issue.
@BSFishy , @joshuarrrr
I found the problem with this issue. It is related to the file guide_section.tsx. What caught my attention are the lines 135 and 136 . Why is the const isPlaygroundUnsupported defined as follows?
const isPlaygroundUnsupported =
      typeof window != 'undefined' && typeof document !== 'undefined';
It should be the following in my opinion
const isPlaygroundUnsupported =
      typeof window == 'undefined' || typeof document !== 'undefined';
This problem didn't appear until a change was brought in the commit 02d0b4, line 136
. Essentially before that change variable isPlaygroundUnsupported was always true if you were using a browser different from Explorer.
By introducing my suggested change, the playground toggle button appears back with no problems.
Regards,
Samuel
Hey @BigSamu, it seems like you tag the wrong person.
Hey @BigSamu, it seems like you tag the wrong person.
Fixed. Thanks Will!
Hi @joshuarrrr, @BSFishy,
I have recently created PR #1162 with the suggested change I mentioned before. Looking forward to your comments.
Regards,
Samuel