Update file structure to follow electron-webpack guidelines #783
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#783
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "restructuring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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, underapp/
) and Renderer (previously, underui/
).👍
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.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.zipOn IntelliJ IDEA:
@IGassmann thanks, but it's not really about usability in navigation. I rarely navigate the tree and instead use
Go to File
andGo 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.
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.
The formatting changes came from Prettier, like in #781 . Since I moved files, Prettier is probably being applied to all
/ui
files.