diff --git a/core/modules/field_ui/config/tour.tour.field-ui-display.yml b/core/modules/field_ui/config/tour.tour.field-ui-display.yml new file mode 100644 index 0000000..348652f --- /dev/null +++ b/core/modules/field_ui/config/tour.tour.field-ui-display.yml @@ -0,0 +1,39 @@ +id: field-ui-display +label: Field UI display +module: field_ui +langcode: en +paths: + - admin/structure/types/manage/*/display +tips: + introduction: + id: introduction + plugin: text + label: Manage display + body:

This page is used to manage how the fields from 'Manage fields' will be displayed on different parts of your site.

Tasks that can be performed include:

+ weight: "0" + display-modes: + id: display-modes + plugin: text + label: Display modes + body:

Display modes allow for content to be viewed in many different ways.

eg. The content type's content on a page will different to a smaller subset of content displayed in a list.

+ weight: "1" + location: left + attributes: + data-class: 'tabs.secondary li:first' + format: + id: format + plugin: text + label: Formats + body:

Formats are used to display field information in different ways.

eg. Tags can be display in plain text or link form.

+ weight: "2" + attributes: + data-class: 'html #field-display-overview .format' + custom-display-settings: + id: format + plugin: text + label: Custom display settings + body:

Allow for addition settings that other modules use to extend field display functionality.

Core provides the ability to enable additional view modes.

+ weight: "3" + location: top + attributes: + data-id: 'edit-modes' diff --git a/core/modules/field_ui/config/tour.tour.field-ui-fields.yml b/core/modules/field_ui/config/tour.tour.field-ui-fields.yml new file mode 100644 index 0000000..725834b --- /dev/null +++ b/core/modules/field_ui/config/tour.tour.field-ui-fields.yml @@ -0,0 +1,37 @@ +id: field-ui-fields +label: Field UI fields +langcode: en +module: field_ui +paths: + - admin/structure/types/manage/*/fields +tips: + introduction: + id: introduction + plugin: text + label: Manage fields + body:

This page is used to manage fields that are assigned to a specific content type.

Tasks that can be performed include:

+ weight: "0" + field-type: + id: field-type + plugin: text + label: Field type + body:

The field type is the type of data that this field will store.

eg. A list of items.

+ weight: "1" + attributes: + data-class: 'html #field-overview th.field-type' + add-new-field: + id: add-new-field + plugin: text + label: Add new field + body: To create a new field a label, type and widget need to be provided. The label field will automatically fill out the machine name field. While the Field Type will filter the Widget dropdown. + weight: "3" + attributes: + data-id: edit-fields-add-new-field-label + add-existing-field: + id: add-existing-field + plugin: text + label: Add existing field + body: Previously created fields can be reused on other content types. This allows for consistency across content type forms. + weight: "4" + attributes: + data-id: edit-fields-add-existing-field-label diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php index c900c04..5b6844a 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php @@ -106,7 +106,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, '#header' => array( $this->t('Label'), $this->t('Machine name'), - $this->t('Field type'), + array('data' => $this->t('Field type'), 'class' => 'field-type'), $this->t('Operations'), ), '#regions' => $this->getRegions(), diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUITourTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUITourTest.php new file mode 100644 index 0000000..35f615e --- /dev/null +++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUITourTest.php @@ -0,0 +1,94 @@ + 'Field UI tour tests', + 'description' => 'Tests the Field UI tour.', + 'group' => 'Tour', + ); + } + + protected function setUp() { + parent::setUp(); + // Create test user. + $admin_user = $this->drupalCreateUser(array( + 'access content', + 'administer content types', + 'administer node fields', + 'administer node form display', + 'administer node display', + 'administer users', + 'administer user display', + 'bypass node access', + 'access tour', + )); + $this->drupalLogin($admin_user); + + // Create content type, with underscores. + $type_name = strtolower($this->randomName(8)) . '_test'; + $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name)); + + // Create a field instance so we can check the add existing field tip. + $field = entity_create('field_entity', array( + 'field_name' => drupal_strtolower($this->randomName()), + 'type' => 'text', + 'settings' => array( + 'max_length' => '255', + ), + )); + $field->save(); + + entity_create('field_instance', array( + 'field_name' => $field->id(), + 'entity_type' => 'node', + 'bundle' => $type_name, + ))->save(); + + // Create a second content type. + $type_name = strtolower($this->randomName(8)) . '_test'; + $type = $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name)); + $this->typeName = $type->type; + } + + /** + * Tests field_ui tour tip availability. + */ + public function testFieldUiTourTips() { + $this->drupalGet('/admin/structure/types/manage/' . $this->typeName . '/fields'); + $this->assertTourTips(); + } +} diff --git a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php b/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php index ab1f07f..df208e2 100644 --- a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php +++ b/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php @@ -29,7 +29,7 @@ class FilterTestReplace extends FilterBase { */ public function process($text, $langcode, $cache, $cache_id) { $text = array(); - $text[] = 'Filter: ' . $this->getLabel() . ' (' . $this->getPluginId() . ')'; + $text[] = 'Filter: ' . $this->getLabel() . ' (' . $this->getPluginID() . ')'; $text[] = 'Language: ' . $langcode; $text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled'); if ($cache_id) { diff --git a/core/modules/tour/css/tour.module.css b/core/modules/tour/css/tour.module.css index afb0afd..42e8c34 100644 --- a/core/modules/tour/css/tour.module.css +++ b/core/modules/tour/css/tour.module.css @@ -44,3 +44,7 @@ .toolbar .tour-toolbar-tab.toolbar-tab.hidden { display: none; } + +.joyride-tip-guide ul { + margin: 0; +} diff --git a/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php index ae22b30..cf98e07 100644 --- a/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php +++ b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php @@ -38,7 +38,7 @@ public function assertTourTips($tips = array()) { // Get the rendered tips and their data-id and data-class attributes. if (empty($tips)) { // Tips are rendered as
  • elements inside
      . - $rendered_tips = $this->xpath('//ol[@id = "tour"]//li'); + $rendered_tips = $this->xpath('//ol[@id = "tour"]//li[starts-with(@class, "tip")]'); foreach ($rendered_tips as $rendered_tip) { $attributes = (array) $rendered_tip->attributes(); $tips[] = $attributes['@attributes'];