Skip to content

[Workflow] Add colors to workflow dumps #29538

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

Merged

Conversation

alexislefebvre
Copy link
Contributor

@alexislefebvre 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
@nicolas-grekas nicolas-grekas added this to the next milestone Dec 9, 2018
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

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

@alexislefebvre
Copy link
Contributor Author

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 28874-add-colors-to-workflow-dumps-2 branch from 03eb8fe to 31e9564 Compare December 15, 2018 00:53
@alexislefebvre
Copy link
Contributor Author

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

@alexislefebvre alexislefebvre force-pushed the 28874-add-colors-to-workflow-dumps-2 branch from 31e9564 to 0b54bcb Compare December 30, 2018 16:36
@nicolas-grekas
Copy link
Member

rebase needed due to short arrays.

@alexislefebvre alexislefebvre force-pushed the 28874-add-colors-to-workflow-dumps-2 branch 6 times, most recently from 4698c38 to ebe5385 Compare February 5, 2019 00:57
@alexislefebvre
Copy link
Contributor Author

Thanks for hint, the PR has been rebased.

@fabpot
Copy link
Member

fabpot commented Mar 4, 2019

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

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

👍

@lyrixx
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 28874-add-colors-to-workflow-dumps-2 branch from ebe5385 to e12babf Compare March 13, 2019 21:57
@alexislefebvre
Copy link
Contributor Author

Rebase done. ✔️

Thanks for the follow-up.

@alexislefebvre alexislefebvre force-pushed the 28874-add-colors-to-workflow-dumps-2 branch from 84a0553 to 4d313e5 Compare March 17, 2019 22:57
@alexislefebvre alexislefebvre force-pushed the 28874-add-colors-to-workflow-dumps-2 branch from 4d313e5 to 0a59b50 Compare March 18, 2019 21:30
@fabpot fabpot force-pushed the 28874-add-colors-to-workflow-dumps-2 branch from 0a59b50 to 60ad109 Compare March 19, 2019 05:09
@fabpot
Copy link
Member

fabpot commented Mar 19, 2019

Thank you @alexislefebvre.

@fabpot fabpot merged commit 60ad109 into symfony:master Mar 19, 2019
fabpot added a commit that referenced this pull request Mar 19, 2019
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 28874-add-colors-to-workflow-dumps-2 branch March 19, 2019 09:44
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
fabpot added a commit that referenced this pull request Jul 8, 2019
…n (alexislefebvre)

This PR was submitted for the 4.4 branch but it was merged into the 4.3 branch instead (closes #32419).

Discussion
----------

[Workflow] Add missing test for workflow dump description

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

This PR add a test for a feature added in #29538 but missed a test.

Commits
-------

0c326d0 Add missing test for workflow dump description
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull request Jul 8, 2019
…alexislefebvre)

This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Explain how to style a workflow dump

Fixes symfony#11675

Explain what was added in symfony/symfony#29538

TODO:

- [x] Explain keys
- [x] Add YAML format
- [x] Add XML format
- [x] Add PHP format

Commits
-------

e6c1992 Workflow: explain how to style a workflow dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Workflow] Add colors to workflow dumps
9 participants