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

🔨 remove old Frontpage code #3247

Merged
merged 2 commits into from
Mar 4, 2024
Merged

🔨 remove old Frontpage code #3247

merged 2 commits into from
Mar 4, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Feb 26, 2024

Grepped each of the classes in homepage.scss and removed them if they were only used in Frontpage.tsx

Also removes the old frontPageConfig stuff.

Comment on lines 257 to 263
const gdocHomepageResult = await knex.raw<{ id: string }>(
`--sql
SELECT id
FROM posts_gdocs
WHERE content->>"$.type" = "${OwidGdocType.Homepage}"
AND published = TRUE`
)
Copy link
Member

Choose a reason for hiding this comment

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

We probably need to revert this change:

  • the "--" needs a space after it (otherwise I get a syntax error)
  • gdocHomepageResult is an array so gdocHomepageResult.id below doesn't return what we would expect

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow yeah this was completely broken. Rewrote it and put the query in db.ts

@mlbrgl
Copy link
Member

mlbrgl commented Feb 28, 2024

The removal looks ok and makes sense, but I'm not too sure about the new Homepage.scss. I'm assuming it would mostly disappear on rebase?

@ikesau ikesau force-pushed the remove-old-frontpage-code branch from d52422a to 30aa001 Compare March 1, 2024 22:08
@ikesau
Copy link
Member Author

ikesau commented Mar 1, 2024

@mlbrgl To be clear, I renamed css/homepage.scss to gdocs/pages/Homepage.scss.

Everything in it is now used. There's just some rules from the old page that are still used (the newsletter stuff) which follows a slightly different naming convention.

@mlbrgl mlbrgl merged commit 70f0ce6 into master Mar 4, 2024
14 of 15 checks passed
@mlbrgl mlbrgl deleted the remove-old-frontpage-code branch March 4, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants