Skip to content
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

Vuu 47 link layout provider and layout manager provider #58

Merged

Conversation

vferraro-scottlogic
Copy link

@vferraro-scottlogic vferraro-scottlogic commented Sep 27, 2023

Changes

  • add functions to load and retrieve temporary layout in LayoutPersistenceManager and useLayoutManager
  • delete layout-config code (now replaced by useLayoutManager and LayoutPersistenceManager)
  • remove defaultLayout from NewTheme.examples.tsx (will be returned by the LayoutPersistenceManager.getTempLayout() if no temporary layout is found)
  • remove warningLayout from shell (will be returned by the LayoutPersistenceManager.getLayout(id) if no layout matching id is found)
  • use loadLayoutById in LayoutList to open saved layout

Bonus Feature: Saved Layouts can now be opened:
layouts

Copy link

@heswell heswell left a comment

Choose a reason for hiding this comment

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

Overall the code here looks great. I like the whole Provider/LayoutManager structure. I'm not going to micro-review individual lines. There is one important issue that would stop me merging yet.

What we save when we save a layout is not the current layout - we're saving the full JSON representation of all the loaded layouts. Thus when I load a layout from the layout browser, rather than adding that layout as a child of main-tabs, we replace the whole app layout.

Probably need a function to extract the currently selected layout (ie the Tab of main-tabs from which the menu action was activated) and one to add a layout to the existing structure (we have code for both these things in the layout reducer in layout package.

I should be able to wrap the sample-app and sample basket trading app with a LayoutManagerProvider and they should 'just work' . One does and one doesn't. Again, I think its because of exactly what we're saving

@vferraro-scottlogic vferraro-scottlogic merged commit 3d9b958 into main Oct 10, 2023
@cfisher-scottlogic cfisher-scottlogic linked an issue Oct 11, 2023 that may be closed by this pull request
@cfisher-scottlogic cfisher-scottlogic deleted the VUU-47-link-layoutProvider-and-layoutManagerProvider branch November 1, 2023 11:11
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.

Refactor Layout Hooks
4 participants