Skip to content

Commit 551dd71

Browse files
authored
Move and rename Article types (#13703)
The purpose of this change is to refactor and simplify the codebase, making it clearer which types and files relate to the data that comes from frontend. The new `frontend` directory has been used to contain frontend types and their corresponding schemas. Currently these are distributed across the codebase and it can be difficult to follow their usage. The files in this change to be moved into this directory are `feArticle.ts`, a new file to hold the `FEArticle` type, and `feArticle.json`, the existing article JSON schema file. The other frontend types and schemas will follow in later changes, as moving them all together would constitute a very large diff. This change also renames `FEArticleType` to `FEArticle`. The `Type` suffix has been removed because it's not necessary to suffix a type with the word `Type`, and this convention was applied inconsistently, so removing it reduces noise in the codebase.
1 parent f406e2e commit 551dd71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+296
-301
lines changed

dotcom-rendering/fixtures/generated/fe-articles/Analysis.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Analysis: FEArticleType = {
16+
export const Analysis: FEArticle = {
1717
version: 3,
1818
headline: 'Irish general election: who won and what happens now?',
1919
standfirst:

dotcom-rendering/fixtures/generated/fe-articles/Audio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Audio: FEArticleType = {
16+
export const Audio: FEArticle = {
1717
version: 3,
1818
headline:
1919
'NSA collecting phone records of millions of Verizon customers daily',

dotcom-rendering/fixtures/generated/fe-articles/Comment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Comment: FEArticleType = {
16+
export const Comment: FEArticle = {
1717
version: 3,
1818
headline: 'Austerity is grinding on – it has cut too deep to ‘level up’',
1919
standfirst:

dotcom-rendering/fixtures/generated/fe-articles/Dead.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Dead: FEArticleType = {
16+
export const Dead: FEArticle = {
1717
version: 3,
1818
headline:
1919
'Nasa scientists release new images of Perseverance rover on Mars at news briefing – as it happened',

dotcom-rendering/fixtures/generated/fe-articles/Editorial.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Editorial: FEArticleType = {
16+
export const Editorial: FEArticle = {
1717
version: 3,
1818
headline:
1919
'The Guardian view on quarantine: an old method and a vital one ',

dotcom-rendering/fixtures/generated/fe-articles/Explainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Explainer: FEArticleType = {
16+
export const Explainer: FEArticle = {
1717
version: 3,
1818
headline:
1919
'What is an Indigenous treaty and how would it work in Australia?',

dotcom-rendering/fixtures/generated/fe-articles/Feature.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Feature: FEArticleType = {
16+
export const Feature: FEArticle = {
1717
version: 3,
1818
headline: "'I've been a scoundrel all my life': quotes of the Oscars 2020",
1919
standfirst:

dotcom-rendering/fixtures/generated/fe-articles/Gallery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Gallery: FEArticleType = {
16+
export const Gallery: FEArticle = {
1717
version: 3,
1818
headline:
1919
'NSA collecting phone records of millions of Verizon customers daily',

dotcom-rendering/fixtures/generated/fe-articles/Interview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Interview: FEArticleType = {
16+
export const Interview: FEArticle = {
1717
version: 3,
1818
headline:
1919
"‘We all deserve representation': hijab-wearing model Halima Aden on the power of fashion",

dotcom-rendering/fixtures/generated/fe-articles/Labs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* gen-fixtures.js directly.
1212
*/
1313

14-
import type { FEArticleType } from '../../../src/types/frontend';
14+
import type { FEArticle } from '../../../src/frontend/feArticle';
1515

16-
export const Labs: FEArticleType = {
16+
export const Labs: FEArticle = {
1717
version: 3,
1818
headline: 'Are you descended from royalty? Six things to consider',
1919
standfirst: '',

0 commit comments

Comments
 (0)