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

Google's new "portal" element #220

Open
fimion opened this issue May 11, 2019 · 6 comments
Open

Google's new "portal" element #220

fimion opened this issue May 11, 2019 · 6 comments

Comments

@fimion
Copy link

fimion commented May 11, 2019

So, I saw this from i/o 2019 yesterday, and figured i'd go ahead and raise the issue here.

https://web.dev/hands-on-portals/

it looks like google is wanting to create a <portal> standard for linking between pages.

Would it be helpful to update the docs and examples to use portal-vue as the component name in anticipation of google trying to push this through?

@LinusBorg
Copy link
Owner

LinusBorg commented May 11, 2019

Yeah I saw that as well... 😤😅

I think there's two things we could do:

  1. Write up a warning or small guide in the docs about how to deal with that.
  2. Release a new major version that changes the default name to <portal-source> or some other hyphenated (and therefore safe) name.

@fimion
Copy link
Author

fimion commented May 11, 2019

I also think since this is still behind a flag in canary and only in chrome, there is time to warn people about this.

@LinusBorg
Copy link
Owner

LinusBorg commented May 11, 2019

Sure.

A new major would be required once this becomes standard though

@tmorehouse
Copy link

@LinusBorg you could prep people with a new element name (i.e. <portal-source>) while still being backwards compatible (by providing <portal> as well):

function install(Vue: VueConstructor<Vue>, options: PluginOptions = {}) {
  Vue.component(options.portalName || 'PortalSource', Portal)
  Vue.component(options.portalName || 'Portal', Portal)
  Vue.component(options.portalTargetName || 'PortalTarget', PortalTarget)
  Vue.component(options.MountingPortalName || 'MountingPortal', MountingPortal)
}

// ...

export {
  Portal,
  Portal as PortalSource,
  PortalTarget,
  MountingPortal,
  Wormhole
}

@LinusBorg
Copy link
Owner

Good idea!

@tmorehouse
Copy link

tmorehouse commented May 11, 2019

And then in a major release, drop the older deprecated <portal>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants