-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
fix: reorganized components #562
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.
Solid work so far! I think this is headed mostly in the right direction but I have a lot of thoughts on how I think we should be separating everything.
Considering how we utilize the components, it makes sense to me to split by route for now, and then organizing within route based folders.
Something like this:
- /routes/
- /home/
- /components
- /js
- /about/
- /components
- /js
- /home/
Etc, which would allow us to code split by route if we so choose by doing async imports. It also would keep a logical separation of components we use within those pages and we could set up route based aliases in vite. Any shared functionality would live under some sort of core, or global namespace.
@itsalaidbacklife penny for your thoughts.
Currently we have all the views(route specific files) inside the /views directory. As per my understanding, you're suggesting for us to split the files as per the routes, right? So we'll have a /routes directory and individual directories for each route with respective view file, and respective components grouped in the components directory, right?
Also, what exactly is the js subdirectory for? Is it for respective utility function files? |
@arnaut08 exactly that. Utilities, store files, or anything other js imports related to just that route. You may not need the folder if the route doesn't have any right now, though. I'll file a follow up to look in to async importing the top level Vue files from the router to garner the benefit from the file restructure. See #563 |
I've reorganized it as per the routes and handled #563 as well. |
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 super close! Convert all the relative paths to aliases and in the vite config make an entry for the new areas; core, and each route as a top level so you can do something like ~core/components/FileName.Vue
.
@arnaut08 sorry to have left this hanging. This is looking good. I need to sync up with @seriouslysean and give this a look together but we should have the final feedback for you by end of week |
Sorry for the delayed response. I've made the changes suggested by @seriouslysean. Please review those changes and consider them for the feedback. Thank you. |
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 a great start. I apologize that it's taken so long to get a full review on this. It's a high impact restructuring so we wanted to make sure the internal team was in sync about the desired structure. I'm requesting a slight rework of how the folders are organized, and of removing the ~
aliases and sticking with @
relative imports.
For the folder change, we will remove the core
folder, and move both core/components
and core/composables
directly into src/components
(for base components) and src/composables
(for root composables).
Additionally, let's rename the src/routes/auth
folder to src/routes/login
as that's the name of the route.
Again, great work! This will add a lot of value, especially making it easier for new contributors to find components while onboarding. Thanks for your contribution! Please comment here (or join us on discord) if you have any questions.
@arnaut08 are you still interested in finishing this task? |
Hey! I'm so sorry for the delayed response. Yes, I'll make the changes as per your latest comments. |
@arnaut08 it's not a problem at all. Open source is always at your own pace, and these kinds of sweeping reorganization bear the brunt of the challenge around merge conflicts. I'm just commenting on the open PR's to check which ones are abandoned and should be closed accordingly. I'll leave this open. Reach out here or on discord if you get stuck or would like help. |
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.
@arnaut08 excellent work. This all looks right. I have two whitespace nitpicks in the comments. Other than that, the only thing to do is to fix the merge conflicts. Let me know if you'd like help navigating them.
This is a great reorganization that I'm looking forward to finalizing. Thanks for your contribution!
@arnaut08 this is great. There are just two remaining merge conflicts in
which were just updated today. Apologies that this has been a moving target. I can stop merging other PR's until this is done so that your update can go live before other things go in because you've been working on this for a while and it is so high-impact |
No worries at all. I've resolved the remaining conflicts. |
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.
Great work, thanks for taking this on!
Change requests are addressed
* fix: reorganized components * fix: reorganized files as per the routes * fix: aliases added and routes reconfigured * fix: reconfigured paths * fix: corrected paths after resolving conflicts * fix: removed extra whitespaces * fix: fixed remaining paths
* fix: reorganized components * fix: reorganized files as per the routes * fix: aliases added and routes reconfigured * fix: reconfigured paths * fix: corrected paths after resolving conflicts * fix: removed extra whitespaces * fix: fixed remaining paths
Issue number #546
Relevant #546
Please check the following
Please describe additional details for testing this change
I don't think additional details are required as it's just the reorganization of the components files.