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

Render accessibility criteria and body on component page #6

Merged
merged 2 commits into from Jul 27, 2017
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jul 26, 2017

  • Don't process all components every pageload
  • Use govspeak to turn markdown into HTML
  • Use govspeak (static) component to render HTML
  • Style headings based on class not with default styles to avoid risk of affecting component partials and to make re-use easier

https://trello.com/c/qIwQRSai/35-1-gem-render-body-markdown-as-html
https://trello.com/c/gCTvBkD1/36-1-gem-render-accessibility-acceptance-criteria-and-update-documentation

description component - gov uk component guide 20170726

fofr added 2 commits Jul 24, 2017
* We don’t want to parse all the documentation files every time we load
a single component
* Caching may make development difficult, stale views/docs may lead to
errors
* Use govspeak to turn markdown into HTML
* Use govspeak (static) component to render HTML
* Style headings based on class not with default styles to avoid risk
of affecting component partials and to make re-use easier
@fofr fofr force-pushed the a11y-body branch from 6566644 to e986f3e Jul 26, 2017
<p class="component-description">
<%= @component_doc.description %>
</p>
<% if @component_doc.body.present? %>

This comment has been minimized.

@nickcolley

nickcolley Jul 26, 2017
Contributor

We're referencing @component_doc.html_body below, should this conditional be the same?

This comment has been minimized.

@fofr

fofr Jul 27, 2017
Author Contributor

No. Body is the markdown version, if it exists then we can parse and rendering the HTML version. This avoids us doing it twice.

@nickcolley nickcolley merged commit 2b3034b into master Jul 27, 2017
1 check passed
1 check passed
continuous-integration/jenkins/branch This commit looks good
Details
@nickcolley nickcolley deleted the a11y-body branch Jul 27, 2017
fofr added a commit that referenced this pull request Jul 27, 2017
* Include body and accessibility acceptance criteria on component pages
PR #6
* Fix load ordering bug which would sometimes cause the component guide
to use the app’s layout PR #5
@fofr fofr mentioned this pull request Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants