Skip to content
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

compatibility to VueRouter is challenging #29

Closed
thomasreinecke opened this issue Aug 23, 2018 · 3 comments
Closed

compatibility to VueRouter is challenging #29

thomasreinecke opened this issue Aug 23, 2018 · 3 comments

Comments

@thomasreinecke
Copy link

hi, thanks for this great work - I like it a lot even though it has some challenges because its lacking a closer integration with VueRouter. Background : I construct my VueRouter and vue-tree-navigation items dynamically from a simple JSON object. Doing so reveals the following issues

  • the vue-tree-navigation module uses a property route as routing context, VueRouter uses path - please align this to also use path
  • wouldnt it be great if vue-tree-navigation could be initialized in a way to pickup its items from VueRouter ? This would eliminate the steps to create config thats in sync for both

Thanks

@MisRob
Copy link
Collaborator

MisRob commented Aug 23, 2018

Hello Thomas, thank you.

  1. path vs. route - I'll need to think about that more. From my point of view, it made sense to have route, element and external because it's clear what it does and that there is this connection to the router. path sounds somewhat general, could be anything. On the other hand, I get the argument that people using vue-router are already used to path so it could be clear what it does.

  2. Yes, definitely. I've been thinking about that for a while and there's already a ticket open :) Explore the possibility to generate the menu from routes directly #6

@MisRob
Copy link
Collaborator

MisRob commented Aug 28, 2018

Hey again,

as regards to 1., I checked codes in detail and spent more time on it and realized that I forgot about new behavior of v3 :) Currently, it works with router or without the router and both of these modes use route field. So it will be really better to name it path. It will be clear for people who want to use the library with router because we are all used to this name. And for people who don't want to use it together with router, path will be actually more intuitive name, too.

Thanks for noticing!

MisRob pushed a commit that referenced this issue Nov 3, 2018
MisRob pushed a commit that referenced this issue Nov 3, 2018
MisRob pushed a commit that referenced this issue Nov 3, 2018
@MisRob
Copy link
Collaborator

MisRob commented Nov 3, 2018

Implemented. Will be released as v4.0.0.

@MisRob MisRob removed the in progress label Nov 3, 2018
@MisRob MisRob closed this as completed Nov 3, 2018
MisRob pushed a commit that referenced this issue Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants