Problem/Motivation

The Type select used to be the one that controlled visibility of extra fields.

Now that we have a region field to do that, the only remaining value in the Type field is "Visible". There will never be anything else with the current code base, not until we add support for formatters or something like that for them.

The current field is pretty confusing, especially if you're used to it from 8.2 and previous versions because you try to use it to make an extra field visible or hide it. Which doesn't work anymore.

Proposed resolution

Hide or get rid of that field completely.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Status: Active » Needs review
FileSize
65.31 KB
45.43 KB

That seems to be all that's left of that field :)

Adding before/after screenshot. Happend to have a test flag enabled, so two extra fields, one visible and the other not. Pay notice how it says "Visible" but it's actually disabled :)

Before:

After:

Berdir’s picture

D'oh... patch... I'm getting old.

Status: Needs review » Needs work

The last submitted patch, 3: field-ui-remove-type-for-extra-fields-2824778-2.patch, failed testing.

pashupathi nath gajawada’s picture

Assigned: Unassigned » pashupathi nath gajawada

I am looking into it.

tim.plunkett’s picture

Status: Needs work » Reviewed & tested by the community
+++ b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php
@@ -497,17 +497,7 @@ protected function buildExtraFieldRow($field_id, $extra_field) {
-          '#options' => $this->getExtraFieldVisibilityOptions(),

@@ -829,18 +819,6 @@ public function getRowRegion($row) {
-  protected function getExtraFieldVisibilityOptions() {
-    return array(
-      'visible' => $this->t('Visible'),
-    );
-  }

I don't know how any of us thought this was a good idea in the other issue, of course a select with 1 option is silly.

That fail was unrelated:

Drupal\Tests\standard\Functional\StandardTest::testStandard
GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

  • xjm committed 92c1974 on 8.3.x
    Issue #2824778 by Berdir, tim.plunkett: Hide the "Type" select for extra...
xjm’s picture

LOL, this is pretty great. I think https://www.drupal.org/node/2801513 (which I just updated and published) covers this well enough.

Committed 92c1974 and pushed to 8.3.x. Thanks!

Status: Fixed » Closed (fixed)

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

tim.plunkett’s picture