open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

feat(editing): add open-scd-core Edit API

Open ca-d opened this issue 1 year ago • 4 comments

This adds the Edit API from https://github.com/ca-d/open-scd-core to the Editing and Logging mixins, enabling editing through both APIs.

This change is needed in order to be able to handle namespaced updates at all.

[!WARNING] Do not factor out plugins using this version of the Edit API! For compatibility reasons with existing open-scd-core plugins, this pull request just adds the Edit API in its current version, which - while working as intended - still handles namespaced attribute updates quite poorly, as I described in https://github.com/openscd/open-scd-core/issues/132 . I therefore strongly suggest adapting the Edit API before considering it stable. That change could either be made in open-scd-core, with the dependency being updated afterwards, or open-scd-core could be deprecated outright and the change made here, in which case all tests for the Edit API would have to move here, as well.

ca-d avatar Aug 18 '23 09:08 ca-d

As we discussed, I would like to wait with this PR until we finish Milestone 2 in #1300. With that we would import core from the monorepo directly. I understand this is needed for other plugins, so we try to hurry. Thank you for your understanding! ☀️

trusz avatar Aug 22 '23 08:08 trusz

I'll convert this PR to draft for the time being, until the dependencies are done

trusz avatar Aug 23 '23 08:08 trusz

Thank you for attending to this issue. If I can be of help in preparing the dependencies, I'm always happy to join a pair programming or sparring session!

ca-d avatar Aug 30 '23 08:08 ca-d

Hi @ca-d, We want to split up the current Logging Mixin first into Logging and Historing. Logging will contain info, warning and error logs. Historing will contain the edit kinds. After this split, we can more easily migrate to the new Editing API

pascalwilbrink avatar Oct 18 '23 14:10 pascalwilbrink

We would like to include the new edit event so both version of edit API works

trusz avatar Jul 23 '24 09:07 trusz

Inspiration: https://github.com/OMICRONEnergyOSS/open-scd-core/commit/4e36a575e468aa9867050ddc0b4402494e4a6205

Sander3003 avatar Jul 24 '24 08:07 Sander3003

After talking about it, this PR is outdated and there is a newer version of this idea: https://github.com/OMICRONEnergyOSS/open-scd-core/commit/4e36a575e468aa9867050ddc0b4402494e4a6205

I'll close this PR and we will take the new version.

trusz avatar Jul 24 '24 08:07 trusz