Giter VIP home page Giter VIP logo

improved-canvas's Introduction

@camunda/improved-canvas

Build Status

Improvements or reworks of the bpmn-js canvas.

Installation

Install via npm.

npm install @camunda/improved-canvas

Usage

For the BPMN modeler use the BpmnImprovedCanvasModule.

import { BpmnImprovedCanvasModule } from '@camunda/improved-canvas';

const modeler = new Modeler({
  additionalModules: [
    BpmnImprovedCanvasModule
  ]
});

For the BPMN viewer use the HighContrastCanvasModule.

import { HighContrastCanvasModule } from '@camunda/improved-canvas';

const viewer = new NavigatedViewer({
  additionalModules: [
    HighContrastCanvasModule
  ]
});

License

MIT

improved-canvas's People

Contributors

barmac avatar marstamm avatar nikku avatar philippfromme avatar smbea avatar

Watchers

 avatar  avatar  avatar  avatar

improved-canvas's Issues

Create/append shortcuts don't work

Describe the Problem

As a power user I want to use the known c and a shortcuts to create and append respectively.

Expected Behavior

  • c and a (without a node selected) trigger create
  • a (with a node selected) triggers append

Append menu should only show elements that can be appended

The append menu shows every single option regardless of whether it can actually truly be appended (created and connected). While this is in line with the idea of never blocking the users and letting them model while we make sure the diagram is valid at all times, it begs the question: Does it always make sense to offer every single option?

Example: Event-based gateway

Very few elements can be appended, but they're buried among all the other elements.

image

Example: Compensation boundary event

Compensation activities are the only appendable elements, but they're buried among all the other elements.

image

Improve New Append Feature

Feedback indicates that the new append feature is hard to discover and that quick appending of common elements (tasks, gateways, and end events) is missing.

Tasks

Append node should be positioned relative to boundary event's position

The append node is always shown on the right. When a boundary event attached at the bottom of a task (standard) is selected, the append node looks like it's for the task, not the boundary event. The append node should be placed at the bottom. Likewise, if the boundary event is attached at the top, the append node should be placed at the top.

image

Connect arrow doesn't support drag

Describe the Problem

Nothing happens on dragging connection icon.

Expected Behavior

User should be able to "drag start" arrow to connect to other elements.

Resize handle covered at default zoom level

Describe the Bug

For resizable elements that also allow appending like subprocesses the right resize handle is covered by the append button at the default zoom level. You have to zoom in to be able to use it.

image

Expected Behavior

At default zoom level you should be able to use all resizers.

Environment

  • Library version: 1.7.1

Importing individual modules does not work

When trying to import HighContrastCanvasModule with import {HighContrastCanvasModule} from '@camunda/improved-canvas'; I get ModuleDependencyError: export 'HighContrastCanvasModule' (imported as 'HighContrastCanvasModule') was not found in '@camunda/improved-canvas' (possible exports: BpmnImprovedCanvasModule, DmnImprovedCanvasModule)

To me, it looks like the respective modules would need to be exported here, too. Or Rollup would have to be configured differently.

But I am no rollup expert, so this whole thing might also be my fault ;)
Happy to provide a PR if that helps.

Related to https://github.com/camunda/play/issues/153

Text annotation cannot be appended when participant selected

Describe the Bug

Since the text annotation was removed from the context pad and the append feature is not available for participants it's not possible anymore to append a text annotation to a participant directly.

brave_STlj8cMiiY

Expected Behavior

A text annotation can be appended to a participant without workarounds.

Environment

  • Library version: 1.7.1

Position context pad always on canvas

Describe the issue

As a user I want to have my context pad always accessible. At this time, however, it is easy for the menu to move out of the canvas:

capture fxSW5l_optimized

Describe the solution you like

Position the menu relative to the element, but in a smart manner. When there is no place left (or top), position it to the bottom.

If popup menus open, ensure these are positioned in a proper way (away from the element, not hidden if possible, too).

Context

Came up in a user test.

Boundary events can be attached to receive tasks

Describe the Bug

The quick attach feature allows attaching a boundary event to a receive task when the rules wouldn't allow it.

brave_UdhKrVs98p

Steps to Reproduce

  1. Create a receive task
  2. Attach a boundary event using the quick attach feature

Expected Behavior

Quick attach is not available for receive tasks.

Environment

  • Browser: [e.g. IE 11, Chrome 69]
  • OS: [e.g. Windows 7]
  • Library version: [e.g. 2.0.0]

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.