GithubHelp home page GithubHelp logo

nogtini / collections Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.15 MB

Serves the new navigation pages, browse, topic and services and information pages on GOV.UK

Home Page: https://docs.publishing.service.gov.uk/apps/collections.html

License: MIT License

Dockerfile 0.08% Ruby 74.75% JavaScript 11.49% CSS 3.21% HTML 9.74% Gherkin 0.59% Shell 0.14%

collections's Introduction

Collections Frontend

Collections serves the GOV.UK navigation pages and organisation pages.

Browse page Topic page Subtopic page Services and information page Taxonomy page Worldwide taxonomy page Organisation index page Organisation page

(As of June 2018)

Live examples

Nomenclature

Topics

  • Curated list: a group of content tagged to a subtopic that has been curated into a named list.
  • Topic: a named group of sub-topics. (A deprecated name for this is "specialist sector".)
  • Sub-topic: a group of content within a topic. (A deprecated name for this is "specialist sub-sector".)

Browse pages

Taxonomy

The taxonomy is surfaced on taxon pages, which group together tagged content for that level of the taxonomy into supergroups on the page, e.g: Guidance and Regulation for Funding and finance for students gov.uk/education/funding-and-finance-for-students. Each taxon page also shows a grid of sub-topics at the next level of the taxonomy.

Worldwide taxonomy

The worldwide taxonomy is rendered on different types of pages depending on whether the taxon has any children.

For example:

  • Taxon with children: a content item of type taxon that has child_taxons links. None of those child taxons' links have child_taxons, in which case we display an accordion view: gov.uk/world/afghanistan
  • Taxon without children: a content item of type taxon that doesn't have child_taxons links. In this case we display an leaf view: gov.uk/world/living-in-afghanistan
  • Taxon with associated taxons: a content item of type taxon that has associated_taxons links. In this case the tagged content of the taxon will include content that is directly tagged to it and also content that has been tagged to any of the associated taxons.

Technical documentation

This is a public facing Ruby on Rails application that retrieves browse content from APIs and presents it. There is no underlying persistence layer and all content is retrieved from external sources.

Whitehall email and feed links for World Locations

A special case exists within Collections to allow email links on Taxon pages to be generated such that they point to the email subscription logic in Whitehall. This is currently implemented in app/helpers/email_helper.rb with the branching logic sitting in app/views/taxons/_email_alerts.html.

The intention is to migrate rendering of World Location pages from Whitehall to Collections. Whitehall serves these from /government/world/{world_location}. Collections will serve these from /world/{world_location}.

The helper currently tests for base_path starting with /world and provides two methods; one to create an atom link and one to create an email link.

Once email subscriptions for World Locations have been completely ported to use Email Alert Api, this functionality can be removed.

Content for taxon pages

Content for taxon pages is returned by a search in Rummager based on content_ids for world taxonomy pages and content_ids and supergroups for all other taxonomy pages.

Dependencies

  • content-store, provides:
    • Mainstream browse pages (Root, Top and Second level browse pages)
    • Topics
    • Subtopics and their curated lists
  • rummager, provides:
    • latest changes for Topics
    • content tagged to a particular Topic, Mainstream browse page or Organisation
  • email-alert-api, provides:
    • support for subscribing to notifications from a topic

Running the application

./startup.sh

The app should start on http://localhost:3070 or http://collections.dev.gov.uk on GOV.UK development machines.

./startup.sh --live

This will run the app and point it at the production GOV.UK content-store and static instances.

./startup.sh --dummy

This will run the app and point it at the dummy content store, which serves the content schema examples and random content.

Running the test suite

Use bundle exec rake to run the test suite, excluding JavaScript

Javascript tests

Use bundle exec rake spec:javascript to run Jasmine tests Alternatively, visit collections.dev.gov.uk/specs for a live debugger in your browser

License

MIT License

collections's People

Contributors

tijmenb avatar dependabot-support avatar carvil avatar sihugh avatar andysellick avatar thomasleese avatar alext avatar edds avatar alecgibson avatar cbaines avatar suzannehamilton avatar leenagupte avatar jordanhatch avatar rboulton avatar elliotcm avatar barrucadu avatar kushalp avatar oscarwyatt avatar pedrosmmoreira avatar kevindew avatar dependabot-preview[bot] avatar fofr avatar whoojemaflip avatar deborahchua avatar fmlharrison avatar evilstreak avatar davidslv avatar rubenarakelyan avatar jackscotti avatar bilbof avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.