web.dev icon indicating copy to clipboard operation
web.dev copied to clipboard

Think about embedding Glitch example into Portals post.

Open robdodson opened this issue 7 years ago • 6 comments

Related to https://github.com/GoogleChrome/web.dev/pull/862

One way to do this would be to use feature detection, and if the user doesn't have portals enabled, show them the flag to enable it. This could be useful for when Portals is shipping everywhere so folks can just automatically see and interact with them.

robdodson avatar May 03 '19 23:05 robdodson

It does do feature detection even now and show a message but I'll make sure it is more easy to understand so that they could figure out their way easily. I'll work on that. Before and during my flight.

uskay avatar May 04 '19 01:05 uskay

@robdodson Changed the UI a bit to make things obvious. WDYT? draft UI of the demo

uskay avatar May 04 '19 03:05 uskay

@uskay nice, I think that looks great :)

robdodson avatar May 04 '19 03:05 robdodson

I think I can fix the article just before the flight, will let you know!

uskay avatar May 04 '19 03:05 uskay

This is very unfortunate but come to think about it, Portals cannot be used inside iframes by design...

Cannot use in a nested browsing context. a screenshot of DevTools console error

  • https://wicg.github.io/portals/#the-portal-element
  • https://github.com/web-platform-tests/wpt/blob/master/portals/portals-activate-inside-iframe.html

uskay avatar May 04 '19 09:05 uskay

ah ok. No worries :) We'll make sure the links to the examples stand out. Thank you for looking into it @uskay!

robdodson avatar May 04 '19 18:05 robdodson