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 management UI changes 3] Reduce usage of edit handlers for workflow management #6172

Conversation

kaedroho
Copy link
Contributor

@kaedroho kaedroho commented Jun 23, 2020

Separated from: #6157
Based on: #6171

  • Convert tasks to use plain Django forms
  • Bury usage of edit handlers into workflow views to make it in internal implementation detail that we can change later

@squash-labs
Copy link

squash-labs bot commented Jun 23, 2020

Manage this branch in Squash

Test this branch here: https://kaedrohofeatureworkflow-reduce-4o3jq.squash.io

@kaedroho kaedroho changed the title [Workflow management UI changes 3/n] Reduce usage of edit handlers for workflow management [Workflow management UI changes 3] Reduce usage of edit handlers for workflow management Jun 23, 2020
@kaedroho kaedroho force-pushed the feature/workflow-reduce-edit-handlers branch 3 times, most recently from c10b1a8 to 1e1882f Compare June 23, 2020 14:37
@kaedroho kaedroho force-pushed the feature/workflow-reduce-edit-handlers branch 2 times, most recently from 2baef25 to 9b1bc7b Compare June 25, 2020 11:02
Copy link
Contributor

@zerolab zerolab left a comment

Choose a reason for hiding this comment

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

👍 for moving away internalizing the workflow edit_handlers.

The documentation does need updating to reflect the changes, though!

wagtail/admin/forms/workflows.py Outdated Show resolved Hide resolved
wagtail/core/models.py Show resolved Hide resolved
kaedroho and others added 6 commits June 25, 2020 13:44
…cific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.
Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)
…cludes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>
Co-authored-by: Dan Braghis <dan@zerolab.org>
@kaedroho kaedroho force-pushed the feature/workflow-reduce-edit-handlers branch from 3243655 to ea8c5ba Compare June 25, 2020 12:45
@zerolab zerolab merged commit c3c4403 into wagtail:feature/workflow Jun 25, 2020
@kaedroho kaedroho deleted the feature/workflow-reduce-edit-handlers branch June 25, 2020 13:56
zerolab added a commit to zerolab/wagtail that referenced this pull request Jun 26, 2020
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
zerolab added a commit that referenced this pull request Jun 26, 2020
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
gasman pushed a commit that referenced this pull request Jul 8, 2020
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
gasman pushed a commit to gasman/wagtail that referenced this pull request Jul 24, 2020
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
gasman pushed a commit that referenced this pull request Jul 24, 2020
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b7.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
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.

None yet

2 participants