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

Don't show failed translation message for missing document types #1443

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

kevindew
Copy link
Member

@kevindew kevindew commented Aug 14, 2019

Trello: https://trello.com/c/VdQtNZeV/1122-spike-making-content-publisher-documents-show-up-in-whitehall-document-collections

With the update to Whitehall that allows adding any GOV.UK page to a
document collection
there is the potential users could add documents
with types the Government Frontend knows nothing about. For these cases
this will return a nil value rather than raise a failed translation
message.

At this point in time it seems unlikely users would use a document type
that is not known about as the expected usage is Content Publisher
document types. However there is nothing to prevent wider usage of
document types.

This resolves a situation like this:

Screen Shot 2019-08-14 at 12 22 01


Visual regression results:
https://government-frontend-pr-1443.surge.sh/gallery.html

Component guide for this PR:
https://government-frontend-pr-1443.herokuapp.com/component-guide

With the update to Whitehall that allows adding any GOV.UK page to a
document collection there is the potential users could add documents
with types the Government Frontend knows nothing about. For these cases
this will return a nil value rather than raise a failed translation
message.

At this point in time it seems unlikely users would use a document type
that is not known about as the expected usage is Content Publisher
document types. However there is nothing to prevent wider usage of
document types.
@kevindew kevindew merged commit 0b19af4 into master Aug 14, 2019
@kevindew kevindew deleted the handle-missing-document-types branch August 14, 2019 14:11
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