In general the goal is to replace ctools functionality to be able to remove the dependency.

So this issue will be about removing the #dependency and replacing it with #states.

Comments

dawehner’s picture

StatusFileSize
new44.28 KB

Here is some ongoing work.

Note: Some of them are converted, some of the are converted, but still has commented out #depedency. These are the ones which don't work at the moment.

dawehner’s picture

StatusFileSize
new64.49 KB

Some more work. Especially #1149078: States API doesn't work with multiple select fields would be helpful to solve a lot of the remaining issues.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new84.57 KB

Okay finally got it working for all cases beside the preview settings under admin/structure/views/settings

dawehner’s picture

Status: Needs review » Needs work
+++ b/handlers/views_handler_filter.incundefined
@@ -357,8 +357,11 @@ class views_handler_filter extends views_handler {
+        // @todo: the checkbox is outside but the textfield is inside of the fieldset?

Remove this todo, this is intended as the operator identifier is an advanced settings which belongs into the fieldset.

+++ b/plugins/views_plugin_display.incundefined
@@ -1477,17 +1477,23 @@ class views_plugin_display extends views_plugin {
+          '#states' => array(
+            'visible' => array(
+              array(
+                ':input[name="use_more"]' => array('checked' => TRUE),
+              ),

This additional array is not required here.

tim.plunkett’s picture

Issue tags: +VDC

Tagging.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new84.44 KB

Just fixes the two mentions in #4

bojanz’s picture

I remember us nearly managing to convert Views to #states in the D7-port era :)
Big and boring-to-do patch. Good job.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Absolutely incredible. I tested a couple of the noticeably complicated parts (replacement patterns, mostly) and read through the whole patch. Looks damn good!

The tests won't pass for now, and they don't really test this anyway.

dawehner’s picture

Status: Reviewed & tested by the community » Active
Issue tags: +Novice, +Needs change record

Thanks for testing!

It seems to make sense to write change notes about that, so people will know that they better should convert it.

tim.plunkett’s picture

Does that mean you committed this already? It seems you didn't push.

dawehner’s picture

I rechecked and at least now it should be pushed.

bojanz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xjm’s picture

Status: Closed (fixed) » Active

Setting back to active for the change notice :)

tim.plunkett’s picture

Status: Active » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.