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.
Comments
Comment #2
spokjeComment #3
spokjePinged @lauriii and @bnjmnm in Slack (https://drupal.slack.com/archives/C1BMUQ9U6/p1675067220264019?thread_ts=...) for Claro maintainer guidance: