In order to prepare for some larger changes coming down the pipeline, we need to refactor our applet repos into workspaces so all individual components are split out into their own projects with package.json files. These projects should produce a single package that is a web component which we can upload to a storage provider so it can be retrieved and used by a Neighbourhood.
This means that any thing that is a view or list view should be broken out into it's own component.
Resource Views should accept a resource.
Create/Edit Resource Views a resource should emit a resourceUpdated event containing the object after the view does it's own validation, but I might decide to switch that to a delegate pattern where creating a resource requires a UpdateResourceDelegate to be passed into it. However, let's keep it simple for now and emit an event.
Naming conventions should probably be something like ResourceNameViewType.
List views should be able to receive a list of resources to render and a view component that it will use to display those resources. Eventually, we'll want a way to make these check the resources schema for compatibility, but for now, we can just simply compose them. Also, the list view won't necessarily be tied to the resource it shows. So in the future we may have a library of these we provide in addition to custom views. Because of this we'll need a decent description of the component, but that will be in the manifest (which I haven't finalized yet, so don't worry about it yet).
One of the projects should be a modified version of the existing applet code that exposes the same interface and builds a webhapp which can be loaded in the existing NH Launcher. This will ensure our applets remain compatible with our code until we have everything in place to move over to the new model where Spaces have Pages with a Layout that can compose the Resource Create View, List View, and Resource View from our "applet". This transition would also mean applets no longer manage what we previously called contexts, but we have a bit of work to do before then.
Do this for:
[ ] Todo Applet
[ ] Split out all resource views
[ ] Split out all create resource views and have them emit events with data
[ ] Split out all list views
[ ] Refactor existing code to use compositions of the above components
[ ] Feed Applet
[ ] Split out all resource views
[ ] Split out all create resource views
[ ] Split out all list views and have them emit events with data
[ ] Refactor existing code to use compositions of the above components
Once this is done, we'll be in good shape to start looking at what the Neighbourhoods Package Format should look like and how to get HMR working for all the components by using a dev sever for each workspace that automatically re-registers components with the NH-launcher.
In order to prepare for some larger changes coming down the pipeline, we need to refactor our applet repos into workspaces so all individual components are split out into their own projects with package.json files. These projects should produce a single package that is a web component which we can upload to a storage provider so it can be retrieved and used by a Neighbourhood.
This means that any thing that is a view or list view should be broken out into it's own component.
resourceUpdated
event containing the object after the view does it's own validation, but I might decide to switch that to a delegate pattern where creating a resource requires aUpdateResourceDelegate
to be passed into it. However, let's keep it simple for now and emit an event.ResourceNameViewType
.Do this for:
Once this is done, we'll be in good shape to start looking at what the Neighbourhoods Package Format should look like and how to get HMR working for all the components by using a dev sever for each workspace that automatically re-registers components with the NH-launcher.