-
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(style)!: refactor how to build the overlay style #245
Conversation
- 'create_style' becomes 'create_overlay_style'
♻️ PR Preview b561330 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.
refactor!: simplify the construction of the overlay style
for the PR title.
The commit used to merge the PR must also mention it and the release notes as well.
See https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-both--and-breaking-change-footer
I don't know how breaking changes have to be handled in the R ecosystem. This is something that should be checked IMHO.
I don't see any problem for introducing breaking changes in general. Can you please give me an example of the future "style update" functions to let me understand how the refactoring help for the new API?
In parallel, I am reviewing the details of the code changes.
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.
Very good job 💪🏿, and thank you for your efforts to improve our documentation.
I made some minor suggestions but the most important things to me is about handling the breaking changes introduced by this PR.
@@ -38,35 +38,38 @@ | |||
#' # Load the BPMN file | |||
#' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualizationR") | |||
#' | |||
#' # Display the BPMN diagram | |||
#' # Example 1: Display the BPMN diagram |
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.
praise: Nice, this makes things easier to understand when reading the documentation.
#' Refer to the \code{font} parameter in the \code{\link{create_style}} function for more information. | ||
#' | ||
#' Use this function to create the correct font structure for an overlay. | ||
#' - Overlay: |
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.
question: I guess this is added to prepare the new "update style" API?
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.
Indeed 😊
c51164c
to
41db251
Compare
To address issue #13 efficiently and avoid creating separate functions for creating
font
,fill
andstroke
styles foroverlay
,edge
andshape
, I refactored the existing code.As part of this refactoring, I've converted the
create_font
,create_fill
andcreate_stroke
functions to internal functions.This enhancement allows these functions to accept additional parameters as needed. The responsibility for passing the appropriate parameters to these functions now rests with the functions dedicated to overlays (
create_overlay_style
), edges, and shapes.BREAKING CHANGE:
create_font
,create_fill
andcreate_stroke
functions are internal functions.create_style
has been renamed increate_overlay_style
, and now, we use only this function to create the style of an overlay.