[FEATURE] Add ability to specify tab ordering and custom tab labels
See original GitHub issueOverview of the issue
My team would like to be able to set the order of tabs and customize the tab labels.
Motivation for or Use Case
We want to be able to make the Examples tab the leftmost tab, and we would also like to set the label for the tab to “Overview” instead of “Examples”.
Suggest a Fix
We would like to contribute this feature. Our plan is to allow the user to optionally pass in an array of tab data that determines the tab order and the tab labels. Although the existing disabling flags would be left in place for consumers who don’t want to provide a tabConfig, using this optional tabConfig parameter would obviate the need to disable individual tabs. Additionally, the same parameter could be extended later to allow the consumer to add custom tabs with custom content.
Note: If a consumer specifies a tab that a particular partial template does not currently contain, the tab would be skipped for that partial. For example, if the tabConfig includes a “Template” tab, the Template tab would only appear on the DOM for components and would not appear for classes, directives, injectables, interceptors, interfaces, modules, or pipes to maintain the current behavior.
Example usage:
tabConfig: [
{
id: "examples",
label: "Overview" // customized label
},
{
id: "info",
label: "API" // customized label
},
{
id: "source",
label: "Source"
}
]
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Yes for sure. May be i need to add support for configuration using a json file and not directly in the command line. See https://github.com/compodoc/compodoc/issues/379
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.