Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] icon size: use absolute or relative to the BPMN element size? #211

Open
tbouffard opened this issue Apr 28, 2020 · 1 comment
Open
Labels
BPMN rendering Something about the way the lib is rendering BPMN elements enhancement New feature or request

Comments

@tbouffard
Copy link
Member

tbouffard commented Apr 28, 2020

Is your feature request related to a problem? Please describe.
Let's decide how we want to display the size of BPMN element icon

Current situation
#208 introduced for the first time quite complex BPMN element icons and the size (and position) of the icon depends on the size of the enclosing Service Task rectangle.
Notice that the inner circle of the Terminate End Event also depends on the size of the element (see #183)
This ensures that the icon doesn't cover the whole surface of small BPMN elements.

But if the BPMN element is large, so does the icon.
When the diagram contains both small and large elements, the display mixed small and large icons which is disturbing

Note: the recommendation is to have the same size for all activities to avoid letting user guess that some are more important than other. But we know this rule is not always follow, for instance when the activity title is large (we have hundreds of examples coming from the Bonita Community or from Bonita Customers), so this is something to consider

Solution to be evaluated

  • single ways of doing things
    • always use relative size (as for now)
    • always use absolute size (as bpmn.io do)
  • global configuration option to decide to use absolute or relative sizes: this won't cover diagram with both large and small elements. This would also force the lib integrator to know the content of the diagram and configure the lib accordingly
  • dynamic sizing: two points of view for the same thing
    • if BPMN element is "small" (bounds to be defined), use relative size, otherwise, use absolute size
    • use relative size but limit the icons size when the BPMN element size reach a given value(bounds to be defined)

Additional context
Here is a demonstration of the current behaviour introduced in #208, the following screenshots display diagram_small_and_large_elements.bpmn.zip

Notice that

  • the diagram contains unusual large or small gateways and events; the size of these elements are generally consistent over a diagram as there is no reason to enlarge them: their label is outside of the shape
  • it is given to illustrate the theorical icon size impact on various BPMN elements; some of them may not be considered in real life (see remark above)

Service Task rendering thanks to #208
diagram_small_and_large_elements__bpmn_visualization_PR_208

bpmn.io display
diagram_small_and_large_elements__bpmn_io

@tbouffard
Copy link
Member Author

We also have the same question for activity markers (#465)
In addition, the icon position is generally also relative to the size of the shape (same for markers #466). #508 introduced a way to use absolute position (initially used for the icon of the Send Task)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BPMN rendering Something about the way the lib is rendering BPMN elements enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants