Closed tiagobento closed 10 months ago
Just fixed the weird repaint glitch on Safari with the help of this
Here's the commit, for anyone interested :)
Before:
https://github.com/kiegroup/kie-issues/assets/1584568/c3e5bb94-d44e-477c-aed2-2973c0f40b03
After:
https://github.com/kiegroup/kie-issues/assets/1584568/bf5b41cf-5776-4dd9-ad04-0bff2f06e4ab
Btw the fix for the Safari repaint glitches is not perfect, but it makes the Editor usable :)
Copy/cut/paste working for nodes between different instances of the DMN Editor...
https://github.com/apache/incubator-kie-issues/assets/1584568/1be91d09-2796-4d86-ade8-4f3fb1cba1e6
Working on
"Make the DMN Editor convert all models to latest (1.5) (this means updating the xmlns attributes on the JSON). Version is hard-coded as 1.5. We need to actually convert the models to DMN 1.5. Remember to update the kie: namespace from http://www.drools.org/kie/dmn/1.2 to https://kie.org/dmn/extensions/1.0"
now... I'll group all the migrations that need to be done here:
http://www.omg.org/spec/DMN/20130901
→ http://www.omg.org/spec/DMN/20151101/dmn.xsd
Definitions
to definitions
.typeRef
s from tDMNElementReference
to xsd:QName
.
http://www.omg.org/spec/DMN/20151101/dmn.xsd
→ http://www.omg.org/spec/DMN/20180521/MODEL/
http://www.omg.org/spec/DMN/20180521/DMNDI/
http://www.omg.org/spec/DMN/20180521/DI/
http://www.omg.org/spec/DMN/20180521/DC/
expressionLanguage
and typeLanguage
properties from http://www.omg.org/spec/FEEL/20140401
to http://www.omg.org/spec/DMN/20180521/FEEL/
typeRef
s from xsd:QName
to xsd:string
.
http://www.omg.org/spec/DMN/20180521/MODEL/
→ https://www.omg.org/spec/DMN/20191111/MODEL/
http://www.omg.org/spec/DMN/20180521/DMNDI/
→ https://www.omg.org/spec/DMN/20191111/DMNDI/
http://www.drools.org/kie/dmn/1.2
to https://kie.org/dmn/extensions/1.0
expressionLanguage
and typeLanguage
properties from http://www.omg.org/spec/DMN/20180521/FEEL/
to https://www.omg.org/spec/DMN/20191111/FEEL/
https://www.omg.org/spec/DMN/20191111/MODEL/
→ https://www.omg.org/spec/DMN/20211108/MODEL/
expressionLanguage
and typeLanguage
properties from https://www.omg.org/spec/DMN/20191111/FEEL/
to https://www.omg.org/spec/DMN/20211108/FEEL/
https://www.omg.org/spec/DMN/20211108/MODEL/
→ https://www.omg.org/spec/DMN/20230324/MODEL/
https://www.omg.org/spec/DMN/20191111/DMNDI/
→ https://www.omg.org/spec/DMN/20230324/DMNDI/
expressionLanguage
and typeLanguage
properties from https://www.omg.org/spec/DMN/20211108/FEEL/
to https://www.omg.org/spec/DMN/20230324/FEEL/
allowedValues
to typeConstraint
on ItemDefinitions. If the ItemDefinition is a collection, we need to "extract a new type" with the same "typeRef" as the ItemDefinition, add a description to it explaining why this was created (constraints are not projected to individual items on the list), and change the "typeRef" of the ItemDefinition to this new type. For non-collection types, simply copying allowedValues
to typeConstraint
is enough.
As work on #439 continues, I thought changing the task granularity would help. We'll start with a first "base version" of the new DMN Editor, and we'll continue evolving it, eventually replacing the old one. For this first "base version" to be ready, many little things need to be addressed. As the list is long, and some things might be postponed, I figured we could use this issue to track stuff that goes into this first "base version", and things that will be addressed after it can have their own separate issues.
The first "base version" is being developed at https://github.com/tiagobento/kie-tools/tree/dmn-editor at
packages/dmn-editor
. You can test it by runningpnpm start
inside it. Multi-package live-reloading works if you dopnpm start --env live
First "base version" (in order to get it merged on
main
)🛠️ Finish WIP components
Known crashes
Structural bugs
includedModelsContextName
andincludedModelsContextDescription
something.
.getDefaultExpressionDefinition
needs actually create a very nice expression based on the typeRef of the containing expression... With widths that won't crop column names!onModelChange
must not be called when changing the Snap grid.@_href
s,@_dmnElementRef
s, and weaker refs likekie:ComponentWidthsExtension
.kie:
namespace changed fromhttp://www.drools.org/kie/dmn/1.2
tohttps://kie.org/dmn/extensions/1.0
. Taking a file from the new Editor, changing the namespaced to DMN 1.2 and thekie:
namespace tohttp://www.drools.org/kie/dmn/1.2
will make the widths work normally.DMNShape/DMNEdge
s and@_href
requirements pointing to unknown external elements, the Editor should continue working normally, without deleting them. Resoltuion: We're not deleting anything automatically. When an included model is deleted, a placeholder "unknown node" is shown. Users then will have the visual clue that something on their diagram doesn't look right.div
s instead ofbutton
s.kie:
namespace fromhttp://www.drools.org/kie/dmn/1.2
tohttps://kie.org/dmn/extensions/1.0
.Decision Services
Edges
Sample.dmn
will lose edge magnet points on the top-level Decision.Cmd + click
directly on Edge will keep adding it to the selected array, instead of toggling its selection.Validations
NamedElement
s inside the DMN have a locally unique name. Allowed characters for names should be validated as well.d3-hierarchy
helps?~. Solution: Reused the same mechanism we had for traversal and painting of dependencies/dependents of selected nodes. When a connection starts, a new derived state returns a set with all the dependencies of the source node. If a node is in this set, it's not a valid target of the connection, as it would create a cycle.UX - Empty States
includedModelsContextName
doesn't have any available external models to be included.includedModelsContextName
were already included in 'This DMN'."UX - General
Cmd + A
, thenEsc
is not de-selecting everything.typeRefs
with the new QName prefix!UI flaws
Other
FIXME: Tiago -->
inpackages/dmn-editor
. Create issues/entries for each of them, grouping related entries. Can use this (https://github.com/apache/incubator-kie-issues/issues/625)Other information
THEORETICALLY 'INVALID' STATES THAT ARE TEMPORARILY ALLOWED IN THE EDITOR
INTENTIONALLY TEMPORARILY LEFT OUT
SPEC DISCREPANCIES