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

Dynamically generate configuration docs using YARD #968

Merged
merged 10 commits into from Jun 17, 2021
Merged

Conversation

joelhawksley
Copy link
Contributor

@joelhawksley joelhawksley commented Jun 16, 2021

This PR adds documentation for configuration options, generated using YARD.

I've reused some code @khiga8 wrote for Primer ViewComponents to extract mattr_accessors.

I also took the liberty of sorting the existing instance methods alphabetically.

[Closes #953]

@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
@joelhawksley joelhawksley marked this pull request as draft Jun 16, 2021
@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
Rakefile Show resolved Hide resolved
lib/view_component/previewable.rb Outdated Show resolved Hide resolved
@Spone
Copy link
Collaborator

@Spone Spone commented Jun 16, 2021

👍

Do you think it could be useful to mention the config.generators.template_engine and config.generators.test_framework settings on this page as well? They are not specific to ViewComponent but I guess some people may look for this kind of setting on this page.

Also, what do you think about having a dedicated "Configuration" item in the website navigation? (maybe as a child of "API")

Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com>
@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
Co-authored-by: Hans Lemuet <Spone@users.noreply.github.com>
@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
@joelhawksley
Copy link
Contributor Author

@joelhawksley joelhawksley commented Jun 16, 2021

They are not specific to ViewComponent but I guess some people may look for this kind of setting on this page.

@Spone that's a tricky one. I could go either way. I'll give it some thought, this PR isn't going to be done today 😄

@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
@github-pages github-pages bot temporarily deployed to github-pages Jun 16, 2021 Inactive
@joelhawksley joelhawksley marked this pull request as ready for review Jun 17, 2021
@joelhawksley joelhawksley marked this pull request as draft Jun 17, 2021
@joelhawksley joelhawksley marked this pull request as ready for review Jun 17, 2021
@github-pages github-pages bot temporarily deployed to github-pages Jun 17, 2021 Inactive
@joelhawksley
Copy link
Contributor Author

@joelhawksley joelhawksley commented Jun 17, 2021

@Spone I think I've gotten this to a good point for now. I ended up removing the backticks as they made visually scanning the page difficult to my eyes.

I think we should aim to flesh out the documentation in further PRs and then revisit the idea of splitting it up into pages.

@joelhawksley joelhawksley merged commit 8682057 into main Jun 17, 2021
34 checks passed
@joelhawksley joelhawksley deleted the config-docs branch Jun 17, 2021
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.

3 participants