Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topographical sorting of compositions . #542

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

KevinJump
Copy link
Owner

Sorts the list of items to be imported based on the graph created from the compositions.
But it might not really be worth doing. 馃槥

The theory is if we can import in the correct order we can set compositions as we go, and maybe reduce the second pass.
however :

structure (what pages are allowed under what) also requires the content types be in place before the content types can be set. and that can be cyclical. (e.g you have have page a set to allow child types of "page b" and "page b" have child types of "page a" - so you can't get rid of the need to second pass the content types.

that might be an edge case, so maybe we could attempt this - if it fails fall back to a second pass, but that would require some thinking about how we tell the second pass that the first pass didn't mange to set it.

second pass also fixes tabs for the times when people rename a tab / group across multiple content types and we have to do a temp tab alias thing on first pass and a rename on second. so second pass isn't going away (for ContentTypes) any time soon :(

Still this can stay here as a reminder of how a topographical sort works - and why its not yet in the core.

@KevinJump KevinJump changed the base branch from v12/main to v12/content-type-sorting October 8, 2023 09:33
@KevinJump KevinJump marked this pull request as ready for review October 8, 2023 09:33
@KevinJump KevinJump merged commit b9ea7d8 into v12/content-type-sorting Oct 8, 2023
1 check passed
@KevinJump KevinJump deleted the v12/dependency-graph-sorting branch October 8, 2023 09:34
KevinJump added a commit that referenced this pull request Oct 11, 2023
* Topographical sorting of compositions . (#542)

* move composition to first pass.

* Comment up the graph handler interface.

* Fix - don't report delete on clean for non-containers (as we don't actually delete them).
KevinJump added a commit that referenced this pull request Oct 11, 2023
* Topographical sorting of compositions . (#542)

* move composition to first pass.

* Comment up the graph handler interface.

* Fix - don't report delete on clean for non-containers (as we don't actually delete them).
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.

None yet

1 participant