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] use fixed size Activity Marker #539

Merged
merged 9 commits into from
Aug 20, 2020

Conversation

aibcmars
Copy link
Contributor

@aibcmars aibcmars commented Aug 18, 2020

covers #465

  • icon size fixed (independent from the parent)
  • loop icon adjusted (resized)

@aibcmars aibcmars added enhancement New feature or request depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first BPMN rendering Something about the way the lib is rendering BPMN elements labels Aug 18, 2020
@tbouffard tbouffard changed the title [FEAT] Activity Marker - fix size of the icon [FEAT] use fixed size Activity Marker Aug 19, 2020
@aibcmars aibcmars force-pushed the 465-activity_marker_fixed_size branch from d6aeea4 to 8328f10 Compare August 19, 2020 10:21
@aibcmars aibcmars force-pushed the 465-activity_marker_fixed_size branch from 8328f10 to 43de076 Compare August 19, 2020 11:40
@aibcmars aibcmars removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Aug 19, 2020
Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aibcmars could you add

Marker size depends on the Activity size (screenshot from version 0.1.7)
image

@aibcmars
Copy link
Contributor Author

image

Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still some minor things to change.

🎯 coverage of the targeted feature

This PR does not fully cover #465 although the size of the marker doesn't change with the activity size anymore.

We currently have no control over the size of the icon: we paint it with the size used in the IconPainter implementation

  • so the loop doesn't have the same size than the other markers
  • changing the size of marker in the IconPainter implementation or provide a custom implementation affect the rendering (see screenshot below)
  • it is not possible to adjust the marker size globally like we can do for marker margin, wich is going to be an issue when we will review the way we render all elements to have a consistent view across the BPMN diagram

However, as this PR already brings values to the lib (apparent marker fixed size, testing automation), I suggest that we can keep the implementation as it is and that we will cover the remaining points later.

Parallel multi-instantiation original icon size changed to 32x32

image

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1uz6fwe" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="7.3.0">
<bpmn:process id="Process_083f5uf" isExecutable="false">
<bpmn:receiveTask id="instantiating_receive_task_id" instantiate="true">
Copy link
Member

@tbouffard tbouffard Aug 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ please use an abstract task here

  • we are only focussing on markers, receive task displayed an extra icon not related to what we want to test
  • about maintenance, any receive task icon change would make the test fail whereas not related to a change about the marker. This would send a false signal about potential issue with the markers rendering

I would also add tasks with several marker to confirm that the whole marker group size is not impacted by the size of the activity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

covered by 7e9221c and b209a2e

Comment on lines +543 to +545
canvas.moveTo(7.5, 14.08);
canvas.lineTo(5.75, 19.08);
canvas.lineTo(0, 17.08);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ this seems to have an impact on the rendering that is not nice when zooming (for instance, zoom on the image provided in #539 (comment)).
Anyway, the loop marker may be reworked as part of #475

Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with changes integrated
Thanks

@tbouffard tbouffard merged commit 5123d33 into master Aug 20, 2020
@tbouffard tbouffard deleted the 465-activity_marker_fixed_size branch August 20, 2020 14:16
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

Successfully merging this pull request may close these issues.

2 participants