Closed stevebuik closed 6 years ago
I've finished adding the fns in javascript for Graphviz and SOQL generation. It's now ready for the Lightning UI to make/store the new shape. I have no changed any of the existing code so nothing should be broken now.
Here's a sample of the new shape : https://github.com/stevebuik/Graphvizforce-Lightning/blob/master/js/pure/test/diagramPersistedSamples.js#L6
Before each save/persist done by the Lightning UI, the JSON object should be validating using the new schema. An example of how to invoke the validation is here https://github.com/stevebuik/Graphvizforce-Lightning/blob/master/js/pure/spec/GraphvizRenderSpec.js#L18
The return object should have an empty array in the "errors" key.
Once this is done, you can deploy the new pure code to the static resource using the instructions in the readme (the webpack command)
Then replace the fn calls which generate the graphviz and soql. Samples are: soql: https://github.com/stevebuik/Graphvizforce-Lightning/blob/master/js/pure/spec/SOQL2RenderSpec.js#L7-L8 graphviz: https://github.com/stevebuik/Graphvizforce-Lightning/blob/master/js/pure/spec/GraphvizRenderSpec.js#L12
It should be working at this point. If not, let me know.
Once committed, let's catch up so we can delete all the old code from the codebase.
BTW : there are no changes required to be made to the ObjectWrapper Apex code.
Also, these changes will break the auto-build features. I'll need to follow-up your work and adjust the apex classes here https://github.com/stevebuik/Graphvizforce-Lightning/blob/master/graphviz/main/default/classes/AutoBuildDiagram.cls#L64 to match the new diagram shape
Xero installed the alpha and immediately got error "data value too large" due to the JSON being too big when many objects/fields in the org. The new format will fix this
The auto-build feature will need to be able to fire an app event that contains N entities, each with M fields that must be added to the diagram. It will not contain existing objects/fields.
This is a bit different to the configurator use case that needs to add a single object or a single field.
When designing the events for this, can you make sure that the auto-build use case is also supported? Thanks.
new persistence complete
This will fix quite a few bugs, including when a user adds a new field to SFDC.