Skip to content

Automate styleguide tree #25

@Wolfr

Description

@Wolfr

https://github.com/usebedrock/bedrock2-angular/blob/638abb21b22a7ea47a457e3ed34f4dbaf3d25794/src/app/pages/styleguide/styleguide.component.html

Currently I don't really like how the active class is repeated so many times.

This component tree is bound to get pretty large. Most projects have 50+ components. Manually updating it will be a pain after a while.

Can we add some automation to this tree? We could put the category (Basics, components, ...) in the router data and then loop over the categories, by a set category order.

In Bedrock 1 the category order is defined in a config JS file: https://github.com/usebedrock/bedrock/blob/master/bedrock.config.js#L26-L30

Is is then looped over: https://github.com/usebedrock/bedrock/blob/6a71f8e5cfbd8ac56e47437833c348c68d828d67/core/templates/includes/styleguide-nav.pug#L3

Can we do something similar that is clever to avoid too many manual steps?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions