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

[Workflow] Add colors to workflow dumps #29538

Merged
merged 1 commit into from Mar 19, 2019

Conversation

@alexislefebvre
Copy link
Contributor

alexislefebvre commented Dec 9, 2018

Fixes #28874

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #28874, replaces #28933
License MIT
Doc PR TODO, requires symfony/symfony-docs#9476

Fetch data with the MetadataStore from #26092 in order to add colors to the dumps.

Example of configuration:

            transitions:
                submit:
                    from: start
                    to: travis
                    metadata:
                        title: transition submit title
                        dump_style:
                            label: 'My custom label'
                            arrow_color: '#0088FF'
                            label_color: 'Red'

This code was developed as a bundle, examples can be found on its repository: https://github.com/alexislefebvre/SymfonyWorkflowStyleBundle

@alexislefebvre alexislefebvre changed the title Add colors to workflow dumps [Workflow] Add colors to workflow dumps Dec 9, 2018

@alexislefebvre alexislefebvre requested a review from lyrixx as a code owner Dec 9, 2018

@nicolas-grekas nicolas-grekas added this to the next milestone Dec 9, 2018

@lyrixx
Copy link
Member

lyrixx left a comment

I did not tested it, but It's a very good start

@alexislefebvre

This comment has been minimized.

Copy link
Contributor Author

alexislefebvre commented Dec 13, 2018

The last two examples on this page shows the dot format, with multiple_state, transitions are displayed as square instead of arrows with texts.

So the option background_color is used instead of arrow_color because it's meaningless in this context. I still have to find a limited number of parameters that would allow styling states and transitions with state machines and workflows.

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from 03eb8fe to 31e9564 Dec 15, 2018

@alexislefebvre

This comment has been minimized.

Copy link
Contributor Author

alexislefebvre commented Dec 30, 2018

Can someone please remove the Deprecation tag? I forgot to change the value when creating the PR.

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from 31e9564 to 0b54bcb Dec 30, 2018

@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Jan 25, 2019

rebase needed due to short arrays.

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch 6 times, most recently from 4698c38 to ebe5385 Feb 5, 2019

@alexislefebvre

This comment has been minimized.

Copy link
Contributor Author

alexislefebvre commented Feb 5, 2019

Thanks for hint, the PR has been rebased.

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 4, 2019

@lyrixx I think we need your help to move forward here.

@lyrixx lyrixx added the Workflow label Mar 13, 2019

@lyrixx

lyrixx approved these changes Mar 13, 2019

Copy link
Member

lyrixx left a comment

👍

@lyrixx

This comment has been minimized.

Copy link
Member

lyrixx commented Mar 13, 2019

Thanks @alexislefebvre . This is very Good. Could you rebase before the merge ? (I think this will conflict with #30468 but I will take care of it).

Could someone review English textes (PHP Doc, Changelog)? 🙏 Thanks

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from ebe5385 to e12babf Mar 13, 2019

@alexislefebvre

This comment has been minimized.

Copy link
Contributor Author

alexislefebvre commented Mar 13, 2019

Rebase done. ✔️

Thanks for the follow-up.

configuration of places is:
`label` and `description` (only for PUML) (text), `bg_color` (`#RRGGBB` or CSS color name)
and configuration of transitions is:
`label` (text), `color` and `arrow_color` (`#RRGGBB` or CSS color name)

This comment has been minimized.

@fabpot

fabpot Mar 14, 2019

Member

Instead of describing in plain English, I suggest to write a PHP example on how to use the new feature, it should be more effective.

This comment has been minimized.

@alexislefebvre

alexislefebvre Mar 14, 2019

Author Contributor

Ok, we can take examples from the test file: https://github.com/symfony/symfony/pull/29538/files?file-filters%5B%5D=.md&file-filters%5B%5D=.php#diff-f7d48f660a821958cbe877f5eb738de5

And this part should be moved to the documentation.

This comment has been minimized.

@lyrixx

lyrixx Mar 16, 2019

Member

let's do it!

This comment has been minimized.

@alexislefebvre

alexislefebvre Mar 17, 2019

Author Contributor

It's done.

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from 84a0553 to 4d313e5 Mar 17, 2019

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from 4d313e5 to 0a59b50 Mar 18, 2019

@fabpot

fabpot approved these changes Mar 19, 2019

@fabpot fabpot force-pushed the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch from 0a59b50 to 60ad109 Mar 19, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 19, 2019

Thank you @alexislefebvre.

@fabpot fabpot merged commit 60ad109 into symfony:master Mar 19, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Mar 19, 2019

feature #29538 [Workflow] Add colors to workflow dumps (alexislefebvre)
This PR was squashed before being merged into the 4.3-dev branch (closes #29538).

Discussion
----------

[Workflow] Add colors to workflow dumps

Fixes #28874

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28874, replaces #28933
| License       | MIT
| Doc PR        | TODO, requires symfony/symfony-docs#9476

Fetch data with the `MetadataStore` from #26092 in order to add colors to the dumps.

Example of configuration:

```yaml
            transitions:
                submit:
                    from: start
                    to: travis
                    metadata:
                        title: transition submit title
                        dump_style:
                            label: 'My custom label'
                            arrow_color: '#0088FF'
                            label_color: 'Red'
```

This code was developed as a bundle, examples can be found on its repository: https://github.com/alexislefebvre/SymfonyWorkflowStyleBundle

Commits
-------

60ad109 [Workflow] Add colors to workflow dumps

@alexislefebvre alexislefebvre deleted the alexislefebvre:28874-add-colors-to-workflow-dumps-2 branch Mar 19, 2019

@pbowyer pbowyer referenced this pull request Mar 23, 2019

Open

[WiP] Document Workflow 4.3 changes #11211

1 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.