Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple files to <playground-ide> displays only 1st tab #141

Open
dave52 opened this issue Apr 28, 2021 · 4 comments
Open

Multiple files to <playground-ide> displays only 1st tab #141

dave52 opened this issue Apr 28, 2021 · 4 comments

Comments

@dave52
Copy link

dave52 commented Apr 28, 2021

Issue

When multiple files are supplied to <playground-ide>, only the first tab can be seen.
image

Expected result

image
You can see the second tab in this example.

Details

I'm loading playground via skypack CDN...

<script
  type="module"
  src="https://cdn.skypack.dev/playground-elements"
></script>

It looks like <mwc-tab-bar> wraps each <playground-tab>; I can see 2 tabs in my DOM, with the correct data bound to the elements, it looks like <mwc-tab-bar> isn't setting a display: flex property correctly however, other styles aren't being set too, like underlining selected tab.

You can see the 2nd tab is in the DOM but overlapped by the content below it...
image

Here inline style for display: flex was manually added to <mwc-tab-bar> for proof of concept; the orange arrow points to where the style has failed to inherit (not sure why)...
image

In an attempt reverse engineer, I mimicked the demo: https://polymerlabs.github.io/playground-elements/

...and then loaded the same script that was on the demo page (with code below), it fixes the issue but that source probably isn't a reliable URL, imagine the CDN is best.

<script
  type="module"
  src="https://polymerlabs.github.io/playground-elements/playground-configurator.js"
></script>

Let me know if any other info is needed, thank you for your help :)

@aomarks
Copy link
Member

aomarks commented Apr 28, 2021

Hi @dave52

Is there anything in the console? I have noticed some problems with MWC components loading through skypack/unpkg, so it's possible it's an issue there.

@dave52
Copy link
Author

dave52 commented Apr 28, 2021

@aomarks console looks clean, nothing suspicious in the network tab too :(

@aomarks
Copy link
Member

aomarks commented Apr 29, 2021

Confirmed this is an issue with importing @material/mwc-tab-bar from Skypack. Filed material-components/material-web#2359.

Unfortunately importing from unpkg.com is also broken, for a different reason. material-components/material-web#2177 fixed that, but it hasn't been released.

Will look into what we can do.

@dave52
Copy link
Author

dave52 commented Apr 29, 2021

Oh awesome, thanks for acting so quickly!

@aomarks aomarks self-assigned this May 12, 2021
@aomarks aomarks removed their assignment Jun 16, 2022
augustjk pushed a commit to augustjk/playground-elements that referenced this issue Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants