repository.create is an old pile of junk, and should be replaced with a modern EditEngine-driven diffusion.repository.edit endpoint.
Currently, Diffusion uses a multi-page create flow for repositories. EditEngine doesn't support this. We either have to get rid of the flow in Diffusion or support the flow in EditEngine.
I lean strongly toward throwing this flow away: it doesn't feel very good, and I think we can do better by reducing the amount of information required to create a repository, blending the ideas of "hosted" vs "imported", and moving toward a more flexible model of repository URIs (see T10366).
We don't want to end up with a single gigantic edit form so EditEngine will still need some concept of pages, but this can be a very lightweight concept which doesn't require the browser to retain state during the flow.
Directly adjacent work:
- T10366 - The current URI and "hosted/imported" model probably does not translate cleanly to EditEngine, and T10366 describes the future model that we want to move toward.
- T6848 - The current edit UI is users-with-edit-permission-only, but should turn into more of a "manage/details" interface where only the actual editing interactions require edit permission.
- T9554 - Should be resolved here since this is now an explicitly supported method for performing imports.
Vaguely related:
- We should probably resolve "local path" uniqueness (T4039) here, either by fixing it or giving up.
- This should obsolete and remove bin/repository edit.
- Mirroring never really got formalized, although this runs into the URI stuff (T6131).
- "Create similar repository" (T6722) is maybe obsoleted by just providing a reasonable API endpoint? We could also conceivably let ?template=... and HTTP pre-filling also fill values for control pages which aren't visible. Sort of messy but I don't immediately hate this and maybe it's actually fine? We should resolve this or give up, in any case.
- This resolves T9604, which can probably just merge here.
- This or T10366 resolves T9679.
- T10241 is probably a strict bug that should resolve here or in T10366.
- T8611 is probably a strict bug that should resolve here.
Very vaguely related:
The pathway forward is likely:
- Construct a parallel editpro flow which is based on EditEngine, and expose the Conduit endpoint based on the new engine. They'll start powerless and grow in strength over time.
- Clear whatever blocks we need to in order to get creation working as a single page flow. Principally, the hosted/imported distinction needs to go away, and methods like $repository->isHosted() need to be defined indirectly in terms of associated URIs. Unclear how much of T10366 needs to happen to make this plausible. This part is the most nebulous.
- Port the rest of the fields, creating a single gigantic mega-form in the editpro workflow. This part is time consuming but straightforward.
- Implement "pages", which is probably relatively easy since EditEngine has seemed like the right amount of abstraction so far and should accommodate this gracefully.
- Replace the old UIs.