Skip to content

Toward vuejs v2.0 #89

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

Merged
merged 24 commits into from
Dec 1, 2016
Merged

Toward vuejs v2.0 #89

merged 24 commits into from
Dec 1, 2016

Conversation

lionel-bijaoui
Copy link
Member

🚧 This is WIP 🚧
current problem by order of importance:

  • Tests need to be rewritten in some way to fit vuejs 2.0 😅
  • selectEx: weird warning, problem is not yet identified.
  • dev app: is not working well and can be simplified with ES6.
  • validator: weird warning seem to indicate lack of information on initialisation. May be related to dev app or internal problem with vuejs v2.0. Some behavior have changed and things update faster which may or may not be the cause.
  • noUiSlider: I'm updating it to v9.0 and there is breaking changes and cool new functionality (very useful for my work).
  • vue multiselect should work now that multiselect: put back custom-label & fix #87 is implemented, but I need to make sure.
  • updating plugins

Project board : https://github.com/icebob/vue-form-generator/projects/2

@@ -1,5 +1,5 @@
{
"presets": ["es2015", "stage-0"],
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changed to stage-2 from 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stage-2 is the default in the vue-cli webpack preset. It is less bleeding edge, I guess ? I don't mind putting it back to were it was, I just did that when I was debugging to exclude differences between your config and the proposed webpack config.
You use ES7 features ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently not, just I'm using stage-0 in my other projects too.


if (isFunction(this.schema.set)) {
this.schema.set(this.model, newValue);
console.log("model-updated via schema", this.model[this.schema.model]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not guaranteed, that this.schema.model is defined. Need to check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, what is this schema.set ? I might have missed it, but I don't recall any explanation about it in the doc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The set and get in schema can be use for virtual props of model. E.g create a field for fullName but in the model store as firstName and lastName.

{
    type: "text",
    label: "Full name",
    model: null,
    get(model) {
        return model.firstName + " " + model.lastName;
    },
    set(model, val) {
        let values = val.split(" ");
        model.firstName = values[0];
        model.lastName = values[1];
    }
}

Or if you want to transform the value. Example

"test": /\.jade?$/,
"loader": "jade"
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Vue2 these loaders not neccessary?

Copy link
Member Author

@lionel-bijaoui lionel-bijaoui Oct 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we don't require any .jade, .scss or .css files. They were never necessary (vue-loader take care of this).
It is also part of my temporary debug changes.
It can came back when everything is working again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you are right. It's a habit :)


// console.log(el);

return [el, vm];
}

describe("VueFormGenerator.vue", () => {

describe.only("nothing", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's misleading, because Travis will be green, but no correct testing. In development state there is no problem if Travis red, but show the real results and we know we need to fix it too. 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, it was to test the build locally without changing too much. Normally, it is forbidden to push .only(). This will go away when I fix the test. I forget to put it back how it was.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@icebob
Copy link
Member

icebob commented Nov 1, 2016

Hi, are you working on this upgrade yet?

@lionel-bijaoui
Copy link
Member Author

@icebob Sorry I was very busy at work. I will work on it soon.

@icebob icebob mentioned this pull request Nov 5, 2016
@lionel-bijaoui lionel-bijaoui mentioned this pull request Nov 14, 2016
Closed
@icebob
Copy link
Member

icebob commented Nov 25, 2016

@lionel-bijaoui Do you have any new commit to this PR?
Because maybe next week I'll able to work on vue2 migration. And I want to merge this PR to the next branch.

@lionel-bijaoui
Copy link
Member Author

I'm sorry, I'm really squeezed tight at work. I'm not in my normal office and I'm not doing any dev work. It's kinda special for me for the next 2 months.
I'm going to take a look at my PR tomorrow. Worse case scenario, you can use my work as a base. Most of it work well. The unit tests are the biggest job along the validator system.
Sorry I can't be more helpful, I feel really bad about that 😞

@icebob
Copy link
Member

icebob commented Nov 28, 2016

Thanks, no problem! Just upload your last state and I continue to migration. 😉

# Conflicts:
#	dev/index.html
#	src/formGenerator.vue
…-template-compiler). Update vue-loader to 10.0.0.
@lionel-bijaoui
Copy link
Member Author

lionel-bijaoui commented Nov 30, 2016

I updated vuejs and integrated all the new changes since the last push. The main problem is the validator that is validating too early. I don't know if it has access to the values or not.
With that, the test need to be fixed and updated.
Lastly, some libs were updated and need to be checked for changes (NoUiSlider for example can now accept an arbitrary number of handle + syntax changes)

@icebob
Copy link
Member

icebob commented Dec 1, 2016

Thank you!

@icebob icebob merged commit fc123fe into vue-generators:next Dec 1, 2016
@lionel-bijaoui lionel-bijaoui deleted the lb_next branch February 10, 2017 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants