-
Notifications
You must be signed in to change notification settings - Fork 328
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
Remove README content from review app #482
Conversation
Would it make more sense at this point to split the template for the README and the template for the component view entirely? Given the only thing that's common between the two is the title and the examples which are already wrapped up in a macro. |
Updated PR. |
ac3fbd8
to
e6b4cbb
Compare
7cde775
to
758732b
Compare
758732b
to
cfb9c44
Compare
Discussed with @igloosi and @NickColley. It's not ideal but i think looks good for now. It feels odd that we're passing data both downstream and upstream, which makes things confusing, especially for newcomers. Part of refactoring would be to pass data only downstream, which will simply these views to be inherited from one layout without the need to check for upstream data like |
shall we wait for the today's session outcome before doing anything with this? |
I agree, I'm not sure we know how we want this to change yet.
cfb9c44
to
74ae0ed
Compare
will need to be reviewed after #528 |
Remove the component description, guidance and table of arguments from the component view within the review app. This will leave just the component title and the examples.
We've decided to extend the README generation from a separate template instead of having multiple 'if/else' or 'if not' statements in one template.
Inside generate:readme task we add a global 'isReadme: true' to the nunjucks environment that we use to determine which content should go where. We've use this to now to extend the correct template in each of the components 'index.njk' files.
444adad
to
6882ec2
Compare
rebased with latest changes |
This PR
removes the component description, guidance and table of arguments from
the component view within the review app. This just leaves the component title and the examples.
creates a separate template in app/views for generating README files
adds logic to each component's
index.njk
file to extend the appropriate templates based on theisReadme: true
parameter that is we pass to the nunjucks enviroment.Trello: https://trello.com/c/rUJHVyt3/612-remove-readme-content-from-components-view-in-review-app
Note: this is until we move all content into YAML file and remove component
index.njk
files