Move `compas-save`
JakobVogelsang opened this issue · comments
Jakob Vogelsang commented
To be able to use OpenSCD core we need to move out heavily used web-components within CoMPAS. This issue shall describe how to move out compas-save
t.b.d
Steffen van den Driest commented
Acceptance criteria:
- Remove all compas-save code from compas-open-scd
- Compas-save and save-as plugins are basically the same. This needs to be rewritten
- Components should be UI based only. So no logic to it
- Plugins should contain logic and should use the UI component
- Tests need to be rewritten accodingly
- Dependencies are imported from their own repositories.
- Check to see if helper files are only being used for this particular plugin, if so move to repository. Otherwise, figure where it should be implemented and import dependancy. ( Do not include “compas-core” in the repo)
- Include screenshot tests if needed
- Document the new API of the plugin
- Add TypeDoc for documentation to the repository
- Create storybook for the plugin
TBD:
- How to handle translations
- How to handle logging
- Save-as-version now opens the entire document just to be rewritten. This needs to be refactored so it only uses the document ID
Sander Jansen commented
OSCD new architecture/logic can be re-used to build this: https://github.com/openscd/oscd-new/tree/oscd-new_WIP
Juan Munoz commented
After pair sessions with @Stef3st it was decided to have code duplication instead of using the CompasExistsIn mixin, because it was problematic to have it exported and reused in multiple plugins (CompasSave and CompasUploadVersion).