As part of #2031717: Make entity module not required let's start with moving all UI related stuff to field_ui module. As discussed over there field ui module really is an entity UI module (besides the name which can be fixed at any time later on).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

effulgentsia’s picture

Priority: Normal » Major
Issue tags: +beta target
Parent issue: » #2031717: Make entity module not required

Raising priority to match that of the parent issue.

blueminds’s picture

Moving all UI related code basically means moving whole module as the entity module now deals only with form/view/display modes. Or am I missing something?

Bojhan’s picture

Shouldn't this just be Entity UI module then?

dixon_’s picture

Assigned: Unassigned » dixon_

I'll take a stab at this today at the extended code sprint in Austin.

dixon_’s picture

Status: Active » Needs review
FileSize
105.66 KB

Here's my first stab at this, put together on the flight home from Austin.

Status: Needs review » Needs work

The last submitted patch, 5: 2224395-move-entity-ui-to-field-ui-1.patch, failed testing.

dixon_’s picture

Status: Needs work » Needs review
FileSize
114.68 KB

Status: Needs review » Needs work

The last submitted patch, 7: 2224395-move-entity-ui-to-field-ui-2.patch, failed testing.

dixon_’s picture

Re-rolling to keep up with HEAD.

dixon_’s picture

Status: Needs work » Needs review
Berdir’s picture

fago’s picture

FileSize
112.92 KB
874 bytes

Noticed the patch does not apply any more - so re-rolled it to account for the menu links file name changes.

The patch looks good in general, however I'm wondering whether there is a reason that the permission has not been moved yet?

Status: Needs review » Needs work

The last submitted patch, 12: d8_entity_ui.patch, failed testing.

fago’s picture

Title: Move entity UI code to field_ui module » Move entity UI code to field_ui module and remove entity.module

#2031717: Make entity module not required is already ready and covers API changes so it should move first. Then, this one can do the rest (UI) and remove the module. Updating title.

swentel’s picture

Status: Needs work » Needs review
FileSize
30.59 KB

Display Modes doesn't show up yet at admin/structure - all the rest should be fine. Do we want to rename the prefixes in routing to field_ui as well ?

Status: Needs review » Needs work

The last submitted patch, 15: 2224395-15.patch, failed testing.

swentel’s picture

Status: Needs work » Needs review
FileSize
35.91 KB
17.55 KB

Should fix the test, menu items are available again. Renamed the prefixes to field_ui for now for consistency.

andypost’s picture

Assigned: dixon_ » Unassigned
Status: Needs review » Reviewed & tested by the community

looks good

andypost’s picture

The question of help here could be addressed in [2332687]

+++ /dev/null
@@ -1,70 +0,0 @@
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The Entity module manages various types of content and configuration for the website. This information is collectively know as "entities", which are grouped into "entity types" (such as the main site content, comments, custom blocks, taxonomy terms, user accounts, and views configuration). Some entity types are further grouped into sub-types (for example, you could have article and page content types within the main site content entity type, and tag and category vocabularies within the taxonomy term entity type); other entity types, such as user accounts, do not have sub-types.') . '</p>';
-      $output .= '<p>' . t('Content entity types store most of their text, file, and other information in fields. See the <a href="!field">Field module help</a> and the <a href="!field_ui">Field UI help</a> pages for general information on fields and how to create and manage them.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</p>';
-      $output .= '<p>' . t('Configuration entity types are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types. Configuration stored in this way can be exported, imported, and managed using the Configuration Manager module. See the <a href="!config-help">Configuration Manager module help</a> page for more information.', array('!config-help' => \Drupal::url('help.page', array('name' => 'config')))) . '</p>';
-      $output .= '<p>' . t('For more information, see the <a href="!entity_documentation">online documentation for the Entity module</a>.', array('!entity_documentation' => 'https://drupal.org/documentation/modules/entity')) . '</p>';
-      $output .= '<h3>' . t('Uses') . '</h3>';

this hook_help() part is removed here but it looks useful...

Berdir’s picture

Yeah, most of that explanation is about what entities are, which had never anything to do with this module, what I already tried to explain in the issue that added entity_help(). Agreed we shouldn't lose it and it should probably be addressed here not a follow-up.

With all code and concepts being moved to components, hook_help() and the current per-module help system simply doesn't work anymore ;)

swentel’s picture

+++ b/core/modules/field_ui/field_ui.module
@@ -48,6 +48,10 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<dt>' . t('Managing view modes') . '</dt>';
+      $output .= '<dd>' . t('Each content entity can have various "modes" for viewing. For instance, a content item could be viewed in full content mode on its own page, teaser mode in a list, or RSS mode in a feed. You can create, edit the names of, and delete view modes on the <a href="!view-modes">View modes page</a>. Once a view mode has been set up, you can choose and format fields for the view mode within each entity sub-type on the Manage display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!view-modes' => \Drupal::url('entity.entity_view_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
+      $output .= '<dt>' . t('Managing form modes') . '</dt>';
+      $output .= '<dd>' . t('Each content entity can have various editing forms appropriate for different situations, which are known as "form modes". For instance, you might want to define a quick editing mode that allows users to edit the most important fields, and a full editing mode that gives access to all the fields. You can create, edit the names of, and delete form modes on the <a href="!form-modes">Manage custom form modes page</a>. Once a form mode has been set up, you can choose which fields are available on that form within each entity sub-type on the Manage form display page. See the <a href="!field_ui">Field UI module help page</a> for more information.', array('!form-modes' => \Drupal::url('entity.entity_form_mode_list'), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '</dd>';
       return $output;

The part about managing view and form modes has been moved to field ui though. As Berdir also notes, the other help text is not relevant IMO.

swentel’s picture

Status: Reviewed & tested by the community » Needs work

man, this is wrong .. url('entity.entity_view_mode_list' should be field_ui. ..

swentel’s picture

Status: Needs work » Reviewed & tested by the community

Wait, that is fine (I copy pasted from the previous patch)

fago’s picture

Patch looks good, yep.

+++ b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php
rename from core/modules/entity/src/EntityFormModeListBuilder.php
rename to core/modules/field_ui/src/EntityFormModeListBuilder.php

How nice having no prefix foo changing everyhting!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 17: 2224395-17.patch, failed testing.

Berdir’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
35.9 KB

Patch applied fine with git apply -3.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

RIP Entity module, again.

  • catch committed 0391038 on 8.0.x
    Issue #2224395 by swentel, dixon_, Berdir, fago: Move entity UI code to...

Status: Fixed » Closed (fixed)

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