You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background
We need to create a service which handles the persistence of layouts.
The implementation of persistence has two levels:
An interface which directs to a persistence management handler
The implementation of the persistence management handler (client / server)
Level 1 is an interface which can direct to multiple persistence handlers, i.e. local or remote. Creating the interface is the priority, as this can be extended with as many persistence handlers as required.
We can implement basic local storage persistence using this interface to showcase the layout management feature.
Server-side persistence is low priority for the Layout epic, as we can easily hook up server level persistence management into the interface at a later stage.
Work Required
Implement a RESTful interface to direct to a local/remote persistence handler
Can make use of use-layout-config.ts
Create/Update/Delete
Implement the local layout persistence handler
Can make use of local-config.ts
Acceptance Criteria
As a Vuu UI user, when I save a layout, then a file defining the layout is saved locally
As a Vuu UI user, when I save a layout, then a screenshot of the layout is saved locally
Dev Notes
The current hooks in the layout-config directory and any associated layout-management code is a good starting point but it's quite primitive. It assumes you are saving one thing and doesn't have configuration for options such as layout names, groups, etc.
Questions
Where should the file be saved? In-browser?
Answer: Browser local storage
(How often) do we clear the saved files?
UI option?
Answer: Can be dev-managed for local storage as it's not a permanent solution
How do we couple a screenshot with the layout file?
How do we handle layout metadata (layout name, group, username, save date, ID)
The text was updated successfully, but these errors were encountered:
After a chat with Steve we've changed the direction of this ticket from a 'server implementation' focus to a 'persistence implementation' focus.
Old ticket details
Option 1
Create an endpoint on Vuu server (main backend) to handle layout persistence
👍 A lot of the infrastructure is already in place (with timestamp snapshots of layout)
👎 Vuu server not necessarily the best place to actually host the endpoint for saving layouts because it's meant to just be for data communication
❓ Is there already a database we can use?
Option 2
Create a separate service to handle layout persistence
👍 Separation of concerns
👎 More upfront cost (in terms of dev effort)
2a: Node.js 2b: Scala
❓ Is this a single use server? Will it be extended for other uses?
❓ What benefit does this provide compared to using the existing functionality?
Dev Notes
The layout is a JSON structure which needs to be persisted serverside
layoutFromJson() deserializes JSON to React elements
layoutToJson() serializes React elements to JSON
layoutActionDispatcher() currently handles saving
Need more granularity on saving, e.g. 'save page', 'save tab', 'save this specific layout' ]
Use-layout-config.ts
Timestamp snapshots of layout use loadLayoutById()
remote-config.ts
saveRemoteConfig() makes the POST request to save layout
Background
We need to create a service which handles the persistence of layouts.
The implementation of persistence has two levels:
Level 1 is an interface which can direct to multiple persistence handlers, i.e. local or remote. Creating the interface is the priority, as this can be extended with as many persistence handlers as required.
We can implement basic local storage persistence using this interface to showcase the layout management feature.
Server-side persistence is low priority for the Layout epic, as we can easily hook up server level persistence management into the interface at a later stage.
Work Required
use-layout-config.ts
local-config.ts
Acceptance Criteria
Dev Notes
layout-config
directory and any associated layout-management code is a good starting point but it's quite primitive. It assumes you are saving one thing and doesn't have configuration for options such as layout names, groups, etc.Questions
The text was updated successfully, but these errors were encountered: