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 legacy Spanish homepage #8717

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Remove legacy Spanish homepage #8717

merged 2 commits into from
Jan 14, 2025

Conversation

niqjohnson
Copy link
Member

Now that the updated Spanish homepage is launched, we can clean up the feature flag we were using for development and get rid of the legacy homepage code.


Removals

  • SPANISH_HOMEPAGE feature flag
  • Legacy homepage template and content

How to test this PR

  1. Make sure / and /es/ both render as they do in production

Notes and todos

  • I poked around for any other legacy homepage bits, including tests, and didn't find any.
  • There's probably a more compact way to specify the template in get_template, but I kind of like being explicit that only English and Spanish have a homepage, so I left them on separate lines—happy to revise if there's a better way, though.

Checklist

  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • Consider prefixing, e.g., "Mega Menu: fix layout bug", or "Docs: Update Docker installation instructions".
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines
  • Project documentation has been updated

@niqjohnson niqjohnson requested review from higs4281 and wpears January 13, 2025 21:53
Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

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

🆒

Copy link
Member

@chosak chosak left a comment

Choose a reason for hiding this comment

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

Awesome -- one non-blocking suggestion.

return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page.html",
}[self.language]
Copy link
Member

@chosak chosak Jan 13, 2025

Choose a reason for hiding this comment

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

For simplicity, we could remove this entire method in favor of a

template = "v1/home_page/home_page.html"

If someone were to create a HomePage with another language, they'd still get a (slightly less helpful) error message when this import statement failed.

If we did that we could remove these unit tests entirely as well.

@niqjohnson
Copy link
Member Author

@chosak, good call, I simplified template selection and ditched the unit tests in 92ae773. I initially liked being explicit about which languages we had a homepage in, but thinking about it more, if the end goal is to move the content into Wagtail, it makes more sense to simplify things as much as possible now. I've re-requested reviews.

@niqjohnson niqjohnson requested review from wpears and chosak January 14, 2025 16:14
Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

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

Thanks to @chosak for the simplification

@niqjohnson niqjohnson added this pull request to the merge queue Jan 14, 2025
Merged via the queue into main with commit c5ee163 Jan 14, 2025
12 checks passed
@niqjohnson niqjohnson deleted the es/homepage-cleanup branch January 14, 2025 16:39
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.

3 participants