-
Notifications
You must be signed in to change notification settings - Fork 193
feat: Add support for custom guidance and appendices in HTML reports #467
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
base: master
Are you sure you want to change the base?
feat: Add support for custom guidance and appendices in HTML reports #467
Conversation
- Add TemplateConfig class to detect and process custom HTML content files - Support custom-guidance.html and custom-appendices.html files in working directory - Implement proper HTML escaping for JavaScript injection safety - Add navigation visibility controls based on content availability - Empty custom files hide corresponding navigation sections - Fall back to default content when custom files don't exist - Include comprehensive test coverage for all scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for custom guidance and appendices content in Cloudsplaining HTML reports by allowing users to provide custom HTML files that override default content sections.
- Adds
TemplateConfig
class to detect and process custom HTML files (custom-guidance.html
andcustom-appendices.html
) - Implements conditional navigation visibility based on content availability
- Integrates custom content rendering in Vue.js components with proper HTML escaping
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
test/shared/test_template_config.py |
Comprehensive test suite covering all template configuration scenarios |
cloudsplaining/shared/template_config.py |
Core logic for detecting, loading, and processing custom content files |
cloudsplaining/output/template.html |
JavaScript variable definitions for template configuration |
cloudsplaining/output/src/views/Guidance.vue |
Vue component updated to render custom or default guidance content |
cloudsplaining/output/src/views/Appendices.vue |
Vue component updated to render custom or default appendices content |
cloudsplaining/output/src/routes/routes.js |
Dynamic route registration based on navigation visibility flags |
cloudsplaining/output/src/App.vue |
Navigation menu updates with conditional visibility and code formatting |
cloudsplaining/output/report.py |
Integration of TemplateConfig into the report generation process |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
What does this PR do?
This PR adds support for customizable guidance and appendices content in Cloudsplaining HTML reports. Users can now provide their own HTML content files to customize the guidance and appendices sections of their reports.
Key features:
What gif best describes this PR or how it makes you feel?
Completion checklist
make test
,make lint
,make security-test
,make test-js
)