Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Reorganize directories #469

Open
grtjn opened this issue Feb 21, 2017 · 6 comments
Open

Reorganize directories #469

grtjn opened this issue Feb 21, 2017 · 6 comments

Comments

@grtjn
Copy link
Contributor

grtjn commented Feb 21, 2017

Aim is to better reflect route hierarchy, but at the same time try to keep it as simple as possible.

Related code style guidelines:

@grtjn
Copy link
Contributor Author

grtjn commented Feb 21, 2017

Perhaps:

  • ui/app/core/(login|error|...)
  • ui/app/routes/(create|search|...)

@grtjn
Copy link
Contributor Author

grtjn commented Feb 21, 2017

Current tree structure of UI is:

app/templates/ui
├── app
│   ├── create
│   ├── detail
│   ├── error
│   ├── interceptors
│   ├── landing
│   ├── login
│   ├── message-board
│   ├── root
│   ├── route
│   ├── search
│   └── user
├── images
└── styles

@grtjn
Copy link
Contributor Author

grtjn commented Aug 29, 2017

It also relates to #479. Some folders have a mixture of things, like services, interceptors, and directives as well as views and controllers. Makes it more difficult to find things when new to this, and copy/paste usually copies more than needed..

Directives should have a separate module..

@grtjn
Copy link
Contributor Author

grtjn commented Aug 29, 2017

Some votes on this would by nice by the way.. Anyone reading this who cares to comment?

@patrickmcelwee
Copy link
Contributor

I like the idea of separating 'routes' for features that correspond to a top-level route and 'core' for everything else.

I don't understand why directives should have a separate module. I followed the links above, but didn't find the explanation.

Also, I like that services, directives, views, and controllers related to a given feature live in the same place (with appropriate names). I wasn't sure from reading your comments: Are you suggesting changing that?

@grtjn
Copy link
Contributor Author

grtjn commented Aug 29, 2017

Regarding files in same place or not: if code is dedicated to a view, then yes, otherwise I'm inclined to think differently.

It is tricky though. Login, user and profile are related, but there is a difference between login and user service, and interceptors on one side, and html, ctrl, directives related to login/profile view on the other side. I think interceptors and services belong to core, or maybe even some external package.

Directives is trickiest. We currently use the search dropdown directives on the search page only, but they might have use outside that page too. Secondly, they are isolated components. They could (theoretically) be pulled in from an external package too. Hence my thought of separating them out too.

I don't want to bloat the directory listing either, so we need to find a nice balance. I'm open to suggestions..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants