Closed RoyEJohnson closed 1 week ago
This is currently installed on Dev.
I had missed the way Fallback is done, so thought everything was a DefaultLayout somehow. Updated code (on Dev) seems to work pretty well. Still flickers between home page and other pages, but otherwise the wrapper generally persists. The b2s page is not wrapped.
I made it so that ImportedPage always applies the Layout. The content components set parameters for the Layout component, but don't apply layouts themselves. This has made the menus stable except when coming to and from the home page. I don't know what causes it to redraw menus. I'll keep looking, but it may need to be a problem for another day. It's certainly better than what's on staging now.
The layout parameters default to the default layout, so only the flex page actually has to set it.
@TomWoodward I have pulled the Layout up another level to wrap around the Routes. I also extracted it to a Context. The higher level and some careful handling of data changes keep the menus from re-rendering. It is ready to review.
DISCO-433 Separated Header and Footer from the changing content in DefaultLayout so that the whole thing isn't destroyed and re-created on every navigation. Currently, every ImportedPage is a DefaultLayout, so it's pretty easy. Depending on what future layouts are like, we may want to make the Header/Footer conceptually distinct from the layout.