Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Latest commit

 

History

History
131 lines (104 loc) · 21 KB

README.md

File metadata and controls

131 lines (104 loc) · 21 KB

🚨 --- NO LONGER MAINTAINED ---- Psammead ---- NO LONGER MAINTAINED --- 🚨

We have recently migrated most of our Psammead components (except for BBC Web Vitals) to a legacy folder in our Single Page Application called Simorgh.

Any open source contributions to these components should now be made via the Simorgh repo as they are no longer being maintained in the Psammead repo.

Psammead Packages Directory...

NB all Development Dependencies are in the top level package.json, none are in the packages.

Documentation index

Please familiarise yourself with our:

NB there is further documentation colocated with relevant packages and code. The above list is an index of the top-level documentation of our repo (and our sibling repo Simorgh).

Using/consuming Psammead components

NB the main example of use is this repo's sibling repo Simorgh.

Pre-requisite for use

These components have been tested in an environment which uses normalize and box-sizing: border-box for consistent behaviour across browsers. Additionally, many components depend on the BBC Reith font having been defined.

You can do this in pure CSS:

<link
  rel="stylesheet"
  href="https://necolas.github.io/normalize.css/8.0.0/normalize.css"
/>
<style>
  /* Box Sizing https://bit.ly/1A91I0J */
  html {
    box-sizing: border-box;
    font-size: 100%;
  }
  *,
  *:before,
  *:after {
    box-sizing: inherit;
  }

  @font-face {
    font-display: optional;
    font-family: 'ReithSans';
    font-style: normal;
    font-weight: 400;
    src: url('https://gel.files.bbci.co.uk/r2.511/BBCReithSans_W_Rg.woff2')
        format('woff2'), url('https://gel.files.bbci.co.uk/r2.511/BBCReithSans_W_Rg.woff')
        format('woff');
  }
  @font-face {
    font-display: optional;
    font-family: 'ReithSerif';
    font-style: normal;
    font-weight: 600;
    src: url('https://gel.files.bbci.co.uk/r2.511/BBCReithSerif_W_Md.woff2')
        format('woff2'), url('https://gel.files.bbci.co.uk/r2.511/BBCReithSerif_W_Md.woff')
        format('woff');
  }
</style>

Or if you're using styled-components, you can use styled-normalize (npm install styled-normalize) and createGlobalStyle to manage global styles as has been done in Simorgh.

See documentation on the Styled Components site

NOTE: if you run into issues with CSS not being applied to your components, it is likely that there is a duplicate styled-components dependency somewhere in your packages. You can try running npm dedupe in most cases, or lerna bootstrap --hoist in monorepo setups such as Psammead's. Failing that, make sure your application's styled-components dependency is the same version as that in Psammead.

List of all packages

Package Version Dependencies Peer Dependencies
@bbc/psammead-brand npm version Dependency Status peerDependencies Status
@bbc/psammead-caption npm version Dependency Status peerDependencies Status
@bbc/psammead-consent-banner npm version Dependency Status peerDependencies Status
@bbc/psammead-copyright npm version Dependency Status peerDependencies Status
@bbc/psammead-figure npm version Dependency Status peerDependencies Status
@bbc/psammead-grid npm version Dependency Status peerDependencies Status
@bbc/psammead-headings npm version Dependency Status peerDependencies Status
@bbc/psammead-image npm version Dependency Status peerDependencies Status
@bbc/psammead-image-placeholder npm version Dependency Status peerDependencies Status
@bbc/psammead-inline-link npm version Dependency Status peerDependencies Status
@bbc/psammead-media-indicator npm version Dependency Status peerDependencies Status
@bbc/psammead-media-player npm version Dependency Status peerDependencies Status
@bbc/psammead-navigation npm version Dependency Status peerDependencies Status
@bbc/psammead-paragraph npm version Dependency Status peerDependencies Status
@bbc/psammead-section-label npm version Dependency Status peerDependencies Status
@bbc/psammead-story-promo npm version Dependency Status peerDependencies Status
@bbc/psammead-story-promo-list npm version Dependency Status peerDependencies Status
@bbc/psammead-timestamp npm version Dependency Status peerDependencies Status
@bbc/psammead-visually-hidden-text npm version Dependency Status peerDependencies Status
Package Version Dependencies Peer Dependencies
@bbc/psammead-timestamp-container npm version Dependency Status peerDependencies Status

In order to be added to Psammead, utility packages should:

  • be common requirements of many of the repo's components, or many of the repo's users.
  • contain realistic usage examples.
Package Version Dependencies Peer Dependencies
@bbc/gel-foundations npm version Dependency Status peerDependencies Status
@bbc/moment-timezone-include npm version Dependency Status peerDependencies Status
@bbc/psammead-assets npm version Dependency Status peerDependencies Status
@bbc/psammead-locales npm version Dependency Status peerDependencies Status
@bbc/psammead-storybook-helpers npm version Dependency Status peerDependencies Status
@bbc/psammead-styles npm version Dependency Status peerDependencies Status
@bbc/psammead-test-helpers npm version Dependency Status peerDependencies Status