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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parallel flows #1447

Closed
wants to merge 8 commits into from
Closed

Support parallel flows #1447

wants to merge 8 commits into from

Conversation

liZe
Copy link
Member

@liZe liZe commented Sep 17, 2021

Will fix #36.

@liZe liZe added the feature New feature that should be supported label Sep 17, 2021
@liZe liZe added this to the 54.0 milestone Sep 17, 2021
@liZe
Copy link
Member Author

liZe commented Nov 28, 2021

The current master branch includes parallel flows support for table cells and floats. But it doesn’t include code from this branch 😱. Why? It’s time to close this draft pull request and explain why it failed.

We changed the way resume_at/skip_stack is stored in 3aca9f1. We tried to use this structure in this PR to store the different parallel flows, but that wasn’t a good idea: we assume everywhere that when the main flow is not split, resume_at is None. That’s not the case anymore when we split floats for example. And that’s a nightmare to handle correctly.

Hopefully, using the new structure is not useless: it’s perfect when the main flow has parallel flows, in tables for example. It will be useful for flex and grid too. But the new structure is useless for out-of-flow elements (floats, absolutes…). We finally decided to store the broken out-of-flow elements in the context.

We also tried in another branch to store the layout progress (skip stacks, positions…) in a common structure, to avoid long lists of parameters. That’s a good idea, isn’t it? No, it’s not. The code we got was actually longer and broken: using global mutable structures is dangerous and always introduces side effects.

So… It’s time to say goodbye to these branches, and to this code. We’ve spent countless hours to write it, it’s sad for sure, but it’s important to know when to let things go… We’ve learned a lot of things, we’ve found better solutions, there’s no need to cry. It was important to write this comment so that we don’t forget the errors we’ve done.

It was also important to write this comment to remember that one smart line of code in master sometimes requires to write dozens of invisible lines before. To all these lines that will be discarded: you can rest in peace, you’ll be proudly remembered.

💜🍲🪦

@liZe liZe closed this Nov 28, 2021
@liZe liZe deleted the parallel-flows branch November 28, 2021 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow page breaks in floats, absolute blocks, table-cells
1 participant