Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Workflow: Allow shapes to be set for places and transitions in dumpers #42620

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

Closed
gisostallenberg opened this issue Aug 18, 2021 · 7 comments
Closed

Comments

@gisostallenberg
Copy link
Contributor

Description
I would like to be able to set the shape of a place or transition. In Graphviz this could be done by changing 'shape' in the dumper based on the metadata attributes (e.g. to 'diamond'). I'm not sure about the mermaid and plant uml implementation possibilities, but if possible I'm willing to provide a PR. First I wanted to check if you are interested in such a feature and what sollution path to take. One way to address this issue is to introduce a set of style classes: (Graphviz|Mermaid|PlantUml|)(Transition|Place)DumperStyle(|Interface), which can handle the metadata and transform it into the proper style. Another way is to just add more of the parsing of the attributes in the various dumpers, which could get cluttered.

@lyrixx
Copy link
Member

lyrixx commented Nov 29, 2021

Hello,

I totally missed you comment :/ I'm sorry for the delay!

We already use some metadata information for the rendering: https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php#L80

So I guess it's fine to continue this way.

So you can open a new PR for this new feature :)

Thanks

@gisostallenberg
Copy link
Contributor Author

Hi @lyrixx,

Thanks for your response (better a bit later than never πŸ˜„ ).
As I understand from your reply you think it is ok to just add this only to the GraphvizDumper? Or should I provide it for the others also?
How about a style_attributes metadata property which would be the base for the attributes, in which the 'old' properties (like bg_color) overwrite (for BC purposes), but the defaults like shape can be overridden? Or would you rather have a shape metadata which defaults to 'box'? This is not very flexible, though.

@lyrixx
Copy link
Member

lyrixx commented Nov 30, 2021

As I understand from your reply you think it is ok to just add this only to the GraphvizDumper? Or should I provide it for the others also?

It's up to you. This is not an issue to support feature on one dumper only.

How about a style_attributes metadata property which would be the base for the attributes, in which the 'old' properties (like bg_color) overwrite (for BC purposes), but the defaults like shape can be overridden? Or would you rather have a shape metadata which defaults to 'box'? This is not very flexible, though.

I don't really know. What would be the best for you as a user?

Note: IIRC, this has already been discussed in a previous PR. I let you search for it :)

@gisostallenberg
Copy link
Contributor Author

@lyrixx I think I found the specific comment (did not take me 3 days 😎): #29538 (comment)
Then your opinion was "Let's be simple πŸ‘πŸ½ ", so not adding an additional level in the metadata. So I will just add the possibility to set the shape under metadata and add tests.

@lyrixx
Copy link
Member

lyrixx commented Mar 22, 2022

Hello.

The feature freeze is coming. Do you still want to contribute to Symfony to add this?

If you don't want anymore, or if you don't have time, this is not a problem. You can close this issue :)

@gisostallenberg
Copy link
Contributor Author

@lyrixx Currently the focus in a project I want to add this for is not on the workflow implementation.
For me it is both fine if this is closed or left open.

@lyrixx
Copy link
Member

lyrixx commented Mar 24, 2022

OK, I'm closing this issue because I don't think it useful to keep it open.

But if you have time, don't hesitate to open a new PR.

Thanks for the discussion

@lyrixx lyrixx closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants