dice-group / deer

RDF Dataset Enrichment Framework
https://dice-group.github.io/deer/
GNU Affero General Public License v3.0
10 stars 7 forks source link

[webUI] sh:xone rendering is not remembered #20

Closed kvndrsslr closed 3 years ago

kvndrsslr commented 3 years ago

When re-focussing a node the properties which get initially invalidated by sh:xone rendering are available again, see the example below.

Before entering one of the properties: both available

issue3-1

After entering one property: the other becomes unavailable because of sh:xone

issue3-2

After focussing another node and refoccusing this one, both properties are available again.

issue3-3

Please implement this in a way that it is remembered or recalculated on refocussing nodes.

pskLana commented 3 years ago

It is the same issue as #18. It works exactly how I implemented that. When user types in a field that has restrictions, it activates the event disabling other properties and removing previous values. If the person would like to change its mind and would like to use other properties instead it simply writes in another field and values of old properties are removed and disabled. The problem regarding not saving the availability of properties is in the library itself. Each time this panel is drawn on canvas again from scratch it doesn't save styles state of it, it remembers only inserted values. There is no option for saving styles inside canvas in this library. And another problem is that there is no event for opening this panel for inserting properties in the library. The only event that I found is 'onPropertyChanged' (https://github.com/jagenjo/litegraph.js/wiki/Creating-custom-Nodes) and I used it. On panel there are only events for the input fields but not for opening or closing this panel. I don't see any other way how it can be implemented with this library so far. I would implement our own panel and there we could implement whatever we want. This library panel is too restricted. It doesn't support optional properties, adding new elements like radio buttons and so on.

kvndrsslr commented 3 years ago

I was not aware of this limitation. Thanks for explaining it. It would indeed be nice if you could develop a better panel. If I understand correctly, you would use pure HTML/CSS for that instead of drawing with the canvas API, right? How long would it take you to implement this?

pskLana commented 3 years ago

I would create React JS component "Panel" since we are using this framework already. I guess, it would take around 1 week, maybe less. I also would need to disable the previous Panel somehow.

pskLana commented 3 years ago

New panel added https://github.com/dice-group/deer/pull/27