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

Category improvements #938

Merged
merged 4 commits into from Mar 19, 2019
Merged

Conversation

jonchardy
Copy link
Contributor

@jonchardy jonchardy commented Jan 4, 2019

This PR makes a handful of changes based on requests and feedback from #866 and #904. I've also made a PR over at TypeStrong/typedoc-default-themes#61 to make categories more integrated into the theme.

Thanks to @rbuckton for the suggestions. I used some of the ideas from your implementation in your custom plugin.

Group Categories
Categories can now be used within groups or as lump categories. Lump categories mean if you have a method and property you want together, you can do so. The option --categorizeByGroup controls this. By default, reflections will be categorized by group (within properties, methods, etc).

Default Category
Uncategorized reflections will be placed in the default category. If everything falls into the default category, categories aren't used. The option --defaultCategory controls this. By default, the default category will be 'Other'.

Category Ordering
Categories can be ordered however the user wants. Using an array, the user can specify the order categories are displayed on their pages. The option --categoryOrder controls this. By default, they will be ordered alphabetically. An entry of '*' indicates where categories not in this list will be rendered, defaulting to the end.

Improve categories to work at the group level or the container level, add category options for flexibility, add test for categories
Copy link
Collaborator

@Gerrit0 Gerrit0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the most part this looks awesome! Since it looks like the .toObject code has changed, could you update the reflection group serializer as well? We should be moving away from .toObject with #936

Make some changes for serialization and remove some unused code
@jonchardy
Copy link
Contributor Author

jonchardy commented Jan 14, 2019

Made some updates for serialization. There will need to be more once this and #936 are merged, like updating the serialization schema. I only made changes based on the current serialization implementation.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 16, 2019

This looks good to me. Since it needs to be synchronized with TypeStrong/typedoc-default-themes#61 I think I'll leave the merge to @aciccarello

@BenDevelopment
Copy link

Hi,

When will this merge be released?

@aciccarello aciccarello merged commit 1816f75 into TypeStrong:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants