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

Create minimum viable publications format #298

Merged
merged 4 commits into from May 6, 2016
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented May 4, 2016

https://trello.com/c/v85kPiKN/366-9-publications-migration-mvp-content-schema-examples-and-front-end-work-medium

See alphagov/government-frontend#139 for an example rendering.

Details:

  • Purposefully omit:
    • Excluded nations - pattern used by detailed guides may not be correct
    • Format subtype
  • Include government, political and first_public_at as required fields, this also matches detailed guides
  • Publications can be withdrawn, include withdrawal notice
  • Case studies and detailed guides both need a tags block in the details, details.tags are used for email alerts: #292
  • Documents is an array of attachments, each attachment contains the markup necessary to render it within a govspeak block. This is an intentionally dumb approach, and matches the approach taken
    for embedded attachments. See https://docs.google.com/document/d/1Flx_eCUzixmkTT6WgjCN2bJzQ8HuVCwMga5RxUsv07M/edit

Links:

  • Add ministers
  • Policies and policy areas are included in base_links
  • Add related statistical data sets
  • Add topical events
  • Add world_locations, matching Case Studies
  • Make leading organisations a required field, provided by base_links
  • Include supporting organisations to match Case Studies – could be provided by base_links "organisations" instead, whichever it is, the two should be consistent

Include simple example based on:
https://www.gov.uk/government/publications/d17-9ly-veolia-es-uk-limited-environmental-permit-issued

fofr added 3 commits May 4, 2016
Details:

* Purposefully omit:
  * "Documents" or attachments segment, this will be included separately
  * Excluded nations - pattern used by detailed guides may not be
correct
* Include government, political and first_public_at as required fields,
this also matches detailed guides
* Publications can be withdrawn, include withdrawal notice
* Case studies and detailed guides both need a tags block in the
details, `details.tags` are used for email alerts:
#292

Links:

* Add ministers
* Policies and policy areas are included in base_links
* Add related statistical data sets
* Add topical events
* Add world_locations, matching Case Studies
* Make leading organisations a required field, provided by base_links
* Include supporting organisations to match Case Studies – could be
provided by base_links instead

Include simple example based on:
https://www.gov.uk/government/publications/d17-9ly-veolia-es-uk-limited-
environmental-permit-issued
Documents is an array of attachments, each attachment contains the
markup necessary to render it within a govspeak block.

This is an intentionally dumb approach, and matches the approach taken
for embedded attachments.

Use an array so that attachments can be ordered, counted, etc.

Details on attachments decisions:
https://trello.com/c/HLb48j22/232-govspeak-implementing-the-ui-of-attach
ments-medium
https://docs.google.com/document/d/1Flx_eCUzixmkTT6WgjCN2bJzQ8HuVCwMga5R
xUsv07M/edit

"Keep attachment template in WH Publisher, rendering it and sending
attachment HTML to the content store. Copy the CSS/JS for attachments
to the Govspeak Component, as we did in the past for embedded contacts.

This solution is required for embedded attachments, but can also be
used to migrate attachment lists (used on formats like Publications),
however should changes to the attachment template be required, all
editions with embedded attachments would need re-publishing."

Long term solution:
https://gov-uk.atlassian.net/wiki/display/GOVUK/RFC+39%3A+Embedded+relat
ional+content+in+govspeak
@fofr fofr force-pushed the publications-format branch from c8cc3c5 to b585bbe May 6, 2016
"documents": {
"type": "array",
"items": {
"type": "string"

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

Why are these being rendered by the publishing app? These don't need to be embedded in Govspeak, so I think they should be made available as plain data and rendered by the frontend. Or was there a conversation I missed?

This comment has been minimized.

@fofr

fofr May 6, 2016
Author Contributor

I don't understand your comment. Details about this in this commit message, with links to decisions: 08d08f2

They are responsible for this bit in the frontend:
screen shot 2016-05-06 at 13 41 08

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

Ok, so that's a decision I missed. Fine as a short term solution 👍

"lead_organisations"
],
"properties": {
"document_collections": {

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

These are supplied by content store / dependency resolution, not by the publishing app.

This comment has been minimized.

@fofr

fofr May 6, 2016
Author Contributor

I'm continuing to match other formats, eg Case Studies: https://github.com/alphagov/govuk-content-schemas/blob/master/formats/case_study/publisher/links.json#L24-L26

Presumably the document collection work needs a PR to remove that block from the detailed guides and case studies links hash?

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

Yes, it will do.

This comment has been minimized.

@fofr

fofr May 6, 2016
Author Contributor

Removing document_collections gives:

The property '#/links' contains additional properties ["document_collections"] outside of the schema when none are allowed in schema file:///var/govuk-sites/govuk-content-schemas/dist/formats/publication/frontend/schema.json#
The following examples don't validate against their schemas:
formats/publication/frontend/examples/political_publication.json

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

Ah, that's because there's no way of generating separate frontend_links at the moment, sorry. Ok fair enough 👍

]
},
"schema_name": "publication",
"document_type": "publication"

This comment has been minimized.

@boffbowsh

boffbowsh May 6, 2016
Contributor

I know this is deliberately left for later, but if you specify the correct key here (guidance) and for the Veolia publication (notice), we get 50% of that work done.

@boffbowsh boffbowsh merged commit b122802 into master May 6, 2016
17 checks passed
17 checks passed
Specialist frontend contract tests Build #752 succeeded on Jenkins
Details
Verify collections against content schemas Build #865 succeeded on Jenkins
Details
Verify collections-publisher against content schemas Build #852 succeeded on Jenkins
Details
Verify contacts-admin against content schemas Build #986 succeeded on Jenkins
Details
Verify contacts-frontend against content schemas Build #521 succeeded on Jenkins
Details
Verify government-frontend against content format examples Build #1004 succeeded on Jenkins
Details
Verify hmrc-manuals-api against content schemas Build #670 succeeded on Jenkins
Details
Verify manuals-frontend against schema examples Build #846 succeeded on Jenkins
Details
Verify publisher against content schemas Build #903 succeeded on Jenkins
Details
Verify specialist-publisher against content schemas Build #952 succeeded on Jenkins
Details
Verify specialist-publisher-rebuild against content schemas Build #77 succeeded on Jenkins
Details
Verify static components against schema examples Build #387 succeeded on Jenkins
Details
Verify travel-advice-publisher against content schemas Build #652 succeeded on Jenkins
Details
default Build #932 succeeded on Jenkins
Details
finder frontend contract tests Build #1003 succeeded on Jenkins
Details
policy publisher contract tests Build #1012 succeeded on Jenkins
Details
whitehall contract tests Build #1058 succeeded on Jenkins
Details
@boffbowsh boffbowsh deleted the publications-format branch May 6, 2016
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
You can’t perform that action at this time.