Skip to content
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

Group top-level declarations by folder structure #105

Open
luketheobscure opened this issue Dec 7, 2014 · 6 comments
Open

Group top-level declarations by folder structure #105

luketheobscure opened this issue Dec 7, 2014 · 6 comments

Comments

@luketheobscure
Copy link

I'm looking into using Jazzy to document an app, and it sure would be nice to split the lefthand menu into logical groups like the folder structure of the app. It's not that helpful to see the app delegate in the same view as the models and view controllers.

I'm not sure what this feature would look like... An inline directive for jazzy in the comment? A command line argument that looks for folder names?

@jpsim
Copy link
Collaborator

jpsim commented Dec 26, 2014

It would be awesome to parse the project's directory structure to group top-level declarations together. This would have to be type-agnostic (functions, classes, enums, structs, etc.) rather than just for classes.

Depending on the project (e.g. app vs library), the menu on the left might be better structured or flat. Perhaps both should always be available by toggling a switch in the docs' UI? Or maybe there should be a command line argument to explicitly specify to use directory structure like you mentioned.

Do you have any further thoughts as to how this might work, @luketheobscure?

@jpsim jpsim changed the title Feature Request: Group Classes Group top-level declarations by folder structure Dec 26, 2014
@jpsim
Copy link
Collaborator

jpsim commented Dec 26, 2014

We'd have to determine how arbitrarily-deep nested subfolders are handled. Given how little horizontal space there is in the current design, this could be tricky.

@luketheobscure
Copy link
Author

In my use-case, grouping everything by folder would make a lot of sense. You can see the generated documentation for the app I'm working on here. Without the context of the "Model" folder, it's a little hard to know what some of the classes do. Once the inheritance tree is implemented, it will be a little bit easier, but having the folders show up would be rad.

@istx25 istx25 removed the p4 label Nov 23, 2016
@istx25 istx25 self-assigned this Nov 23, 2016
@istx25
Copy link
Contributor

istx25 commented Nov 23, 2016

What's the status on this?

@jpsim
Copy link
Collaborator

jpsim commented Nov 26, 2016

Custom Categories (#281) provide a way to control the grouping in the sidebar, which can be used to mirror the folder structure of a project, but is much more flexible than that.

ReSwift's docs uses this to great effect IMO:

image


However, that's not the same as offering a mode that automatically does this without the need to maintain custom_categories entries in the jazzy config file, which is why this ticket is still open.

No work has been done to do this automatically AFAICT.

@istx25
Copy link
Contributor

istx25 commented Nov 26, 2016

Sounds good to me. I think the current functionality is a good middle ground for now. We can leave this feature on the back burner and (when we get around to it), write up a road map that could include this automatic functionality at a future time.

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

No branches or pull requests

3 participants