Skip to content

Templates: remove old dashboard files #12086

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
humitos opened this issue Apr 7, 2025 · 6 comments · May be fixed by #12091
Open

Templates: remove old dashboard files #12086

humitos opened this issue Apr 7, 2025 · 6 comments · May be fixed by #12091
Assignees

Comments

@humitos
Copy link
Member

humitos commented Apr 7, 2025

We have deprecated the old dashboard. We are ready to remove all the code related to it now. There HTML, CSS and JS files. Besides, there are some Invoke tasks to build these assets that can be removed as well.

@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Apr 7, 2025
@humitos humitos linked a pull request Apr 8, 2025 that will close this issue
@humitos humitos self-assigned this Apr 9, 2025
@agjohnson
Copy link
Contributor

Note, ext-theme overlays on top of the readthedocs.org templates, so there are some templates that may still come through from the old templates. Same for maybe JS, especially anything that was authored inline in HTML etc. This is just something to be careful around, but this is part of the deprecation plan eventually either way.

@humitos
Copy link
Member Author

humitos commented Apr 9, 2025

Santos mentioned this tool we can use for this: https://github.com/nedbat/django_coverage_plugin

@humitos
Copy link
Member Author

humitos commented Apr 10, 2025

I did a diff of the template files we have in .org and the ones in ext-theme. This is the list of all the files that are in .org but not on ext-theme:

-./readthedocs/audit/templates/audit/list_logs.html
-./readthedocs/domains/templates/domains/notifications/pending_domain_configuration_email.html
-./readthedocs/gold/templates/gold/projects.html
-./readthedocs/gold/templates/gold/subscription_detail.html
-./readthedocs/invitations/templates/invitations/email/invitation.html
-./readthedocs/invitations/templates/invitations/includes/invitation_list.html
-./readthedocs/invitations/templates/invitations/invitation_detail.html
-./readthedocs/organizations/templates/organizations/admin/base.html
-./readthedocs/organizations/templates/organizations/admin/organization_delete.html
-./readthedocs/organizations/templates/organizations/admin/organization_edit.html
-./readthedocs/organizations/templates/organizations/admin/owners_edit.html
-./readthedocs/organizations/templates/organizations/base.html
-./readthedocs/organizations/templates/organizations/base_team.html
-./readthedocs/organizations/templates/organizations/email/team_add.html
-./readthedocs/organizations/templates/organizations/includes/member_list.html
-./readthedocs/organizations/templates/organizations/includes/team_list_item.html
-./readthedocs/organizations/templates/organizations/includes/team_member_list.html
-./readthedocs/organizations/templates/organizations/member_list.html
-./readthedocs/organizations/templates/organizations/onboard/base.html
-./readthedocs/organizations/templates/organizations/onboard/invite.html
-./readthedocs/organizations/templates/organizations/onboard/organization.html
-./readthedocs/organizations/templates/organizations/onboard/plan.html
-./readthedocs/organizations/templates/organizations/onboard/team.html
-./readthedocs/organizations/templates/organizations/organization_choose.html
-./readthedocs/organizations/templates/organizations/organization_create.html
-./readthedocs/organizations/templates/organizations/organization_detail.html
-./readthedocs/organizations/templates/organizations/organization_invite.html
-./readthedocs/organizations/templates/organizations/organization_list.html
-./readthedocs/organizations/templates/organizations/security_log.html
-./readthedocs/organizations/templates/organizations/team_create.html
-./readthedocs/organizations/templates/organizations/team_delete.html
-./readthedocs/organizations/templates/organizations/team_detail.html
-./readthedocs/organizations/templates/organizations/team_edit.html
-./readthedocs/organizations/templates/organizations/team_list.html
-./readthedocs/organizations/templates/organizations/team_member_create.html
-./readthedocs/organizations/templates/organizations/team_project_edit.html
-./readthedocs/organizations/templates/organizations/verify_email.html
-./readthedocs/redirects/templates/redirects/redirect_form.html
-./readthedocs/redirects/templates/redirects/redirect_list.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/organization_disabled_email.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/organization_disabled_site.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/subscription_ended_email.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/subscription_ended_site.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/subscription_required_email.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/subscription_required_site.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/trial_ending_email.html
-./readthedocs/subscriptions/templates/subscriptions/notifications/trial_ending_site.html
-./readthedocs/subscriptions/templates/subscriptions/subscription_detail.html
-./readthedocs/templates/account/email/account_already_exists_message.html
-./readthedocs/templates/account/email/email_confirmation_message.html
-./readthedocs/templates/account/email/email_confirmation_signup_message.html
-./readthedocs/templates/account/email/password_reset_key_message.html
-./readthedocs/templates/account/email/unknown_account_message.html
-./readthedocs/templates/builds/regexautomationrule_form.html
-./readthedocs/templates/builds/versionautomationrule_list.html
-./readthedocs/templates/core/build_list_detailed.html
-./readthedocs/templates/core/email/common.html
-./readthedocs/templates/core/header.html
-./readthedocs/templates/core/home-header.html
-./readthedocs/templates/core/notifications.html
-./readthedocs/templates/core/project_bar_base.html
-./readthedocs/templates/core/project_bar.html
-./readthedocs/templates/core/project_detail_right.html
-./readthedocs/templates/core/project_details.html
-./readthedocs/templates/core/project_downloads.html
-./readthedocs/templates/errors/base.html
-./readthedocs/templates/errors/proxito/404/include_error_message.html
-./readthedocs/templates/errors/proxito/404/include_search.html
-./readthedocs/templates/errors/proxito/404/include_tips.html
-./readthedocs/templates/errors/proxito/404/no_language.html
-./readthedocs/templates/errors/proxito/404/no_project_page.html
-./readthedocs/templates/errors/proxito/404/no_subproject.html
-./readthedocs/templates/errors/proxito/404/no_version.html
-./readthedocs/templates/pagination/pagination.html
-./readthedocs/templates/post_commit.html
-./readthedocs/templates/profiles/base_profile_edit.html
-./readthedocs/templates/profiles/base_profile.html
-./readthedocs/templates/projects/base_project.html
-./readthedocs/templates/projects/doc_file.rst.html
-./readthedocs/templates/projects/domain_confirm_delete.html
-./readthedocs/templates/projects/email/build_failed.html
-./readthedocs/templates/projects/includes/feature_disabled.html
-./readthedocs/templates/projects/legend.html
-./readthedocs/templates/projects/notifications/deprecated_build_image_used_email.html
-./readthedocs/templates/projects/notifications/deprecated_build_webhook_email.html
-./readthedocs/templates/projects/notifications/deprecated_build_webhook_site.html
-./readthedocs/templates/projects/notifications/deprecated_config_file_used_email.html
-./readthedocs/templates/projects/notifications/deprecated_github_webhook_email.html
-./readthedocs/templates/projects/notifications/deprecated_github_webhook_site.html
-./readthedocs/templates/projects/notifications/new_dashboard_email.html
-./readthedocs/templates/projects/notifications/resource_usage_email.html
-./readthedocs/templates/projects/notifications/resource_usage_site.html
-./readthedocs/templates/projects/project_advertising.html
-./readthedocs/templates/projects/project_dashboard_base.html
-./readthedocs/templates/projects/project_dashboard.html
-./readthedocs/templates/projects/project_downloads.html
-./readthedocs/templates/projects/project_edit_base.html
-./readthedocs/templates/projects/project_edit.html
-./readthedocs/templates/projects/project_import.html
-./readthedocs/templates/projects/project_notifications_form.html
-./readthedocs/templates/projects/project_notifications.html
-./readthedocs/templates/projects/projects_search_analytics.html
-./readthedocs/templates/projects/project_traffic_analytics.html
-./readthedocs/templates/projects/project_translations_form.html
-./readthedocs/templates/projects/project_translations.html
-./readthedocs/templates/projects/project_users_form.html
-./readthedocs/templates/projects/project_users.html
-./readthedocs/templates/projects/project_version_detail.html
-./readthedocs/templates/projects/project_version_list.html
-./readthedocs/templates/projects/samples/getting_started.rst.html
-./readthedocs/templates/projects/samples/installation.rst.html
-./readthedocs/templates/security.html
-./readthedocs/templates/style_catalog.html

However, it seems that they are not required and may be overwritten already in ext-theme but in different paths. Example: ./readthedocs/templates/builds/regexautomationrule_form.html is not used at all when hitting http://devthedocs.com/dashboard/read-the-docs-inc-test-builds/rules/regex/create/ but ./ext-theme/readthedocsext/theme/templates/builds/regexautomationrule_form.html is used instead.

Also, all the tests are passing in #12091 and I would expect the tests to fail if the template required doesn't exist.

@humitos
Copy link
Member Author

humitos commented Apr 10, 2025

Santos mentioned this tool we can use for this: nedbat/django_coverage_plugin

This won't be super useful since if the template is used but we don't have a test for it, the coverage will be 0% and it may seems it's not used, but it's just because we don't have a test for it. In any case, I opened a PR at #12100 to try this out.

humitos added a commit that referenced this issue Apr 10, 2025
Try this plyugin to find out templates that are not used from this repository
and can be removed from here.

Related #12086
@agjohnson
Copy link
Contributor

However, it seems that they are not required and may be overwritten already in ext-theme but in different paths.

Yes, diffing is not a good mechanism for comparison, many paths will not be the same. See:

@humitos
Copy link
Member Author

humitos commented Apr 14, 2025

OK. I'm splitting this work so we don't need to remove all the HTML now and we can do it once we are migrated into the new dashboard. I opened an issue for this #12105 and I opened a PR for that work as well.

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

Successfully merging a pull request may close this issue.

2 participants