Closed
Bug 1043323
Opened 11 years ago
Closed 7 years ago
treeherder-ui: Switch the repo to a functional directory structure
Categories
(Tree Management :: Treeherder, defect, P4)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: emorley, Unassigned)
References
Details
Migrated from:
https://github.com/mozilla/treeherder-ui/issues/85
Original summary:
functional folder structure
pnispel commented 24 days ago:
{
I think that this project is a large enough size that it's easy to get confused when looking through the code for some functionality. This issue is to start the conversation about changing the directory structure from:
js --->
controllers
models
services
partials
to a structure based on functionality such as http://trochette.github.io/Angular-Design-Patterns-Best-Practices/#/modularity
This allows somebody to view the folder structure for the app and immediately know what the application does and where code for each functionality lives. For Treeherder it may look something like:
app
+--- assets
| | +--- img
| | +--- fonts
+--- css
+--- common
| | +--- directives
| | +--- services
| | +--- providers
+--- header
| | header.js / css / html
+--- changeset
| | changeset.js / css/ html
| | +--- revision
| | | revision.js / css / html
| | | +--- jobs
| | | | jobs.js / css / html
+--- jobs_panel
| | jobs_panel.js / css / html
}
Reporter | ||
Comment 1•11 years ago
|
||
camd commented 24 days ago:
Paul - This is a really good point. I like this approach. It can be hard when certain parts cross functional boundaries. And sometimes common is the right answer to that. Too many levels of depth can also be a bit cumbersome (like in changeset above). But I think this is an excellent conversation to have and we could definitely improve on where we are.
If we do this, we would be well served by having an agreed-upon file prefixes (or suffixes) for the js files. ctrl, dir, srv something like that for controller, directive, service, respectively.
I have mixed feelings on putting the html in there, but maybe that would be great. I think what this would buy us is, if I'm working on the top-nav panel, I don't have to look in so many places. It'll all be in one spot. And that sounds really great. :)
Let's bring this up at the Thursday meeting, ok?
Reporter | ||
Comment 2•11 years ago
|
||
camd commented 24 days ago:
Oh, and definitely +1 for breaking up the treeherder.css file. That thing's a mess in there...
Reporter | ||
Updated•10 years ago
|
Priority: P4 → P3
Reporter | ||
Updated•10 years ago
|
Priority: P3 → P4
Comment 3•7 years ago
|
||
We may do this organically as part of other work, but will likely not do this as a single task.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•