Open CallmeT-ty opened 1 month ago
List of issues we've been defining after stakeholder meetings, organized according to priority.
[x] Debug export warning (empty file?)
[x] Fix bundling to reuse react instance (acaldas)
[ ] Bugfix: doc name confusion https://github.com/powerhouse-inc/powerhouse/issues/382
[ ] Auto-reload editor on code change. Editor is reloading but it should just reload the specific segment. (to be researched. Storybook + Editor vs. The actual changes) vite supports a more fine grained refresh when the code changes, instead of doing a full page refresh we could just update the affected components https://github.com/powerhouse-inc/powerhouse/issues/410
[ ] Read document models / editors location from config file (To be implemented for next demo + CLI) #383
[x] Zip file import into dev.connect. doesn't work compared to connect.phd. Fix the ZIP File Export Bug. https://github.com/powerhouse-inc/connect/issues/573
steps:
1.- start a new project: npm create document-model-lib
2.- run code generation (run this one inside of the project created in step 1): npm run generate todo-list.phdm.zip
3.- generate editor: npm run generate -- --editor TodoList --document-types 'powerhouse/todo-list'
4.- start connect studio: LOCAL_DOCUMENT_MODELS=./document-models LOCAL_DOCUMENT_EDITORS=./editors npm run connect
The To-Do List Demo Scenario Liberuum will support to implement. https://docs.google.com/spreadsheets/d/13zlnFpbTespFPwZSQDNhkMIAPTwF84gvxtgkWtQw_Eg/edit?usp=sharing
If we make the graphql api available in local environment (service runner or whatever structure). When we define new Doc & new document. Would the subgraph become available in the api endpoint?
How does plugging in a new subgraph work? It listens and functions as a readmodel that replaces the subgraph? If document models change in the reactor, e.g. new document model. Graphql server needs to reload the schema and update the types. To make the new types available in the documentquery we'll need to reload the type definition. On the other hand, the subgraphs or readmodels
Subgraph is being dynamically created, e.g. schema gets updated. How does it work when there are no graphql ... attached to it. 1) You start with types without mutations 2) A subgraph gets defined with some queries & mutations
Document models get downloaded, listener looks for changes in the router. Next load all subgraphs, load their schema, load an apollo server A small helper is put in place.
How do we plug in the GraphQL into the demo scenario?
ZKtruths question Use an input type and use it as a mutation. Push operations mutation exists for the listeners. What about the sync protocol. What if we use the switchboard side of docsync to push operations? Basically an alternative to Connect. Frank will share info with ZK
When we generate new document editors. Improvements of usual suspects (Actions etc) to be there and make imports available. Standard functionality of a couple of items: 1) Revision History availability in the editor we are creating: 'We just created a document model and automatically out of the box there is a revision history'. 2) Potentially showing switchboard. User story to be added.
Initial Setup for Powerhouse Project
1. Start with a clean development environment Ensure your IDE (e.g., VSCode, WebStorm) is set up with no pre-existing projects or configurations.
2. Install Node.js and npm If you don't already have Node.js installed, download and install it from Node.js official website. This will also install npm (Node Package Manager) alongside it.
3. Install GitHub CLI Follow the instructions to install the GitHub CLI. This will allow you to interact with GitHub directly from your terminal.
4. Initialize a new Demo project (IDE) 4.1 We’re currently using
npm create document-model-lib
to create a new project. It creates a document models project instead of a single todo-list doc Model. PH CLI will eventually turn this command intoph init
. Do we want support for the case of having a single doc? It would just change the folder structure.5. Bring up Connect in a local instance (CONNECT) 5.1
npm run connect
(In PH CLI it will become 'ph dev'). This will prompt Local: http://localhost:3000/ to run connect in a local instance.6. Create the To-Do list document model (CONNECT) 6.1. Use current version of document model editor and export ZIP file We will use a very rough & basic version of the document model-document model to put all mvp functionality in place and only polish with design after (22/10 to be changed)
Global State Schema
Global Initial State (Auto generated with CodeMirror engine
Operations
7. Generate code from the document model => back to IDE 7.1.
npm run generate ./TodoList.phdm.zip
(This command will becomeph generate
) In the future we don't want to use the zipfile, this generation should be automated. But for now we'll focus on the Zipfile path to further optimize.This will prompt
You will now find the
to-do-list
as a document model in thedocument-models
folder8. Navigate to Document model reducers ./document-models/todo-list/src/reducers 8.1. Implement the actual business logic
9. Open an empty document model editor
9.1.
npm run generate -- --editor TodoList --document-types “powerhouse/todo-list”
9.2. This will create a new To-Do list document in connect and a button will appear 9.3 Click the 'Todo-list' button to create a new todo list document.10. Bring up an empty editor within connect studio:
10.1
npm run connect
10.2 An empty editor To-Do list editor opens up This command is currently only working on connect repository. Mono repo efforts should help solve this?Open questions Getting the editor to work or auto generation of document model? What about the development flow without using connect?