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

Tweak specialist documents to match specialist-frontend rendering #334

Merged
merged 5 commits into from May 2, 2017

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Apr 26, 2017

  • Add most popular specialist docs to wraith - example output: shy-coil.surge.sh/gallery.html
  • Pass array of facet values to components to match specialist-frontend
    • When multiple values are passed to the document footer it render each of them on a new line.
    • When multiple values are passed to metadata it joins them and puts 'and' between the last two values
  • Group date facets together. Makes dates more comparable and matches specialist-frontend ordering.
  • Give specialist metadata more room using same CSS hack as specialist-frontend
  • Use first_published_at in facets as canonical value

first_published_at value

Some specialist document types (drug safety updates, DFID research outcomes) include a “first_published_at” facet.

These documents have been published earlier, in a publication elsewhere. eg Time research published is before the link to the research was published on GOV.UK.

  • When provided, use this value as canonical first published date
  • Avoids duplicate publish dates from showing

More context here: alphagov/specialist-publisher#1030

Passing arrays to components

screen shot 2017-04-26 at 16 18 47
screen shot 2017-04-26 at 16 18 35

Grouping dates

screen shot 2017-04-26 at 16 20 49

@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-334 Apr 26, 2017 Inactive
@mcgoooo
mcgoooo approved these changes May 2, 2017
Copy link
Contributor

@mcgoooo mcgoooo left a comment

looks good

fofr added 5 commits Apr 25, 2017
Also tidy up line spacing and date formatting
* When multiple values are passed to the document footer, it will render
  each of them on a new line.
* When multiple values are passed to metadata it joins them and puts
  'and' between the last two values

This matches the specialist-frontend rendering.
eg Published, issued, incident occurrence.
* Makes dates more comparable
* Matches specialist-frontend behaviour
Names of facets on specialist content can be quite long, use the same
hack and styles from specialist-frontend to give them more space and
prevent wrapping which makes text hard to read.

This goes against principles of overriding component styles, however
the component will be redesigned as part of this story:
https://trello.com/c/2pik3I0j/109-1-update-metadata-component-in-static
Some specialist document types (drug safety updates, DFID research
outcomes) include a “first_published_at” facet.

These documents have been published earlier, in a publication
elsewhere. eg Time research published is before the link to the
research was published on GOV.UK.

* When provided, use this value as canonical first published date
* Avoids duplicate publish dates from showing
@fofr fofr force-pushed the specialist-tweaks branch from 2e4e269 to 4030020 May 2, 2017
@fofr fofr merged commit bd86fb0 into master May 2, 2017
2 checks passed
2 checks passed
continuous-integration/jenkins/branch This commit looks good
Details
security/snyk No new vulnerabilities
Details
@fofr fofr deleted the specialist-tweaks branch May 2, 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

3 participants
You can’t perform that action at this time.