Skip to content

Commit a598825

Browse files
committed
merge from main and set to 35%
2 parents b3f66f3 + 99e5f4f commit a598825

32 files changed

+765
-608
lines changed

dotcom-rendering/.storybook/modes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export const allModes = {
2525
globalColourScheme: 'horizontal',
2626
viewport: breakpoints.tablet,
2727
},
28+
'horizontal leftCol': {
29+
globalColourScheme: 'horizontal',
30+
viewport: breakpoints.leftCol,
31+
},
2832
'vertical mobile': {
2933
globalColourScheme: 'vertical',
3034
viewport: breakpoints.mobile,

dotcom-rendering/cdk/bin/cdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ new RenderingCDKStack(cdkApp, 'ArticleRendering-PROD', {
2828
stage: 'PROD',
2929
domainName: 'article-rendering.guardianapis.com',
3030
scaling: {
31-
minimumInstances: 30,
32-
maximumInstances: 300,
31+
minimumInstances: 27,
32+
maximumInstances: 270,
3333
policies: {
3434
step: {
3535
cpu: cpuScalingSteps,

dotcom-rendering/docs/contributing/detailed-setup-guide.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,27 @@ For ease of development you may want to install:
6060

6161
- [React Developer Tools](https://github.com/facebook/react-devtools)
6262

63-
### Running alongside identity
63+
### Running alongside identity/sign in
6464

65-
You may want local identity cookies to be available in `dotcom-rendering`. To enable this:
65+
You may want to develop against signed in behaviour in `dotcom-rendering`.
66+
In order for this to work you have to run `dotcom-rendering` on a local domain with `https`.
6667

67-
1. run `./scripts/nginx/setup.sh`
68-
1. access `dotcom-rendering` through https://r.thegulocal.com
68+
To set this up this:
69+
70+
1. Run `./scripts/nginx/setup.sh`
71+
72+
- This will create a local domain `r.thegulocal.com` and set up a reverse proxy to `localhost:3030` with a valid SSL certificate.
73+
74+
2. `dotcom-rendering` can now be accessed through https://r.thegulocal.com when running the development server
75+
3. Sign in to https://profile.code.dev-theguardian.com/ on a separate tab/window
76+
77+
- Third party cookies must be enabled in your browser for this to work
78+
79+
4. Back on `dotcom-rendering` under https://r.thegulocal.com set a cookie with the name `GU_U` with any value on the `r.thegulocal.com` domain and refresh the page
80+
5. You should now be signed in!
81+
82+
- You should see the header change to show `My Account` instead of `Sign in`
83+
- In local storage you should see a key `gu.access_token` and `gu.id_token` with the values of the tokens you are signed in with
6984

7085
## Production
7186

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
import type { Nations } from '../../src/components/FootballCompetitionSelect';
2+
import type { FootballMatches } from '../../src/footballMatches';
3+
4+
export const nations: Nations = [
5+
{
6+
name: 'England',
7+
competitions: [
8+
{ tag: 'football/premierleague', name: 'Premier League' },
9+
{ tag: 'football/championship', name: 'Championship' },
10+
],
11+
},
12+
{
13+
name: 'Scotland',
14+
competitions: [
15+
{
16+
tag: 'football/scottish-premiership',
17+
name: 'Scottish Premiership',
18+
},
19+
],
20+
},
21+
];
22+
23+
export const initialDays: FootballMatches = [
24+
{
25+
date: new Date('2022-01-01T00:00:00Z'),
26+
competitions: [
27+
{
28+
competitionId: '635',
29+
tag: 'football/serieafootball',
30+
name: 'Serie A',
31+
nation: 'European',
32+
matches: [
33+
{
34+
kind: 'Live',
35+
dateTime: new Date('2022-01-01T11:11:00Z'),
36+
paId: '4482093',
37+
homeTeam: {
38+
name: 'Torino',
39+
score: 10,
40+
},
41+
awayTeam: {
42+
name: 'Cagliari',
43+
score: 0,
44+
},
45+
status: '1st',
46+
},
47+
{
48+
kind: 'Fixture',
49+
dateTime: new Date('2022-01-01T19:45:00Z'),
50+
paId: '4482890',
51+
homeTeam: 'Auxerre',
52+
awayTeam: 'St Etienne',
53+
},
54+
],
55+
},
56+
{
57+
competitionId: '650',
58+
tag: 'football/laligafootball',
59+
name: 'La Liga',
60+
nation: 'European',
61+
matches: [
62+
{
63+
kind: 'Result',
64+
dateTime: new Date('2022-01-01T20:00:00Z'),
65+
paId: '4482835',
66+
homeTeam: {
67+
name: 'Las Palmas',
68+
score: 2,
69+
},
70+
awayTeam: {
71+
name: 'Osasuna',
72+
score: 3,
73+
},
74+
comment: 'AET',
75+
},
76+
],
77+
},
78+
{
79+
competitionId: '651',
80+
tag: 'football/fa-cup',
81+
name: 'FA Cup',
82+
nation: 'European',
83+
matches: [
84+
{
85+
kind: 'Result',
86+
dateTime: new Date('2022-01-01T20:00:00Z'),
87+
paId: '4482836',
88+
homeTeam: {
89+
name: 'Brighton & Hove Albion Women',
90+
score: 1,
91+
},
92+
awayTeam: {
93+
name: 'Crystal Palace Women',
94+
score: 1,
95+
},
96+
comment:
97+
'Brighton & Hove Albion Women won 4 - 3 on penalties...',
98+
},
99+
],
100+
},
101+
],
102+
},
103+
];
104+
105+
export const moreDays: FootballMatches = [
106+
{
107+
date: new Date('2022-01-05T00:00:00Z'),
108+
competitions: [
109+
{
110+
competitionId: '635',
111+
tag: 'football/serieafootball',
112+
name: 'Serie A',
113+
nation: 'European',
114+
matches: [
115+
{
116+
kind: 'Fixture',
117+
dateTime: new Date('2022-01-05T19:45:00Z'),
118+
paId: '4482890',
119+
homeTeam: 'Juventus',
120+
awayTeam: 'Roma',
121+
},
122+
],
123+
},
124+
],
125+
},
126+
];

dotcom-rendering/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"@guardian/core-web-vitals": "7.0.0",
4646
"@guardian/eslint-config": "7.0.1",
4747
"@guardian/eslint-config-typescript": "9.0.1",
48-
"@guardian/identity-auth": "2.1.0",
49-
"@guardian/identity-auth-frontend": "4.0.0",
48+
"@guardian/identity-auth": "6.0.1",
49+
"@guardian/identity-auth-frontend": "8.1.0",
5050
"@guardian/libs": "20.0.0",
5151
"@guardian/ophan-tracker-js": "2.2.5",
5252
"@guardian/react-crossword": "2.0.2",

0 commit comments

Comments
 (0)