Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Active » Needs review
Related issues: +#1843224: Convert Views Ajax commands to new Ajax API
FileSize
6.65 KB

Suppose better leave this method protected and no idea about better name

dawehner’s picture

Issue tags: +VDC
FileSize
9.82 KB

@andypost
Your patch is totally fine and is the way how much of the code got converted.

Here is an alternative approach which decouples the code more and provides a form wrapper which is orthogonal.

andypost’s picture

Patch looks awesome! let's see do we have a tests for this class because

+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php
@@ -89,7 +91,6 @@ public function getForm(ViewStorageInterface $view, $display_id, $js) {
-    \Drupal::moduleHandler()->loadInclude('views', 'inc', 'includes/ajax');

this line was missed, so probably testing should fail

dawehner’s picture

FileSize
6.63 KB
15.27 KB

Good catch! Decided also to write a little unit test.

andypost’s picture

RTBC +1

damiankloip’s picture

Title: Move views/includes/ajax.inc to views_ui module » Move views/includes/ajax.inc to a class in views_ui module
Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
git ac https://drupal.org/files/issues/vdc-2146473_0.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15640  100 15640    0     0  13929      0  0:00:01  0:00:01 --:--:-- 16585
error: patch failed: core/modules/views/includes/ajax.inc:1
error: core/modules/views/includes/ajax.inc: patch does not apply
damiankloip’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
15.29 KB

Rerolled

damiankloip’s picture

8: 2146473-8.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 8: 2146473-8.patch, failed testing.

The last submitted patch, 8: 2146473-8.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review

8: 2146473-8.patch queued for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Let's get it out.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, once again no longer applies.

dawehner’s picture

Status: Needs work » Needs review
FileSize
15.29 KB

Here is one.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

back to rtbc

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Needs yet another reroll...

git ac https://drupal.org/files/issues/vdc-2146473_1.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15657  100 15657    0     0  11596      0  0:00:01  0:00:01 --:--:-- 14457
error: patch failed: core/modules/views/includes/ajax.inc:1
error: core/modules/views/includes/ajax.inc: patch does not apply
damiankloip’s picture

Status: Needs work » Needs review
FileSize
15.38 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch, 18: 2146473-18.patch, failed testing.

dawehner’s picture

----

damiankloip’s picture

Status: Needs work » Needs review
FileSize
15.48 KB
595 bytes

Status: Needs review » Needs work

The last submitted patch, 21: 2146473-21.patch, failed testing.

andypost’s picture

Issue tags: +Needs reroll
vprocessor’s picture

Assigned: Unassigned » vprocessor
vprocessor’s picture

Assigned: vprocessor » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
17.74 KB

Hello guys,

reroll is ready

vprocessor’s picture

Version: 8.0.x-dev » 8.2.x-dev
andypost’s picture

Status: Needs review » Reviewed & tested by the community

+2 rtbc

damiankloip’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/views_ui/tests/Drupal/views_ui/Tests/Form/Ajax/FormWrapperTest.php
    @@ -0,0 +1,180 @@
    +  if (!function_exists('drupal_add_library')) {
    

    This can also be removed and converted.

  2. +++ b/core/modules/views_ui/views_ui.module
    @@ -114,6 +114,62 @@ function views_ui_theme() {
    +function views_ui_permission() {
    

    This can be removed.

  3. +++ b/core/modules/views_ui/views_ui.module
    @@ -114,6 +114,62 @@ function views_ui_theme() {
    +function views_ui_library_info() {
    

    And this.

vprocessor’s picture

Assigned: Unassigned » vprocessor
vprocessor’s picture

ok, will do it

vprocessor’s picture

vprocessor’s picture

Assigned: vprocessor » Unassigned
vprocessor’s picture

Assigned: Unassigned » vprocessor
Status: Needs review » Needs work
andypost’s picture

You missed to remove ajax.inc in patch

+++ b/core/modules/views_ui/tests/Drupal/views_ui/Tests/Form/Ajax/FormWrapperTest.php
@@ -0,0 +1,172 @@
\ No newline at end of file

nit

andypost’s picture

There's no such file like issue title said but there's http://cgit.drupalcode.org/drupal/tree/core/modules/views_ui/admin.inc - the last include in views

andypost’s picture

Assigned: vprocessor » Unassigned
Status: Needs work » Needs review

Quick research returns http://cgit.drupalcode.org/drupal/commit/?id=7b83db3
So #2303761: Move views_ajax_form_wrapper() to ViewsFormBase fixed the issue
Suppose we need to re-title this one about adding new tests

andypost’s picture

Assigned: Unassigned » damiankloip

@damiankloip any idea what to do with the issue

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Postponed
Issue tags: +Needs subsystem maintainer review

Postponing for subsystem feedback.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.