Code Monkey home page Code Monkey logo

bpmn-js-bpmnlint's People

Contributors

barmac avatar marstamm avatar maxtru avatar nikku avatar philippfromme avatar renovate[bot] avatar rumata28 avatar ssternal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpmn-js-bpmnlint's Issues

Schema errors not displayed

Hello!
Describe the Bug

Schema errors not displayed

Steps to Reproduce

  1. connected as indicated in the documentation
  2. created a config and connected
  3. there are no changes in the diagram

import { Linter } from 'bpmnlint'; import linterConfig from './packed-config'; import lintModule from 'bpmn-js-bpmnlint'; import Modeler from 'bpmn-js/lib/Modeler';

image

no change
image

if you remove the style of stretching in height, a button appears
image

Environment

  • bpmnlint: 6.4.0
  • bpmn-js: 6.3.0
  • bpmn-js-bpmnlint: 0.14.0

Display errors/warnings for elements without bpmndi information or without visual representation

Is your feature request related to a problem? Please describe

Relates to this rule: https://github.com/bpmn-io/bpmnlint/blob/master/docs/rules/no-bpmndi.md

It might occur that an error or warning relates to an element without visual representation (e.g., because it has none (bpmn:DataObject) or it has missing bpmndi (see the rule linked above)).

In this case, the error/warning is only visisble in the summary overlay, but can not be inspected by hovering over an element.

Describe the solution you'd like

In case that a error/warning can not be displayed directly with the element (see reasons above), it shall "bubble up" to the next appropriate element.

Describe alternatives you've considered

Alternateively: we could not let it "bubble up" but simply use the root element of the entire diagram.

Additional context

n/a

Add Changelog

  • make sure users are able to capture breaking changes
  • ๐ŸŽ‰ the improvements

Display process lint errors on connected participant

Is your feature request related to a problem? Please describe

In collaboration diagrams we usually treat expanded participants like the process it is connected to, interaction wise. With #29 merged we have the potential to better support this special case, too.

Describe the solution you'd like

  • Display process lint errors not on the root but on the visible participant that represents it

Describe alternatives you've considered

  • Keep existing behavior

Additional context

Current behavior (as of v0.17.0): Note that the process error is shown on the root, rather than the participant, which would be my expected position to display it.

capture QDWeit_optimized

Cannot run bpmnlint together with babel

Describe the Bug

I followed the instructions to add bpmn-js-bpmnlint to the example project properties-panel-extension. This results in the following error:
>> SyntaxError: /home/adrian/workspace/condat/ZDF-BPMN/bpmn-js-examples/properties-panel-extension/node_modules/bpmnlint/lib/linter.js: Unexpected token (62:8) while parsing file: /home/adrian/workspace/condat/ZDF-BPMN/bpmn-js-examples/properties-panel-extension/node_modules/bpmnlint/lib/linter.js

I presume this is some sort of dependency conflict, but if so it would be nice to see incompatibilities / requirements mentioned under usage.

Steps to Reproduce

  1. Clone https://github.com/bpmn-io/bpmn-js-examples
  2. Edit the project properties-panel-extension according to the usage instructions.
  3. Run npm install
  4. Run grunt auto-build
  5. The error should appear.

Expected Behavior

Either the build should run without errors or the usage instructions should mention the package / version that is conflicting or missing here.

Environment

  • Host (Browser/Node version), if applicable: Node v15.14.0, NPM 7.19.1
  • OS: Linux MInt 20.1 Cinnamon
  • Library version: 0.18.0

Always lint (but allow on diagram overlays to be toggled)

Is your feature request related to a problem? Please describe

Issues like bpmn-io/bpmnlint#40 make the interesting case of a problem being there but mostly temporarily. In these cases, it is probably still worth to show feedback, however in a less "urgent" manner.

One idea to explore is to make the plug-in always lint and toggle showing overlays when pressing the lint controls โฌ‡๏ธ only.

image

Describe the solution you'd like

  • We have a way how to handle intermediate states in a less visually verbose manner.

Describe alternatives you've considered

Do not change anything.

packed bpmnlint configuration

When I'm trying to execute this command

bpmnlint-pack-config -c .bpmnlintrc -o bundled-config.js
i got this error
image

TypeError: ruleFactory is not a function

Describe the Bug

Vite+bpmn-js+bpmn-js-bpmnlint cause runtime error

Uncaught (in promise) TypeError: ruleFactory is not a function
    at bpmn-js-bpmnlint.js?v=5597bdc5:188:46

Steps to Reproduce

import lintModule from 'bpmn-js-bpmnlint'

...
const modeler = new Modeler({
    container: modelerRef,
    additionalModules: [
      ...,
      lintModule
    ]
  })
...

Expected Behavior

The lint module works

Environment

  • Host (Browser/Node version), if applicable: Chrome, Node v20
  • OS: Windows 10
  • Library version: 0.22.3

Issues shown twice

Given this config:

var LINTER_CONFIG = {
  "extends": "bpmnlint:all",
  "rules": {
    "label-required": 1,
    "start-event-required": 2,
    "end-event-required": 2
  }
};

Issues show up twice:

{
  category: "error",
  id: "Participant_1t4x716",
  message: "is missing label/name",
  rule: "bpmnlint/label-required"
}, {
  category: "warn",
  id: "Participant_1t4x716",
  message: "is missing label/name",
  rule: "label-required"
}

Result:
image

@nikku Shouldn't the inherited one be overridden?

Verify this works as a library

Tasks

  • Add an example that showcases how to consume this library
  • Verify that it works in >= IE 11 and modern browsers (with ES6 transpiled to ES5 and friends)

Empty error messages when hovering over BPMN validation issues

Describe the Bug

TL;DR: While the modeler is showing that there are some errors in a BPMN, it doesn't show the text of the errors when hovering.

I'm using the modeler layout from bpmn-js-examples, which allows me to see and create BPMN files. Then, I've added bpmn-js-bpmnlint, because I need to see the errors that are in the diagram. I've followed the steps from the bpmn-js-bpmnlint, and the result is that, while it shows the correct number of errors, when I hover the error, the message is empty.

Steps to Reproduce

  1. Clone the modeler folder from bpmn-js-examples
  2. Add bpmn-js-bpmnlint following the steps from the bpmn-js-bpmnlint page
  3. Add the bpmnlint-loader
  4. Add the .bpmnlintrc
  5. npm install
  6. npm run dev
  7. Open a BPMN file
  8. Enable the BPMN validation (click the "pill" at the bottom-center)
  9. Hover the errors
  10. See nothing in the error message

I've created a repro, if this helps: bpmn-editor.

In the repro, I've commented with an asterisk (*) the lines in src/app.js and webpack.config.js I've added that were not in the modeler base, the lines I've added to add bpmnlint.

With the repro, the steps are the following ones:

  1. git clone https://github.com/Tupiet/bpmn-editor.git
  2. cd bpmn-editor
  3. npm install
  4. npm run dev
  5. Open a BPMN file
  6. Enable the BPMN validation (click the "pill" at the bottom-center)
  7. Hover the errors
  8. See nothing in the error message
Captura de pantalla 2024-03-02 a las 13 03 49

Expected Behavior

I would expect to see the text of the errors.

Captura de pantalla 2024-03-02 a las 13 06 55

Environment

  • Browser: [Safari 17.3, Chrome 121.0.x.x]
  • Library version:
    • bpmn-js: 17.0.2
    • bpmn-js-bpmnlint: 0.22.2

Finally, thanks for this amazing library! Feel free to ask me for more details if you need it.

Flow elements container errors and warnings not visible

Describe the Bug

This bug occurs when a user navigates to a location of the BPMN designer where the flow elements container (djs-overlay-container) is out of view.

I have also noticed that this (form elements container) can also overlap a diagram which is confusing to the users.

This means that a user may have solved all errors and warnings visible but will still see that there are errors or warnings left. In this case they cannot see what the errors or warnings are.

I noticed that the errors / warnings sit in and djs-overlay-container and are always in the same location, unless the errors / warnings are attached to an element in the diagram.

Steps to Reproduce

I can reproduce the error with the playground project.

  1. Checkout the bpmnlint-playground project
  2. npm install and npm start
  3. After navigating to localhost:8080 a diagram is presented to you.
  4. Highlight the diagram by pressing and holding shift and using the mouse select all the diagram elements
  5. Now move all the elements to the right. (a large distance)
  6. Select a start event and drag it to the diagram
  7. Give the start event a name and connect it to something (the first task for example)
  8. Validate the BPMN again. You will see 1 error and 6 warnings.
  9. Warnings are visible however the error is not.

Screenshot 2020-05-28 at 11 52 22

Expected Behavior

The flow elements container errors/warnings should always be visible, regardless where the diagram is placed on the canvas.

Screenshot 2020-05-28 at 12 09 43

Environment

  • Host (Browser/Node version), if applicable: Chrome 81.0.4044.138
  • OS: macOS Mojave 10.14.6
  • Library version: latest

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.