-
Notifications
You must be signed in to change notification settings - Fork 20
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
[feature] Add support for all route params #12
Conversation
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.
Thanks for contributing this PR!
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.
can you please also add unit and selenium tests for this?
the places would be here:
https://github.com/stefanhoelzl/vue.py/blob/master/tests/selenium/test_vuerouter.py
https://github.com/stefanhoelzl/vue.py/blob/master/tests/unit/test_factory/test_router.py
for the selenium I mostly use the examples from the documentation as test cases
e.g. https://router.vuejs.org/guide/essentials/named-routes.html
just added some contribution guidelines. |
Co-authored-by: Stefan Hoelzl <stefanh+github@posteo.de>
when you rebase your branch onto my current master, then the merge conflict should be resolved. |
Nested routes are not working properly |
are some tests failing? |
When everything is right I will create another cleaner PR that follows the contribution guidelines. And sorry for the mistakes, I am only 15 years old and this is the first time I have contributed to an open source project. In addition, I live in Brazil and do not understand English. |
No worries, we will get this PR ready to be merged 😄 It is great that you want to contribute to some project, nothing to apologize there! Unfortunately I do not speak any Portuguese, so we have to stick with englisch 😄 |
finally I got the TravisCI to pick up the PR correctly! You will see that a check still fails These are just some formatting errors, by running black is a auto-formatting tool, so that all python files are formatted the same. when you set-up everything with |
btw. the tests you are added are looking great. Thanks a lot! |
vue/router.py
Outdated
@@ -7,10 +7,20 @@ class VueRouter(Wrapper): | |||
def init_dict(cls): | |||
return VueRouterFactory.get_item(cls) | |||
|
|||
def __new__(cls): | |||
return window.VueRouter.new(cls.init_dict()) | |||
def __new__(cls, vue_router_class=window.VueRouter): |
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.
This is the last request for a change I have:
Can we revert this change, and not have it in this PR?
I like this feature and would like to have it, but lets keep the scope of this PR only to adding support for the rest of the route params.
I would propose adding this in a second PR, and also take care of proper tests of this feature in the second PR
congrats everything in your first PR is green 💚 grab a Pão de queijo and celebrate it 🥳 |
I didn't understand "Pão de Queijo", but that's ok kkkkk (that's how we "write laughs" in Portuguese). Thanks for the help! |
No description provided.