Code Monkey home page Code Monkey logo

wellcomecollection.org's Introduction

Wellcome Collection

Wellcome Collection web applications.

Build status Deployment status e2e

We all work in the open and open source where we can and where it makes sense

We put users at the centre of all decisions. We use evidence and insight to inform these decisions at all stages of the product cycle

We create simple, well considered experiences, frequently incorporating user feedback

We have inclusive processes that create accessible products

We build products that deliver value, solve real problems, and are a delight to use

Visual design

Visual design for the experience is created in Sketch and shared via Zeplin.

To get a login, ask a friendly experience team member near you.

Core parts

  • A collection of content from a wide range of authors to challenge the ways people think and feel about health by connecting science, medicine, life and art code.

  • Giving people the ability to partake in or inform themselves on Wellcome Collection's events, exhibitions, talks, discussions, and more.

  • Tools to allow people to browse and dig deeper into our catalogue. code.
  • Wellcome Collection's design system. code.

Local development

You can run ./scripts/setup.sh from the root of this project to install what you need to get started.

We use Yarn to manage our external dependencies.

We then use Yarn Workspaces to manage our local, common dependencies.

To run a project, from the root directory:

yarn install
# yarn {appName = content|identity}
# e.g.
yarn content
# you may also run all of them concurrently.
# this may add a prefix to the URL such as `/catalogue/`
# and is only for local cross projects development
yarn run-concurrently

Port

By default webapps will run on port 3000.

You can specify a port by setting the PORT in your .env.development.

This is useful if you want to run webapps simultaneously, or you may just use yarn run-concurrently as explained above.

Running CI steps locally

In order to reproduce a build step locally you can run the same docker-compose command that Buildkite runs.

See an example for edge_lambdas below. This example presumes you have an AWS credentials file set up to allow you to assume the CI role.

Your AWS configuration in $HOME/.aws/credentials might include the following (with the default profile containing your primary credentials).

[ci-agent]
region=eu-west-1
role_arn=arn:aws:iam::760097843905:role/ci-agent
source_profile=default

[experience-ci]
region=eu-west-1
role_arn=arn:aws:iam::130871440101:role/experience-ci
source_profile=ci-agent

If in pipeline.yml you have:

- label: "deploy edge_lambdas"
  if: build.branch == "main"
  plugins:
    - wellcomecollection/aws-assume-role#v0.2.2:
        role: "arn:aws:iam::130871440101:role/experience-ci"
    - ecr#v2.1.1:
        login: true
    - docker-compose#v3.5.0:
        run: edge_lambdas
        command: [ "yarn", "deploy" ]
        env:
          - AWS_ACCESS_KEY_ID
          - AWS_SECRET_ACCESS_KEY
          - AWS_SESSION_TOKEN

You should update docker-compose.yml to look as follows.

services:
  edge_lambdas:
    build:
      context: ./cache/edge_lambdas
    command: [ "yarn", "deploy" ]
    volumes:
      - /my/home/folder/.aws:/root/.aws:ro
    environment:
      - AWS_PROFILE=experience-ci

You will need to add a command, volumes and environment block to specify the required command and mount your AWS credentials in the running container.

You can then run docker-compose commands as would occur in the CI environment.

docker-compose edge_lambdas build
docker-compose edge_lambdas run

Linting

We use ESLint to lint the project. The config is global.

We use stylelint to lint styled-components. The config is global.

We extend a few configs, including prettier, which we configure separately.

### VSCode setup

It's easiest to use Dirk Baumer's VSCode plugin.

If you have prettier (esbenp.prettier-vscode) set as default formatter, we'll get conflicts.

Linting does not happen in CI, so to enable linting on save, you can add this to your workspace settings:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "stylelint.validate": ["typescriptreact"],
}

Other pieces of the Wellcome Collection puzzle

Wellcome Collection Digital Platform.

Stacks, Wellcome Collection's musings on digital developments.

Catalogue API documentation.

Thanks

Chromatic

Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.

wellcomecollection.org's People

Contributors

agnesgaroux avatar ajrussellaudio avatar alexwlchan avatar alfraser86 avatar alicefuzier avatar ambacelar avatar danielgrant avatar davidpmccormick avatar dependabot[bot] avatar dominiquemarshall avatar garethormerod avatar garyttierney avatar georgiaewhitney avatar gestchild avatar greenkeeper[bot] avatar harrisonpim avatar hbrown-w avatar heesoomoon avatar ionab avatar ishouty avatar jamesgorrie avatar jamieparkinson avatar kenoir avatar melanierogan avatar paul-butcher avatar pollecuttn avatar rcantin-w avatar robmarch2 avatar stephenwf avatar taceybadgerbrook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wellcomecollection.org's Issues

Build image styles

  • Header hero
  • Header hero with caption
  • Inline image without caption
  • Inline image with caption

Article - end

Article end should include black rectangle shape 5px X 60px

Article - block

Grey block at the top of the article, left corner. Bottom of this should always align with the bottom of the main title text

Add image gallery content type

We need to be able to see image galleries on the frontend.

Blockers / Dependecies

  • API returning the image gallery as associtedMedia.

Article - large image

Full edge image, in line. This should go almost entire to the edge, only have 60px buffer on both edges

Search Close

Lets add a "close" X to the search bar once the user has activated the search field. This way they can close the search and get back to navigation. Use the same X we have in other places and place it on the right side edge and move search icon 30px over to the left.

Article - key line

Key line which divides columns, should always end/bottom align with the last paragraph text

New site notification

Mobile:

  • Computer icon appears dark grey and not solid black
  • Space between message and links should be same as top and bottom edges

Article - title area

In Cardigan. Page Description > article. Remove category title above article title. Currently says ‘States of Mind’. We will no longer have this.

Sort Google Analytics

At the moment we are tracking using Google Analytics across cardigan, localhost etc.
We should only be tracking next.wc.org (or if it is proxied from wc.org).

We can add extra tracking for Cardigan.

Cookie alert

  • Design cookie alert pattern
  • Implement cookie alert

Link from burger to footer nav

Clicking/tapping the burger should link the user to the nav in the footer when the site is not 'enhanced' (e.g. JS doesn't fire).

Article - key line cont.

Key line which divided columns should continue after large item (edge to edge image or image gallery)

Changing text on opt-out alert

Could I please have the yellow banner text changed to read:

Welcome to the new reading experience for Wellcome Collection's narrative content.

Article - title

Main article title, text area should be contained within the same are that 2 columns below use. Currently the title goes too far towards the right edge.

Article - caption link

New link style. Used within image captions. Allowing editors to inject links into text. Lettera font 14px. Font hex colour: 1d1d1d. Underline 1px height. Underline hex: 006272. Hover: underline grows to 2 px height

Article - keyline

Top align key line which divides columns with the top of key line under article author

Social icons missing

There don't seem to be icons for YouTube or Soundcloud in the currently uploaded icons. We need to add svgs for these.

Build author byline

Byline for articles includes:

  • Author name (required)
  • 100x100 image (required)
  • Twitter handle (optional)

Header - Custom

'Custom' link should not be styled as rest of items. Refer to recent designs that include a link to ‘Wellcome Book Prize 2016’. A custom link should be styled differently. Helvetica Medium 14 px, with additional key line separating it from main items and aligning it right next to ‘Search’.

Mobile layout tweaks

Spotted a few layout issues from my phone (iphone safari latest version).

  1. Navigation not collapsing into burger even though it does on desktop browser (Chrome)
    articlesmobile1

  2. Opt-out bar not resizing
    articlesmobile2

@gestchild one for you?

Clear out messy content

Empty paragraphs and classes on paragraphs are being sent through from the API.
These need to be removed.

Pattern Library: Wellcome Collection brand and use of patterns

To ensure brand consistency esp when working with externals we should include guidance on usage e.g.

  • Audiences and use cases
  • What we need to include in Cardigan
  • Vision and mission of WC
  • Product personality and creative attributes (provocative, playful, purposeful and eclectic);
  • design principles incl accessibility
  • Notes of use of brand elements (typography, logo, colour)
  • House style (dates, times abbreviations, organisation name (Wellcome Collection not The Wellcome Collection etc.)

URL scheme

Need to agree our approach to designing URLs - both the principles and the instantiation of those principles.

These should include things like:

  • use of plural vs singular (/articles/:article vs /article/:article) Use plural
  • inclusion of dates and titles etc.
  • different representations e.g. /article/:article.json vs /json/ and the use of conneg the wellcomecollection.org client website won't be responsible for this as we will have our own URI patterns, still probably very closely linked to the API uris.
  • the principles that everything (all resources) should have a URI (and that pages are made up of resources (this also implies that e.g. anchors should follow the same pattern (replace the # with a / and get the resource)
  • identifiers

Footer tweaks

After discussion with y'all, we decided to:

screen shot 2017-01-09 at 10 37 56

Navigation bar

Desktop:

  • Center WC logo vertically
  • Search open needs close icon to close search field

Mobile:

  • Burger icon and close icon should be smaller in size to align with general icon sizes
  • Center burger and close icons vertically
  • Open search butts up against burger icon, should have 30 px buffer
  • Search open, blinking type line black and 2 px width
  • Add close icon when search is open

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.