Conversation
0df6cbe
to
7c671a7
Compare
@JackuB so this is ready? I'll try to figure out what up with the tests. Definitely should add those regardless. |
@zephraph yea, functionality is there. I want to give another try for the tests over the weekend. |
Added tests for preview. I followed this issue egoist/poi#37 I don't think they will pass on CI tho, because I can't get
|
@egoist may I suggest https://github.com/semantic-release/semantic-release for vbuild and vue-play? It simplifies deploying, takes care of changelog and correct semantic versioning (I'm on a holy crusade to make everyone using it 😄) |
91f9be1
to
68e749b
Compare
Hey Whats the state on that feature? Its really reeded :) |
68e749b
to
0ee96e7
Compare
0ee96e7
to
22b8d27
Compare
@egoist @appinteractive Rebased, updated the example a bit - good to go (I have a test file stashed if we get around implementing karma to vue-play). I've been using this branch in production for some time. |
Sweet, thanks. |
}, location.origin) | ||
}, | ||
render(h) { | ||
// Save original store state on the first render | ||
if (get(this.current, 'store.constructor.name') === 'Store' && !this.current._initialState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why do we need to cache this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I envision Vuex in vue-play is that you get you app/component to a certain state, defined in Vuex state.
So if I have a scenario Popup opened
and my state is set to popupVisible: true
and I close the popup in UI, thus setting state to popupVisible: false
I want to see the original state when I open that scenario again.
It's a bit weird to create store instance for every component, what about using (namespaced) store module? // btw, it seems I can't push to your branch 😅 |
I just published a patch which fixed the Before calling import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex) Bind store instance to your component: import Vuex from 'vuex'
play('button')
.add('with text', {
store: new Vuex.Store({state: {count: 0}}),
template: '<button>{{$store.state.count}}</button>'
}) |
@egoist do you plan to release Vuex support soon? Thanks. |
@anfinil check out the comment above, it's already supported |
@egoist Sorry for misunderstanding, I wanted to ask when PR will be merged to master? |
This PR adds a Vuex support and resolves #41
state
value and applies it on each new renderI'd like to get some tests written before merging- tried to add some tests, but couldn't getvbuild test
to work.