Skip to content

Refactor Layout Rendering #624

Open
Open
@rmorshea

Description

@rmorshea

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

  • clean up layout.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-2-moderateShould be resolved on a reasonable timeline.type-revisionAbout a change in functionality or behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions