The elements of the RemoteImageWidget appear on the same level as all the other fields of the entity form, making it difficult to differentiate them.

It would be better if the field is rendered in a similar way to the link field, which uses a fieldset as container.

Comments

tucho created an issue. See original summary.

tucho’s picture

Status: Active » Needs review
StatusFileSize
new800 bytes

The LinkWidget uses a fieldset when the link's title is not disabled:

       if ($this->getFieldSetting('title') == DRUPAL_DISABLED) {
         $element['uri']['#title'] = $element['#title'];
         ...
       }
       // Otherwise wrap everything in a details element.
       else {
         $element += [
           '#type' => 'fieldset',
         ];
       }

The RemoteImageItem disables the link title, so the dieldset wrapper is not used.

I uploaded a patch that restores the logic of the LinkWidget, using a fieldset as container for the widget fields.

tucho’s picture

StatusFileSize
new1.05 KB
new534 bytes

I uploaded a new patch that also delete two widget settings: placeholder_width and placeholder_height, which are not used anywhere.

There is also a trivial interdiff.

gaurav.kapoor’s picture

Status: Needs review » Reviewed & tested by the community

The form widget looks much better after these changes. Thanks

  • gaurav.kapoor committed 9495fce on 8.x-1.x authored by tucho
    Issue #2987323 by tucho, gaurav.kapoor: Improve the presentation of the...
gaurav.kapoor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.