Repository navigation
Delete the legacy theme layer and dead code (#2660) - #2715
Merged
Merged
Conversation
The contract step of the stage-2 design spec (#2632): every component has moved into scss/components/, so theming/scss/legacy/ goes with its last partial, _controls.scss. Its one class still in a template, controls-container__tags on the table list's tag select, set flex: 1 on an element whose parent is not a flex container, so it is removed there too. The compiled theme loses only .controls-container rules. Dead code deleted rather than restyled, each re-checked by grep across templates, Python, JS and the apps' static/ dirs: - templates no view or include renders: login activate, detach, generic_form, oepuser_create_form, delete_account (with the unused AccountDeleteView_TODO_UNUSED that named it; the account-delete route keeps answering 404); modelview overview, form_element_factory and the three widget templates; dataedit admin, url_list_field, tag_form - modelview/static/css/custom_alert.css, loaded by nothing - mv-style.css's Bootstrap 3 .panel-heading rules and the rule-less fill-div class on the factsheet list (both left for this ticket by #2655) - the unused user-select-none mixin - REUSE.toml entries for every deleted file, plus the one _headers.scss left behind when #2640 deleted it Kept, because they are in use: .reviewer-item (both peer review pages render it through updateFieldDescription), the .login__* rules (every class in _login.scss has a user since #2642). .btn--xs, .pagination-nav, the empty-state mixin, account/_login.html and tagged_field.html were already gone. Homepage comparison: 8 of 8 shots byte-identical. check_catalogue: 20 entries. Literal scan: 0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
/code-review: the old comment pointed at a place that no longer exists. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The last ticket of the stage-2 design spec (#2632), and its contract step. Every
theme partial has now moved into
scss/components/, so the legacy layer goes.Dead code is deleted, not restyled.
Closes #2660
What changed
The legacy layer is gone.
theming/scss/legacy/held one last partial,_controls.scss(.controls-container). It is deleted, along with its line inoepstrap.scss, its REUSE entry and the text intheming/README.mdanddocs/dev/frontend/design-system.mdthat described the layer. Only one of itsclasses was still in a template:
controls-container__tagson the table list'stag select (
dataedit/filter.html). It setflex: 1inside#tags, which isnot a flex container, so it did nothing and is removed. The rebuilt
bootstrap.min.cssloses only.controls-container*rules (892 bytes), checkedrule by rule.
Dead code deleted. I grepped each item across templates, Python, JS, SCSS
and every app's
static/dir before deleting it. That coveredrender,template_name,{% include %}and Django's implicit class-based-view templatenames.
login/:activate,detach,generic_form,oepuser_create_formlogin/delete_account.html+AccountDeleteView_TODO_UNUSED(and its two now-unused imports)login:account-deletestill answers 404, as intended;test_profile_owner_rulepins thatmodelview/:overview,form_element_factory,widgets/dynamic_array,widgets/dynamic_edit,widgets/multiwidgetdataedit/:admin,url_list_field,tag_formTagthat would loadtag_formimplicitlymodelview/static/css/custom_alert.css.panel-headingrules inmv-style.css(Bootstrap 3 glyphicons) and the rule-lessfill-divclass inmodellist.htmlpanel-headinganywhere. #2655 left both for this ticketuser-select-nonemixin@includelegacy/_headers.scssThe comment in
base/tests/test_page_lint.pythat listed the unrendered pages"for #2660" is gone with them.
Found still in use, and kept:
.reviewer-item(layouts/_review.scss). The issue lists it as dead, butit is not.
updateFieldDescriptioninpeer_review/ui/field_description.jsbuilds it, and both peer review pages call that function
(
opr_reviewer.js:269,opr_contributor.js:210). This is the one item on theissue's list that is deliberately not deleted.
.login__*. Every rule left inlayouts/_login.scss(wrap, logo, heading,field, hint, separation, alternative, verification) has a user since Fields and account forms: one field look, allauth element overrides #2642.
Already gone before this branch:
.btn--xs(#2641 inlined it),.pagination-nav(#2647), the empty-state mixin (#2646),
account/_login.html(#2642), andtagged_field.html.How it was tested
test_oep_django_2660,test_oedb_2660): 2,284 tests, 106 skipped, 1 failure. The failure isoekg…LightImportTest, which fails under the isolated-settings setup becauseit overwrites
PYTHONPATHfor its subprocess. Run alone it passes. The pagelint is part of the suite.
check_catalogue: 20 entries, rendered in both token modes.?tokens=bootstrap.npm run build:themeon the base commit reproduces develop'sfiles byte for byte. On the branch,
stock_tokens.cssis unchanged andbootstrap.min.cssdiffers only by the removed rules.benchmarks/homepage/compare.mjs, 1440 and 390 px,signed out and in, whole page, plus the open menu and the burger). Before and
after: 8 of 8 shots byte-identical, no difference. The server ran with
COMPRESS_ENABLED = Falseand an emptySTATIC_ROOT, and serves the rebuilttheme.
reuse lintpasses.mkdocs buildpasses (its one warning predates thisbranch).
Deploy notes
None.
For reviewers
8b37d7fca. The diff is almostentirely deletions.
.reviewer-item. The spec calls itdead; the code shows it is live.
dataedit/static/dataedit/metadata.js. No template or module loadsit, so the whole file is dead. It is not on the issue's list, and a whole
file deserves its own decision, so it is named here rather than deleted.
$dropdown-border-radius: 0(overridden bycomponents/_dropdown.scss),$nav-tabs-*(nav-tabsis retired and a source scan forbids it) and the.nav-pillsremap in_remap.scss. These are not dead files. Changingthem changes compiled values outside what the homepage comparison covers,
and
.nav-pillsmay still be live through the vendored jsoneditor on themetadata editor. Not on the issue's list either.
account-deleteroute itself. It now only answers 404. Removing itor building the feature is a separate decision.
Checklist
Author
CONTRIBUTING.md
versions/changelogs/current.mdunder the right heading, ending with the PR number
(#…)documentation, or none
is needed
change only deletes code)
catalogue, or adds one with
an entry (no visible change)
the
AI covenant
asks (written with Claude Code; every deletion re-checked by grep)
Reviewer
reviewer guidelines
🤖 Generated with Claude Code