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

Test vue #52

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

significantotter
Copy link
Contributor

@significantotter significantotter commented Jan 30, 2023

This is an example start to a refactor of the WG frontend in Vue. I aimed for minimal content disruptions with this refactor, not having to wait for a full rewrite to experience the functionality of the code. In order to do this, I essentially dumped the entirety of the handlebars templating and the current styles and assets into the index.html and the legacy character-list view, and then began to work from there. I also updated the redirects on the old page to go to the route that identifies the refactored page as being part of the refactor.

The Vite proxy is set up such that minimal changes had to be made to the assets to have the dev server use all the existing assets. The new src/ forlder for this client is vue-src specifically to make the proxying simpler.

In addition, I updated several routes that had data only before delivered through handlebars or sockets to do so instead through rest.

For an example of how we go about refactoring this, I replaced the options menu with a vue modal component, and the buttons within with new button components. I also replaced the copy character functionality with local store based functionality, while leaving the other two with their legacy options. Copying mostly works reactively, except I didn't get to the point of re-running the jquery code on the newly created character card. If you wanted this page to be fully operational as-is, we could tell the page to reload instead as it did before. I just wanted to demonstrate the reactivity.

To run the code:
get the WG app running on :3000
in the base directory run npm start:client or from the client directory run npm run dev
navigate to http://localhost:5173/ and click the characters tab
You'll be directed to http://localhost:5173/v/profile/characters which is the example vue implementation of the character list page

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.

1 participant