Refactor Layout Rendering #624
Labels
priority-2-moderate
Should be resolved on a reasonable timeline.
type-revision
About a change in functionality or behavior
Current Situation
The logic inside
layout.py
is becoming increasingly convoluted. Special edge case logic is starting to be introduced in order to handle bugs that should, in reality be handled more generally. I doubt that a new contributor would be able to groc the logic and make a contribution to this area of the code-base without a great deal of effort.Proposed Actions
The complexity of the logic has stemmed from the increased usage of model states mutations throughout the rendering process in order to handle unforeseen cases. We should take an approach where every function which results in a new model state, instead of attaching it to the tree, returns that new model state.
Thankfully the large library of tests we've built up over time will aid in this process. I think we should be able to make these refactors with minimal impact to users as a result.
Work Items
layout.py
The text was updated successfully, but these errors were encountered: