dwp / design-system

One place for service teams to find and share the styles, components and patterns for designing DWP services.
MIT License
15 stars 3 forks source link

Documentation: Component data schema #607

Closed htmlandbacon closed 1 month ago

htmlandbacon commented 4 months ago

What

Build up a documented data schema and apply to design elements, we should make sure this is robust enough to allowt the next version of the site

Why

Based on the technical POC we built out a version using data attributes that didn't follow full logic

Done when

Schema

The assumption is based on the meeting was we can use the following schema to generate the components section

{
  name: '// this is the name of the component'
  summary: '// light touch introduction - will be used on the home page and within the content page',
  publication_date: '// when we first published this',
  publication_updated_date: '// when we last updated it',
  services: [array list of services it is currently found in],
  github_discussion_id: '// id used to talk about it'
}

A couple of things need to decide how it fits in when applying it

  1. unique Identifier - similar to slug in e11ty - we might this, or could be from the filename
  2. type...i.e component - this should probably come from the folder
  3. Sub Navigation

Outcomes

Documented data schema, discussion on next steps to take, automated component section