Extract DA cookie banner into repo with example local page
Description
Create a component CookieBanner
that can be used to add a compliant cookie banner to a React application.
A compliant banner is used by the DA team: https://gitlab.developers.cam.ac.uk/uis/devops/digital-admissions/admissions-portal/ap-frontend/-/blob/01e6ce05c3f0f0075f1b0cf53cb227403575dd1d/webapp/src/components/CookieBanner.tsx
This component must form part of a package for frontend analytics.
Further details
We want to create a package that contains a CookieBanner
component. That package can then be used downstream by teams.
For this initial stage, the package must be installable, but does not have to be deployed to index. There is therefore no deployment piece yet. However, the package should still adhere to semver before publishing. The package should still be installable if one runs:
- build to tarball
- followed by a install from tarball (not an editable install)
Task list
-
Create repo (does not exist yet) using sensible boilerplate - Probably a case of looking at existing
npm
packages in Wilson and finding commonality to build ontop of
- Probably a case of looking at existing
-
Move this issue to repo -
Ensure that the repo contains an npm
package, plus a CHANGELOG. -
Add component and tests -
Acceptance test: there exists a README that informs me how I can use the CookieBanner
component. I must be able to start from a blank state, or a pre-existing React application.
Acceptance criteria
- Package
-
There exists an installable JS package that contains the CookieBanner
component. -
The package must have a ECM target. Optionally, it can contain a CommonJS target + TS mapping/types. -
The package must work in all currently supported versions of Node.
-
- The component
-
The component must be confirmed as visually and functionally identical to the component in AP Frontend. -
The component must be tested.
-