-
Notifications
You must be signed in to change notification settings - Fork 14
Clientside Overview
Each page of the support site is a self-contained React application, and on the checkout pages we also use Redux to handle the internal state of the page. To learn more about our usage of Redux, see our Redux documentation. We also make use use of client-side routing with React Router on the contributions and digital subscriptions checkouts.
The site is written in TypeScript and styled using Emotion with base style tokens and core components originating from the Guardian's design system, Source.
Our client-side code sits in assets
folder and is organised in the following way:
- components - shared React components.
- helpers - shared helper modules.
- pages - the pages.
Each page is a folder inside the pages/
directory. These folders are typically structured as seen in the following example for regular contributions:
components/ π react components specific to this page
helpers/ π helper modules specific to this page
regularContributions.tsx π the entry point for the page
The .tsx
file is the entry point for the page's JavaScript.
Component folders may contain multiple related components, or a single component. More complex components that need to communicate with the Redux store will be split into a presentational component that handles the UI, and a container that handles store communication and logic- for more about this approach see Presentational and Container Components.
errorSummary.tsx π the presentational component
errorSummaryContainer.tsx π the container component
- Redux Glossary
- Why Redux Toolkit?
- Writing state slices with Redux Toolkit
- Handling action side effects in Redux
- Presentational and Container Components
- Scoped actions and reducers
- Server Side Rendering
- Form validation
- CI build process
- Post deployment testing
- Post deployment test runbook
- TIP Real User Testing
- Code testing and validation
- Visual testing
- Testing Apple Pay locally
- Test Users
- Deploying to CODE
- Automated IT tests
- Deploying Fastly VCL Snippets
- Archived Components
- Authentication
- Switchboard
- How to make a fake contribution
- The epic and banner
- Environments
- Tech stack
- Supported browsers
- Contributions Internationalisation
- Payment method internationalisation in Guardian Weekly
- Print fulfilment/delivery
- Updating the acquisitions model
- Runscope testing
- Scala Steward for dependency management
- Alarm Investigations
- Ticker data
- Ophan
- Quantum Metric
- [Google Tag Manager] (https://github.com/guardian/support-frontend/wiki/Google-Tag-Manager)