Giter Site home page Giter Site logo

HTML validation errors about bpmn-js HOT 10 CLOSED

boris-petrov avatar boris-petrov commented on July 22, 2024
HTML validation errors

from bpmn-js.

Comments (10)

nikku avatar nikku commented on July 22, 2024 1

I can verify the report during dragging; if we clone elements with an ID we must change the ID or duplicates will occur:

image

In my tests there is one original element with a certain ID and three .djs-dragger elements (with duplicate IDs).

from bpmn-js.

boris-petrov avatar boris-petrov commented on July 22, 2024 1

Hi, thanks for the quick fix and sorry I didn't provide enough detail. I tried updating to [email protected] but I still get the same errors. I've attached the HTML (as TXT as GitHub doesn't allow HTML) that results in the error. The duplicate ID is marker-6cnzxp45vcldqdsc7bp8xadlw. You can see it twice in the HTML. My code is as follows:

  <div class="canvas"></div>
  <div class="properties"></div>
    this.modeler = new BpmnModeler({
      container: $('.canvas').get(0)!,
      keyboard: {
        bindTo: document,
      },
      propertiesPanel: {
        parent: $('.properties').get(0),
      },
      bpmnRenderer: {
        defaultFillColor: 'var(--bs-body-bg)',
        defaultStrokeColor: 'var(--bs-body-color)',
      },
    });

Let me know if that helps or you need more information?

bpmn-bug.txt

from bpmn-js.

marstamm avatar marstamm commented on July 22, 2024 1

The duplicated markers come from the minimap. Seems like it copies the SVG and only strips the root defs

from bpmn-js.

nikku avatar nikku commented on July 22, 2024

@marstamm Could be related to #2173?

from bpmn-js.

nikku avatar nikku commented on July 22, 2024

@boris-petrov Please share additional details on your setup:

  • How do you embed bpmn-js
  • How do you validate the HTML to find these issues
  • If possible provide us with an export of the HTML for inspection

from bpmn-js.

marstamm avatar marstamm commented on July 22, 2024

Yes, this is related to the latest changes. We have 2 issues here:

  1. For preview, the comple SVG is copied, including the marker with the ID. We only add a cloned marker, but do not remove the copied one. This issue is new. This needs to be fixed in preview support.
  2. For drag-preview, we add the sequence flow multiple times. We add a connection from start shape, end shape and the connection itself. This is reproduceable on earlier version as well. Needs to be fixed in Move Preview.

from bpmn-js.

nikku avatar nikku commented on July 22, 2024

Closed via #2181.

from bpmn-js.

marstamm avatar marstamm commented on July 22, 2024

Correction, we simply clone everything in the djs-visual when we replicate the elements in the minimap: https://github.com/bpmn-io/diagram-js-minimap/blob/156bcaa2d64013a13f4c601c013bb466ab124eed/lib/Minimap.js#L741-L746

we need to strip or change the markers there. Will look into this tomorrow

from bpmn-js.

marstamm avatar marstamm commented on July 22, 2024

Given the issues we are facing in multiple sections of our code, I'll also evaluate if there are other solutions than rendering as part of djs-visual container

from bpmn-js.

marstamm avatar marstamm commented on July 22, 2024

Discussed with @nikku today:

  • The minimap blindly copying elements, even those with IDs, is a bug. We will fix this in the minimap repo
  • A potential other solution for tyleable markers (camunda/camunda-modeler#4307) would be to use context-stroke and context-fill on the markers. The browser support for these is not well-documented, we will follow-up on this

from bpmn-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.