Use node edit form layout for other entity types The node edit form got a nice overhaul for Drupal 8's default admin theme, whereby a lot of the metadata fields like Revisions, Meta Tags, URL Aliases, Publish status, Promote status, etc are moved into a sidebar.

I'm using the Group module, and have enabled metatag integration and revisions via patch from #2829966.

Currently however the meta tags and revisions appear in a vertical tabs block at the bottom of the edit form, making the page extra long.

How can I get those items into a sidebar like the Node edit form does?
Drupal\node\NodeForm provides it own build() method that puts the meta items into an  advanced group, and then the classy template node-edit-form.html.twig renders that group in a sidebar. The form builder also attaches the node/drupal.node library, which provides the layout CSS.

To copy this layout and style for another entity, you could implement hook_form_alter in a custom module and move the metadata form items into an advanced group like NodeForm does. You also need to theme the form with the node_edit_form template and attach the node/drupal.node library.

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // Select the group add/edit form.
  if (in_array('group_form', $form['#theme'])) {
    // Use the node edit form template.
    $form['#theme'][] = 'node_edit_form';

    // Use the node form layout library.
    $form['#attached']['library'] = ['node/drupal.node'];

    // Create the advanced element if it doesn't exist.
    if (!isset($form['advanced'])) {
      $form['advanced'] = [
        '#type' =&gt; 'container',
        '#weight' =&gt; 99,
      ];
    }
    else {
      // Make 'advanced' a container instead of vertical_tabs.
      $form['advanced']['#type'] = 'container';
    }

    // Add the style class to tell the admin theme how to style it.
    $form['advanced']['#attributes']['class'][] = 'entity-meta';

    // Move detail elements into 'advanced'.
    $form['detail_element_you_want_to_move']['#group'] = 'advanced';
  }
}


Alternatively, you could create your own Twig template and library and use those instead of borrowing from node.