Skip to content

Remove Legacy Layout #475

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

Closed
wants to merge 7 commits into from
Closed

Remove Legacy Layout #475

wants to merge 7 commits into from

Conversation

kyleve
Copy link
Collaborator

@kyleve kyleve commented Dec 13, 2023

I took a swing at deleting the Legacy layout system, since it's no longer used, but is required to be implemented for new Layout types. To do this, I:

  • Merged the existing legacy and caffeinated layout protocols into the base Layout protocol.
  • Merged the existing legacy and caffeinated content storage protocols into the base ContentStorage protocol.
  • Deleted all implementations of the legacy layout system.
  • Removed the legacy LayoutMode.
  • Removed tests which existed only for the legacy layout system.
  • Removed the caches for the legacy system.
  • Updated documentation to point at renamed methods and types (mainly at Layout directly).
  • To that effect, I've tried to remove the term "caffeinated" from public facing docs, leaving it only as an implementation detail.

Open Questions

I've left comments on things I'm not 100% sure what to do with, but the biggest open question is do we leave the LayoutMode enum around at all. I've opted to leave it in, because we can continue to leverage this to test and roll out any future improvements to Blueprint's layout engine, for example cross-layout caching, or further optimizations to the caffeinated layout contract.

Next Steps

After this lands, I'll take care of deleting the now dead code from Market, and POS.

view.ensureLayoutPass()
XCTAssertEqual(contextualMode, overrideMode)
}
// TODO: Decide what to do here. Can't test overrides w/ only one layout mode...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Need to figure this out before merge

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests depend on turning this on/off to count measurements, so I decided to leave it in. Figure we can always remove it in a later iteration.

@kyleve kyleve changed the title [WIP DNR] Remove Legacy Layout Remove Legacy Layout Dec 13, 2023
@kyleve kyleve marked this pull request as ready for review December 13, 2023 18:12
@kyleve kyleve requested a review from a team as a code owner December 13, 2023 18:12
@watt
Copy link
Collaborator

watt commented Dec 16, 2023

Let's talk about the strategy for this in January.

  • Discuss the strategy for removing legacy layout in January

@kyleve
Copy link
Collaborator Author

kyleve commented Dec 16, 2023

Do you mind enumerating concrete concerns to removing legacy layout? Eg:

  • What would you want to keep vs remove? Does that diverge from what is done here?
  • What are possible concerns and edge cases from removing legacy layout?

@kyleve kyleve closed this Feb 5, 2024
@kyleve
Copy link
Collaborator Author

kyleve commented Feb 5, 2024

I'm closing this out as it sounds like we want to do the removal different than done here.

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.

2 participants