Skip to content

Releases: LinusBorg/portal-vue

1.5.1

30 Dec 10:58
Compare
Choose a tag to compare

This includes the bugfix from 1.5.1-beta.1

v 1.5.1-beta.1 - Bugfix release

26 Dec 14:50
Compare
Choose a tag to compare
Pre-release

this release closes #169, and hopefully also #159

But in order to fix these rather severe bugs, we had to introduce an edge case where content from a target's default slot might not update correctly without a key. We added a note to the docs here and will update the docs online once we left beta - which should be in a few days max, we only release a beta to be sure the change doesn't break any other edge cases.

1.5.0

23 Nov 15:54
Compare
Choose a tag to compare

Things we added

Things we fixed

  • Wormhole now does a stable Sort when re-sorting the array of transports upon addding / deleting content for a target (#158, closes #152, and probably #141)

1.4.0

02 Oct 10:06
Compare
Choose a tag to compare

Changes:

Additionally to the changed described for 1.4.0-beta.0 & -beta.1:

  • Change default Component names to Pascal Case (#147 )

1.4.0 Beta 1

02 Sep 13:39
Compare
Choose a tag to compare

Install with:

npm install portal-vue@next

Note

The 1.4.0 release will be the last release before a major overhaul of the repository. We will switch to vue-cli 3.0, vuepress for docs, will implement cypress e2e tests and port the src to Typescript (because why not).

the next version after that overhaul will be a major version bump, where we intend to keep the public aPI consistent for the most part.

But on to 1.4.0-beta.1:

Things we added

Things we fixed

1.3.0 New Minor release with support for scoped slots

18 Jan 19:04
Compare
Choose a tag to compare

Things we added

Scoped Slots!

This means you can now do this:

<portal to="target">
  <p slot-scope="props">
    {{props.message}}
  </p>
</portal>

<portal-target name="message" v-bind:slot-props="{message: 'Hi!'}">

Things we deprecated

  • the portal's targetEl prop is now officially deprecated and will be removed in 2.0, since it added a lot of internal complexity that can be solved more elegantly in userland.

Internals

  • Switched the Wormhole from a naked ES6 class to a Vue instance. This saves us some boilerplate from babel-transform-runtime. (#73)
  • Added integration tests (#43)

Things to come

We will try and push 2.0 quite quickly. Removing targetEl (#74) will be the only breaking change.

v1.3.0-beta.0 - Support for scoped slots

02 Jan 13:27
Compare
Choose a tag to compare

how to test this beta release

npm i -D portal-vue@next

About this beta

There's two main reasons we release this one as a beta:

  1. We refactored the whole Wormhole class (only internal APIs)
  2. We had to trick Vue to play nice with scoped slots and abstract component settings on the portals.

All tests pass, manual tests are looking fine as well, but we want to make sure this doesn't break anything for users.

Things we added

Scoped Slots!

This means you can now do this:

<portal to="target">
  <p slot-scope="props">
    {{props.message}}
  </p>
</portal>

<portal-target name="message" v-bind:slot-props="{message: 'Hi!'}">

Things we deprecated

  • the portal's targetEl prop is now officially deprecated and will be removed in 2.0, since it added a lot of internal complexity that can be solved more elegantly in userland.

Internals

  • Switched the Wormhole from a naked ES6 class to a Vue instance. This saves us some boilerplate from babel-transform-runtime. (#73)
  • Added integration tests (#43)

Things to come

We will try and push 2.0 quite quickly. Removing targetEl (#74) will be the only breaking change.

Bugfix Release

17 Dec 20:14
Compare
Choose a tag to compare

Things we fixed

  • #80 introduced a snippet of ES6 syntax that can't be transpiled without a polyfill. Since portal-vue is meant to work with any ES5-compliant browser without any polyfills, we replaced it with ES5 code. (#94)

Bugfix release

12 Dec 15:33
a2370cc
Compare
Choose a tag to compare

Things we fixed

  • When using the targetEl prop, the PortalTarget did not correctly adopt the attributes of the element that it was mounted to. (#91)

Adding support for transitions and multiple sources

12 Dec 09:57
Compare
Choose a tag to compare

About this release

It's been a while, hasn't it? I'm grateful for everyone's patience with this release. I know that a lot of people requested the features we are now introducing, and I know you guys had to wait quite a while to get them.

I learned that it can be really challenging to create a thoroughly tested and documented release even for a relatively small library like this, when you have other work going on as well and you have problems to find a decent time slot that you can fully dedicate to get the release done.

I found that time last weekend, so here it is.

Things we added

Better Transition support (#72)

You could always do this:

<portal to="destination">
  <transition name="fade">
    <p v-if="hasMessages" key="1">You have {{messages.length}} new messages</p>
    <p v-else key="2">No unread messages</p>
  </transition>
</portal>

But now, you can also define a transition on the <portal-target>:

<portal-target 
  :transition="{ name: 'fade'}"
  :transition-events="{ enter: onEnterCallBack }"
/>

Multiple sources (#80, @eschalks)

While it was always possible to switch between multiple <portal> components as the source for one <portal-target>, the target could only ever render the content from one of them the same time.

Now, <portal-target> has a multiple prop, which activates support for rendering content from multiple <portal> components at the same time.

You can use the order prop on the <portal> components to control the order of the content in the <portal-target>:

Source

<portal name="destination" :order="2">
  <p>some content</p>
</portal>
<portal name="destination" :order="1">
  <p>some other content</p>
</portal>

<portal-target name="destination" multiple />

Result

<div clas="vue-portal-target">
  <p>some other content</p>
  <p>some content</p>
</div>

A special thanks to @eschalks who wrote a great PR for this and was very patient with me, as I took my sweet time to merge his PR and finally release it today.

Things we fixed

  • Fixed a bug where updating a <portal> with an empty slot would not remove the previous content from the linked <portal-target> (#86, @zicklag)
  • Fixed a couple of typos and grammar mistakes in the docs (#79, #82, #83, #87)