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

Automate styleguide tree #25

Open
Wolfr opened this issue Jun 29, 2020 · 0 comments
Open

Automate styleguide tree #25

Wolfr opened this issue Jun 29, 2020 · 0 comments
Assignees

Comments

@Wolfr
Copy link
Contributor

Wolfr commented Jun 29, 2020

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?

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

No branches or pull requests

2 participants