Update file structure to follow electron-webpack guidelines #783

Merged
IGassmann merged 1 commit from restructuring into master 2017-11-24 22:01:29 +01:00
IGassmann commented 2017-11-24 20:01:07 +01:00 (Migrated from github.com)

This change the file structure to follow the webpack-electron's default one. The dirs under src/ are named after electron's processes: Main (previously, under app/) and Renderer (previously, under ui/).

This change the file structure to follow the [webpack-electron](https://webpack.electron.build/project-structure)'s default one. The [dirs under `src/`](https://github.com/lbryio/lbry-app/tree/restructuring/src) are named after electron's processes: Main (previously, under `app/`) and Renderer (previously, under `ui/`).
kauffj (Migrated from github.com) reviewed 2017-11-24 20:01:07 +01:00
neb-b commented 2017-11-24 20:07:54 +01:00 (Migrated from github.com)

👍

👍
kauffj commented 2017-11-24 20:22:59 +01:00 (Migrated from github.com)

I mostly agree with this. The only result I don't like is that the most used folder actually being a level deeper than it was previously, which kind of seems like a step backwards. We do 90+% of our work inside of src/renderer/js and it's 3 levels deep.

I mostly agree with this. The only result I don't like is that the most used folder actually being a level deeper than it was previously, which kind of seems like a step backwards. We do 90+% of our work inside of `src/renderer/js` and it's 3 levels deep.
IGassmann commented 2017-11-24 20:35:01 +01:00 (Migrated from github.com)

A sort of solution for project files nested too deep into directories is config your IDE or text editor to create "modules" (not sure about the proper name). On JetBrains' IDEs, you can create them for a specific dir and then solely display it.

Module config file (should work with WebStorm) to place in src/renderer/js: react.iml.zip

On IntelliJ IDEA:
screen shot 2017-11-24 at 16 31 25

A sort of solution for project files nested too deep into directories is config your IDE or text editor to create "modules" (not sure about the proper name). On JetBrains' IDEs, you can create them for a specific dir and then solely display it. Module config file (should work with WebStorm) to place in `src/renderer/js`: [react.iml.zip](https://github.com/lbryio/lbry-app/files/1502426/react.iml.zip) On IntelliJ IDEA: <img width="707" alt="screen shot 2017-11-24 at 16 31 25" src="https://user-images.githubusercontent.com/4291707/33222303-fa925470-d134-11e7-8494-fd3878cd7f7a.png">
kauffj commented 2017-11-24 20:50:14 +01:00 (Migrated from github.com)

@IGassmann thanks, but it's not really about usability in navigation. I rarely navigate the tree and instead use Go to File and Go to Type to open everything anyway. It's more about having a hierarchy that breaks things down in a way that is logical, consistent, and useful, particularly for new contributors.

Since this is evidently the convention, I'm good with it.

@IGassmann thanks, but it's not really about usability in navigation. I rarely navigate the tree and instead use `Go to File` and `Go to Type` to open everything anyway. It's more about having a hierarchy that breaks things down in a way that is logical, consistent, and useful, particularly for new contributors. Since this is evidently the convention, I'm good with it.
liamcardenas commented 2017-11-24 21:41:38 +01:00 (Migrated from github.com)

I agree with @kauffj, adding layers of directories is typically undesirable but is worth doing so since it is the convention and provides substantial benefits..

I looked through the code and it looks like you covered all your bases. Good work! Will a lot of these formatting changes stop showing up in PRs when we use prettier on the whole app?

I’m fine with merging ASAP, I will be back on my laptop later today and I can further test this if need be.

I agree with @kauffj, adding layers of directories is typically undesirable but is worth doing so since it is the convention and provides substantial benefits.. I looked through the code and it looks like you covered all your bases. Good work! Will a lot of these formatting changes stop showing up in PRs when we use prettier on the whole app? I’m fine with merging ASAP, I will be back on my laptop later today and I can further test this if need be.
liamcardenas (Migrated from github.com) approved these changes 2017-11-24 21:42:18 +01:00
IGassmann commented 2017-11-24 21:47:13 +01:00 (Migrated from github.com)

The formatting changes came from Prettier, like in #781 . Since I moved files, Prettier is probably being applied to all /ui files.

The formatting changes came from Prettier, like in #781 . Since I moved files, Prettier is probably being applied to all `/ui` files.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#783
No description provided.