Problem/Motivation

In #3123832: [META] Fix @todo items referencing closed issues we've discovered there's a @todo in core/themes/claro/claro.theme.
This @todo is linked to an d.o. issue that is already closed: #2892304: Introduce footer region to ContentEntityForm.

This is the @todo:

/**
 * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\media\MediaForm.
 */
function claro_form_media_form_alter(&$form, FormStateInterface $form_state) {
  // Only attach CSS from core if this form comes from Media core, and not from
  // the contrib Media Entity 1.x branch.
  if (\Drupal::moduleHandler()->moduleExists('media') && $form_state->getFormObject() instanceof MediaForm) {
    // @todo Revisit after https://www.drupal.org/node/2892304 is in. It
    // introduces a footer region to these forms which will allow for us to
    // display a top border over the published checkbox by defining a
    // media-edit-form.html.twig template the same way node does.
    $form['#attached']['library'][] = 'claro/media-form';
  }
}

Steps to reproduce

Proposed resolution

We need to decide if the approach described in the @todo is still a valid one and if so, we can repurpose this issue to implement it.

If the approach is outdated, we should delete the @todo.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Spokje created an issue. See original summary.

spokje’s picture

Version: 11.0.x-dev » 10.0.x-dev
spokje’s picture

Pinged @lauriii and @bnjmnm in Slack (https://drupal.slack.com/archives/C1BMUQ9U6/p1675067220264019?thread_ts=...) for Claro maintainer guidance:

Version: 10.0.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.