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 doc for explaining Finder Content Item #155

Closed
wants to merge 3 commits into from

Conversation

tommyp
Copy link
Contributor

@tommyp tommyp commented Feb 2, 2015

First pass at a doc for what the Finder Content Item should contain. Leaving the facets for now until #148 is merged.

jamiecobbett and others added 2 commits January 29, 2015 16:45
There was piecemeal support for this before but no test coverage.

In theory, requests for non-existent finders shouldn't be routed to this app,
but they could be. Additionally, the nil-pointer error that happened instead
was confusing in development.
…ms_gracefully

Handle non existent content items gracefully

A Finder Content Item is a specification of the [Content Item](https://github.com/alphagov/content-store/blob/master/doc/content_item_fields.md). This guide explains what goes in the details hash of the ContentItem and why.

The Finder Content Item is used by Finder Frontend to render the Finder page. Some of the details Most of what it uses goes in the `details` hash.
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some spare words here. "Some of the details Most of what"

@tommyp tommyp force-pushed the content-item-docs branch from ab5175f to d8af6a7 Compare February 2, 2015 15:51

## `beta`

A boolean. Required.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this required? Can't we just default it to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but I thought I'd pass this on what currently is required and change it when I refactor the App.

@tommyp tommyp force-pushed the content-item-docs branch from d8af6a7 to 1b3a2fa Compare February 2, 2015 15:52

## `beta_message`

A string. Required.
Copy link
Contributor

Choose a reason for hiding this comment

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

If beta is false is this still required? Even if beta is true, isn't there a default beta message that can be used if this isn't provided?

@tommyp tommyp force-pushed the content-item-docs branch from 1b3a2fa to 0f222b1 Compare February 2, 2015 15:53

A string. Required.

The lowercase singular version of whatever format the Finder is using. For example: [`/cma-cases`](https://www.gov.uk/cma-cases) has a `document_noun` of `case`, [`/aaib-report`](https://www.gov.uk/aaib-reports) has a `document_noun` of `report`.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to describe the ways this string is used. Is it only used for constructing the filter sentence?

@tommyp tommyp force-pushed the use-facets-for-metadata branch 4 times, most recently from 917d9ec to 4ca0b5e Compare February 2, 2015 17:08
@tommyp tommyp force-pushed the content-item-docs branch 2 times, most recently from 4fa1d50 to f454945 Compare February 2, 2015 17:37
First pass at a doc for what the Finder Content Item should contain.
Leaving the facets for now until
#148 is merged.
@tommyp tommyp force-pushed the content-item-docs branch from f454945 to 7917eb1 Compare February 3, 2015 14:25
@tommyp tommyp closed this Feb 3, 2015
@tommyp tommyp deleted the content-item-docs branch February 3, 2015 14:26
@tommyp tommyp restored the content-item-docs branch February 3, 2015 14:26
@evilstreak evilstreak deleted the content-item-docs branch February 3, 2015 15:37
tijmenb added a commit that referenced this pull request Feb 27, 2017
Full changelog:

# 10.1.3

* Fix memory leak in components

# 10.1.2

* Bugfix for request URI's encoded as ASCII

# 10.1.1

* Bugfix for caching behaviour

# 10.1.0

* Use `Rails.cache` as the cache for templates, locales and components.
You can
remove `config.slimmer.use_cache` for your application, as you can no
longer
opt-out of caching.
* Add a `User-Agent` header to all outgoing API requests

# 10.0.0

* Removes the need_id meta tag, which is no longer used.
* Removes the functionality for breadcrumbs, related links and
artefact-powered
metatags.
* Drop support for old Rails & Ruby versions. This gem now supports
Rails 4.2 and 5.X
on Ruby 2.1 and 2.2.
* Renames `Slimmer::SharedTemplates` to `Slimmer::GovukComponents`

# 9.6.0

* Adds an 'inside header inserter' processor which allows an
application to
inject a block of HTML after the logo by including a .inside-header
element
in their application’s output.
(PR #167 alphagov/slimmer#167)

* Remove `MetaViewportRemover` processor as it is no longer used.
(PR #166 alphagov/slimmer#166)

# 9.5.0

* Adds a Cucumber helper that makes it easy for host applications to
configure Slimmer correctly under test.

(PR #162 alphagov/slimmer#162)

# 9.4.0

* Adds an RSpec helper that makes it easy for host applications to
configure Slimmer correctly under test.

Fixes `stub_shared_component_locales` helper to correctly stub HTTP
requests to fetch locale information when rendering its templates.

(PR #159 alphagov/slimmer#159)

# 9.3.2

* Bugfix: Over time, the I18n backend would be chained in each request,
causing the stack to grow too large and use too much memory

(PR #157 alphagov/slimmer#157)

# 9.3.1

* Allows frontend apps to stub component locales for example

```ruby
class ActiveSupport::TestCase
include Slimmer::TestHelpers::SharedTemplates

def setup
stub_shared_component_locales
end
end
```

(PR #155 alphagov/slimmer#155)

# 9.3.0

* Integrates translations from GOVUK Components to be used in
applications

When including `Slimmer::SharedComponents`, the I18nBackend will be
chained to `Slimmer::I18nBackend` allowing translations in `static` to
work in the frontend applications

(PR #152 alphagov/slimmer#152)

# 9.2.1

* Replaces deprecated `before_filter` calls in shared templates.

# 9.2.0

* Raise a custom `CouldNotRetrieveTemplate` exception when a connection
to the assets server can't be made because of an SSL problem (PR #143).

# 9.1.0

* Allow applications to request components using full or partial
component
paths, eg "name", "name.raw" and "name.raw.html.erb". This allows
components to be nested within other components.
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