-
Notifications
You must be signed in to change notification settings - Fork 4
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: allow to style BPMN Elements #247
Conversation
♻️ PR Preview 3cffa24 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ Implementation
✔️ Great documentation (including documentation section reuse)
✔️ A lot of new tests
❌ README
- missing API usage in the README of the repository to be consistent with all existing features that are referenced there
- Consider updating the illustration image: use script of [DOC] Update the hero image #72 and [DOC] Add hero image in the README #45 (we should put the script in the doc folder instead of keeping it in comments of Pull Requests and probably rename this folder into docs for consistency with other repositories)
- It is mainly a list of added/updated functions and the code and R documentation should be enough to provide the same information. If not, this means that the code and/or the documentation are uncleared
- it only states what is done where I expect to find explanations about why it is done. The code should be clear enough about the what (and if required, add code comments). I would prefer to have a clear text about the "doc section" reuse that is currently hidden in the list of links of the "to build the documentation" paragraph.
I've recently realized that this is becoming the norm in the latest PRs you've opened, and I suggest that it be adapted to help my review. Let's discuss it in person to find a solution that works for both of us.
#' | ||
#' @keywords internal | ||
create_element_style <- function(elementIds, | ||
stroke_color = NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: I suppose it's the R way to have dozens of parameters in a function, but it's boring and a pain to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ℹ️ the image in the Readme could still be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WARN the label of the activity on top of the subprocess is not centered
The R script used to produced this image is not shared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use any script. I just edited the SVG image with Inkscape.
ℹ️ When I created this image for the first time, it was from a HTML page and it take me a long time to clean the SVG and to see the label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is how it is rendered with Firefox 117 on Ubuntu 20.04. I don't see the problem with Chrome 117.
See also the sendTask
in the left
There was no issue with the previous image on Firefox.
We could create a dedicated issue to handle it.
ℹ️ When I created this image for the first time, it was from a HTML page and it take me a long time to clean the SVG and to see the label.
However, we need the script that is able to produce this rendering to be able to reproduce it.
I understand the pain about the label repositioning. Be aware of https://github.com/process-analytics/bpmn-visualization-tools/tree/v0.4.0/bpmn-visualization-svg-screenshots for the next time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request includes changes to several files in the
inst/htmlwidgets
andR
directories. Here is a description of the changes made in some files:R/funs.R:
create_element_style
which creates the correct style structure for BPMN elements.create_edge_style
which creates the correct style structure for BPMN edges.create_shape_style
to create the correct style structure for BPMN shapes.create_stroke
,create_font
andcreate_fill
functions to accept additional style properties.build_bpmnContent
function to accept abpmnElementStyles
parameter, which is a list of existing elements with their style to apply.R/bpmnVisualizationR.R:
display
function to accept abpmnElementStyles
parameter which allows to specify styles for BPMN elements.bpmnElementStyles
to define styles for BPMN elements has been added to the function documentation.To build the documentation
Closes #13