mglaman / drupal-change-record-triage

Used to triage Drupal change records to ensure phpstan-drupal, drupal-rector, and upgrade_status have appropriate issues.
MIT License
6 stars 0 forks source link

'dialogClass' is replaced with 'classes' in core dialog AJAX commands #762

Open github-actions[bot] opened 1 month ago

github-actions[bot] commented 1 month ago

https://www.drupal.org/node/3440844

Introduced in branch/version: 10.3.x / 10.3.0

When constructing a dialog AJAX command, passing $dialog_options['dialogClass'] is deprecated, and you should pass $dialog_options['classes'] instead.

Before

        '#attributes' => [
          'class' => ['use-ajax'],
          'data-dialog-type' => 'modal',
          'data-dialog-options' => Json::encode([
            'dialogClass' => 'no-close',
          ]),
        ],

After

'#attributes' => [
          'class' => ['use-ajax'],
          'data-dialog-type' => 'modal',
          'data-dialog-options' => Json::encode([
            'classes' => [
              'ui-dialog' => 'no-close',
            ],
          ]),
        ],
bbrala commented 1 month ago

Hmm, wonder if we should even try and start doing render array stuff.