Releases: LinusBorg/portal-vue
1.5.1
v 1.5.1-beta.1 - Bugfix 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
Things we added
portal-vue
can now be installed as a nuxt-module! (https://nuxtjs.org/guide/modules). Thanks to @ricardogobbosouza (#157)
Things we fixed
1.4.0
1.4.0 Beta 1
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
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
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:
- We refactored the whole Wormhole class (only internal APIs)
- 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
Bugfix release
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
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.