Skip to content

New dashboard: remove legacy HTML templates #12100

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

Open
wants to merge 5 commits into
base: humitos/remove-exttheme-var
Choose a base branch
from

Conversation

humitos
Copy link
Member

@humitos humitos commented Apr 10, 2025

This PR install django_coverage_plugin to try finding templates that are sill used/required.

Besides, it deletes all the old templates while keeping the tests passing. There are at least 2 templates, readthedocs/organizations/templates/organizations/base_team.html and readthedocs/templates/projects/email/build_failed.html that need to be moved to ext-theme. These can't be removed yet since they are still used.

Related #12086
Closes #12105

Try this plyugin to find out templates that are not used from this repository
and can be removed from here.

Related #12086
@humitos humitos requested review from a team as code owners April 10, 2025 11:49
@humitos humitos requested review from agjohnson and stsewd April 10, 2025 11:49
@humitos humitos changed the base branch from main to humitos/remove-exttheme-var April 10, 2025 11:50
@humitos humitos changed the title New dashboard: remove legacy dashboard New dashboard: try django-coverage-plugin Apr 10, 2025
@stsewd
Copy link
Member

stsewd commented Apr 10, 2025

Looks like there are some files that we should ignore https://app.codecov.io/gh/readthedocs/readthedocs.org/pull/12100/tree

@humitos humitos marked this pull request as draft April 10, 2025 15:46
@humitos
Copy link
Member Author

humitos commented Apr 10, 2025

from this list https://app.codecov.io/gh/readthedocs/readthedocs.org/pull/12100/tree?search=.html&displayType=list it seems we are using only the first 15 .html files.

@humitos
Copy link
Member Author

humitos commented Apr 14, 2025

I pushed another commit that removes all the HTML templates that are not required to run the tests. I also explore a few pages in .org and .com after removing these templates and everything worked fine.

I'm splitting the removal of these templates into a separate PR so we can merge #12091 first and after making that work, we can merge this one.

@humitos humitos changed the title New dashboard: try django-coverage-plugin New dashboard: remove legacy HTML templates Apr 15, 2025
@humitos humitos marked this pull request as ready for review April 15, 2025 09:38
@agjohnson
Copy link
Contributor

I'm still not sure the testing method used to determine template usage is very accurate here. readthedocs/organizations/templates/organizations/base_team.html is not used and should not need to be moved to ext-theme. Where are you seeing this template used?

I'm pretty sure there are other templates that are coming through, so I'm a little worried we're missing these with this test method.

I have not moved the email templates as these are not part of the dashboard. They'd be better off in application template paths probably.

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