Skip to content

Refactor Layout Rendering #624

Closed

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

Activity

  1. added
    priority-2-moderateShould be resolved on a reasonable timeline.
    type-revisionAbout a change in functionality or behavior
    on Jan 27, 2022
  2. added this to the milestone on Jan 27, 2022
  3. removed this from the milestone on Feb 21, 2023
  4. added a commit that references this issue on Dec 10, 2025
    cd55de6
  5. added a commit that references this issue on Dec 10, 2025
    51198af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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