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

Support Custom HTML in Workflow Notes #7667

Merged
merged 11 commits into from
Jan 11, 2021
Merged

Support Custom HTML in Workflow Notes #7667

merged 11 commits into from
Jan 11, 2021

Conversation

andreas-gruenwald
Copy link
Contributor

@andreas-gruenwald andreas-gruenwald commented Dec 3, 2020

This PR allows the configuration of renderers to dynamically output HTML markup in Workflow notes.

This is useful to show summaries and alike, before the user is actually going to commit the workflow change.

Example:
image

Notes can be placed on three different positions (top, center, bottom) for both transitions, and global actions.
A custom renderer service and a default position can be configured in the workflow configuration yml.

* @param $customHtmlService
*/
public function setCustomHtmlService($customHtmlService) {
if ($customHtmlService instanceof AbstractCustomHtmlService) {
Copy link
Contributor

Choose a reason for hiding this comment

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

instanceof CustomHtmlServiceInterface

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, no, actually that is fine.... But the AbstractCustomHtmlService should be a interface with it's extra functions, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean an additional interface for getTransitionName(), getActionName(), getPosition() and so forth?
Don't know if this is necessary, as those fields are intended to be mainly used within the class.

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure honestly... I always use separate interfaces, also for this use-cases. What if a custom Symfony (not Pimcore) Workflow tries to do this?

@dvesh3 dvesh3 merged commit df520ae into pimcore:master Jan 11, 2021
@dvesh3
Copy link
Contributor

dvesh3 commented Jan 11, 2021

@chilladelia thanks a lot!

dvesh3 added a commit that referenced this pull request Jan 11, 2021
dvesh3 added a commit that referenced this pull request Jan 11, 2021
@andreas-gruenwald andreas-gruenwald deleted the workflow-dynamics branch January 18, 2021 09:18
@andreas-gruenwald
Copy link
Contributor Author

Thanks for merging!

roland4432 pushed a commit to roland4432/pimcore that referenced this pull request Apr 1, 2021
* Support custom HTML in transition notes.

* Support global actions.

* Support global actions.

* Support multiple custom HTML labels within one renderer.

* Set default value for position.

* Correctly inject custom HTML service properties via compiler pass.

* Fix annotation.

* Improve comments.

* Add autowiring / fix build issue.

* Support workflow modal without note.

* Apply suggestions from code review

Co-authored-by: agruenwald <a.gruenw@gmail.com>
Co-authored-by: Divesh Pahuja <divesh.pahuja@pimcore.com>
roland4432 pushed a commit to roland4432/pimcore that referenced this pull request Apr 1, 2021
roland4432 pushed a commit to roland4432/pimcore that referenced this pull request Apr 1, 2021
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.

5 participants