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

Add national applicability to universal navigation variant #539

Merged
merged 2 commits into from
Nov 16, 2017

Conversation

fofr
Copy link
Contributor

@fofr fofr commented Nov 15, 2017

Allow content metadata to render any metadata types

Add national applicability to content metadata

  • Move content_metadata params into metadata presenter module
  • Decorate with “Applies to” when National Applicability applies
  • Add “Applies to” to the beginning of the hash to appear before “From”
  • Use existing methods for generating “Applies to” from content item
  • Improve rendering of component when no dates provided

Review app component guide:
https://government-frontend-pr-539.herokuapp.com/component-guide/content-metadata

screen shot 2017-11-15 at 09 52 29

@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-539 November 15, 2017 09:51 Inactive
fofr added 2 commits November 15, 2017 09:56
* Use pattern from static metadata component:
https://govuk-static.herokuapp.com/component-guide/metadata
* Allow further metadata to be added easily as design is iterated
* This allows us to easily add national applicability
* Move content_metadata params into metadata presenter module
* Decorate with “Applies to” when National Applicability applies
* Add “Applies to” to the beginning of the hash to appear before “From”
* Use existing methods for generating “Applies to” from content item
* Improve rendering of component when no dates provided
- <a href='/government/organisations/education-funding-agency'>Education Funding Agency</a>
- <a href='/government/organisations/department-for-work-pensions'>Department for Work and Pensions</a>
nothing:
description: |
Copy link
Contributor

@maxgds maxgds Nov 15, 2017

Choose a reason for hiding this comment

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

Should this be an example or just a line in the intro to the component? I can see why you'd consider the fail state and test against it but specifically presenting an example seems counter intuitive to me.

Copy link
Contributor Author

@fofr fofr Nov 15, 2017

Choose a reason for hiding this comment

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

I think it's appropriate to keep to avoid the risk of future regressions.

A few other components in static do this too.

@maxgds
Copy link
Contributor

maxgds commented Nov 15, 2017

Quite an overhaul! Makes sense, though. Just one query around the examples given in the guide but it otherwise looks good.

@maxgds maxgds merged commit 739a988 into master Nov 16, 2017
@barrucadu barrucadu deleted the national-applicability-no-nav branch April 27, 2018 12:47
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