Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WORLDSERVICE-37 - Delete FrontPage and all associated code [DNM] #12444

Open
wants to merge 68 commits into
base: latest
Choose a base branch
from

Conversation

LilyL0u
Copy link
Contributor

@LilyL0u LilyL0u commented Feb 25, 2025

Resolves JIRA https://jira.dev.bbc.co.uk/browse/WORLDSERVICE-37 and https://jira.dev.bbc.co.uk/browse/WORLDSERVICE-356

Overall changes

  • Removes FrontPage components and associated components that are no longer in use
  • Removes Tests and FrontPage specific fixture data

Notes

  • We will need to update frontPageRadioSchedule toggle to homePageRadioSchedule

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

@@ -430,29 +383,18 @@ describe('ATIAnalytics params', () => {
}),
);
});

it('should not invoke buildPageATIUrl for an unmigrated page type with no atiData', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need another page type to be used and keep this test? What is unmigrated that is suitable here, and do we even need this test anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All page types have now been migrated. Ideally we would actually remove the support for ati + pageData (as it should now be coming from atiData), but that's a separate (and big!) piece of work - probably part of the Reverb migration work.

@@ -443,7 +425,7 @@ describe('legacyAssetPageDataPath', () => {
shouldNotMatchInvalidRoutes(invalidDataRoutes, legacyAssetPageDataPath);
});

describe('frontPage -> homePage migration', () => {
describe('homepage regex on environments', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ukchina is included as a valid route for home page regex. We won't be merging this until the ukchina work is done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've paused the merging for now so this won't be merged in this sprint.


sendDataFile(res, dataFilePath, next);
})
.get(homePageDataPath, async ({ params }, res, next) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not use the home page data route any more right? In constructDataFilePath it uses the path /index.json, which we don't use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.bbc.com/mundo/index.json this is not our 404 page

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusingly, we serve the file named index.json within data/mundo/homePage as the local homepage data route http://localhost:7080/mundo.json 🤯

@@ -1106,11 +1106,6 @@ describe('Server', () => {
});

describe('for home pages', () => {
it('should respond with JSON', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't use json routes with home pages now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do on local though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the JSON routes are still used for the local fixture routes on dev

@LilyL0u LilyL0u force-pushed the WORLDSERVICE-37-delete-frontpage-and-all-associated-code branch from 826a465 to 8579af6 Compare February 26, 2025 15:47

sendDataFile(res, dataFilePath, next);
})
.get(homePageDataPath, async ({ params }, res, next) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusingly, we serve the file named index.json within data/mundo/homePage as the local homepage data route http://localhost:7080/mundo.json 🤯

Comment on lines 123 to 125
// '/persian.json',
// '/serbian/cyr.json',
// '/ukchina/trad.json', // work out if we need these data routes still. They work locally but not live
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm it's a good question. I believe that they are now valid homepage routes, since we have removed the frontPage routing. Let's move these into another test for valid routes.

@pvaliani pvaliani marked this pull request as ready for review March 4, 2025 10:33
@pvaliani pvaliani self-requested a review March 4, 2025 10:34
@pvaliani
Copy link
Contributor

pvaliani commented Mar 4, 2025

Should some of the content for the frontPage Radio Schedule toggles not also be removed?

toggleName="frontPageRadioSchedule"

@pvaliani
Copy link
Contributor

pvaliani commented Mar 4, 2025

This whole script and the releaseInfo folder it's within can maybe get deleted?

https://github.com/bbc/simorgh/blob/c664720334ae1b6177b5cb77d1435512dc96705b/scripts/releaseInfo/launchDates.js

Contains frontPage info but I don't think the script is in use other than here:

- 'scripts/simorghLaunchDates.js'

@karinathomasbbc any thoughts?

Copy link
Contributor

@pvaliani pvaliani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments aside, looks pretty good!

@amoore108
Copy link
Contributor

Should some of the content for the frontPage Radio Schedule toggles not also be removed?

toggleName="frontPageRadioSchedule"

This is a naming thing unfortunately. Think this is still technically used on homepages, just has word frontPage in it! We should probably migrate that toggle to a new name.

@karinathomasbbc
Copy link
Contributor

This whole script and the releaseInfo folder it's within can maybe get deleted?

https://github.com/bbc/simorgh/blob/c664720334ae1b6177b5cb77d1435512dc96705b/scripts/releaseInfo/launchDates.js

Contains frontPage info but I don't think the script is in use other than here:

- 'scripts/simorghLaunchDates.js'

@karinathomasbbc any thoughts?

Yes please. I created this script 5 years ago to generate the simorgh-release-info file & also to keep track of when we released things (as we were migrating off PAL). So this file / folder and all references can get in the 🗑️ 🔥 💣 💥

@karinathomasbbc
Copy link
Contributor

Should some of the content for the frontPage Radio Schedule toggles not also be removed?

toggleName="frontPageRadioSchedule"

This is a naming thing unfortunately. Think this is still technically used on homepages, just has word frontPage in it! We should probably migrate that toggle to a new name.

Could you rename all references in this PR, and with some careful timing, just update the toggle name in iSite when it's deployed? If I recall correctly, none of the services actually have the radio schedule on the front page at the moment, so I don't think they would be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants