Port the repository form to a modern model and view.
Review Request #15393 — Created Oct. 13, 2026 and updated — Latest diff uploaded
This change modernizes some of the very oldest stuff left in our
codebase: repositoryform.es6.js. This has been replaced with a new model
and view, which will make it easier for scmtool/hosting service
subclasses to inject their own behavior and interaction.The behavior here is the same, except for three bugs which I discovered:
- The "repository plan" dropdown is now always repopulated, even when
its row is hidden. Before this, with fake services or single-plan
hosting types, the <select> was emptied, causing the form JS to look
for a nonexistent#repo-form-hosting-<svc>-defaultelement, and
submitting the plan asnull. - Fixed disabled-state computation for the submit button when switching
to an SCMTool that is missing installed dependencies. This button had
two different handlers managing its state (hosting-type != fake and
tool == installed), which could conflict. - Reset "Edit credentials" back when the credentials sub-form was open
and then the hosting service or account was changed.
- Ran js-tests.
- Edited some repositories and verified that behavior was unchanged
(except for the fixed bugs).