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

PoC to parse existing standards to json file with requirements. #388

Merged

Conversation

jeff-horton-ho-sas
Copy link
Contributor

@jeff-horton-ho-sas jeff-horton-ho-sas commented Mar 1, 2024

Adds a summary page of standards and their requirements that teams can use as a quick reference / to build a doc that assert's their compliance.

Screenshot 2024-03-18 at 12 50 40

This can also be downloaded as a .json file (which has an associated schema.json spec) and a .csv file
that teams can use to assert their compliance in a machine readable way. This is a proof of concept of this page to enable feedback from teams trying to adopt the standard.

Code change

I can confirm:

Accessibility considerations

@jeff-horton-ho-sas jeff-horton-ho-sas self-assigned this Mar 1, 2024
@jeff-horton-ho-sas jeff-horton-ho-sas linked an issue Mar 1, 2024 that may be closed by this pull request
1 task
@jeff-horton-ho-sas jeff-horton-ho-sas marked this pull request as ready for review March 18, 2024 12:23
@jeff-horton-ho-sas jeff-horton-ho-sas requested review from a team as code owners March 18, 2024 12:23
Comment on lines 16 to 26
{% for standard in collections.getAllStandardsOrderedByID %}
<h2 class="app-document-header__title govuk-heading-l">
<span class="govuk-caption-l">{{standard.data.id}}</span>
<a href="{{ standard.url }}" class="govuk-link">{{ standard.data.title }}</a>
</h2>
<p class="govuk-hint">Last updated: {{ standard.data.date | postDate }}</p>

{% for requirement in standard.templateContent | extractRequirements %}
* [{{requirement.title}}]({{ standard.url }}{{requirement.id}})
{% endfor %}
{% endfor %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be formatted in a better way, to make it easier to be followed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of that awkwardness is because once the template has been processed it's then parsed as markdown, which cares about the whitespace. It's not getting much benefit from the markdown parsing so refactored to nunjucks/html to make it more readable

@jeff-horton-ho-sas jeff-horton-ho-sas merged commit 1e3bbb8 into main Apr 26, 2024
3 checks passed
@edhamiltonHO edhamiltonHO deleted the 387-feature-ability-to-export-snapshot-of-standards branch April 26, 2024 13:15
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.

[FEATURE] Ability to export snapshot of standards
3 participants