Exifly / ApiVault

Your gateway to a world of public APIs.
https://apivault.dev
Other
435 stars 39 forks source link

Improve the vue-router pages and layouts to not load everytime a user click on some links #163

Closed gdjohn4s closed 1 year ago

gdjohn4s commented 1 year ago

Is your feature request related to a problem? Please describe.

Yes. The problem is quite evident when, for example, I click on a category from the homepage, the page completely reloads. This behavior is not correct as both the navbar and the sidebar should remain fixed while only the content on the right, such as the cards, should change. With this fix, not only will the site's performance be optimized, but also fewer requests will be made to the backend or external services. Additionally, it would eliminate redundancy across various pages.

Describe the solution you'd like

A good solution would be to abstract the layout that contains both the Navbar and the Sidebar and ensure that the vue-router only changes the content present in the ContentBody.

Describe alternatives you've considered

I haven't found any other alternatives so far. If you have any, feel free to share them on this issue.

DomeT99 commented 1 year ago

Hello! I agree with your idea, it's the best solution. It's possible extract the navabr, sidebar, ecc in a component call default.vue in the layout folder, right?

gdjohn4s commented 1 year ago

Hi @DomeT99 Yes it's possible! I've fixed this issue in new apivault 2.0.0 alpha version using Nuxt.js and layouts: image

as you can see in the default.vue there is a slot tag, this tag will be filled with <NuxtLayou> component: image

so for now it's just a FYI issue and i've set the label wontfix, we can use this issue as a discussion btw to find better solutions.

thanks for the interest

DomeT99 commented 1 year ago

No worries, I'm here for anything