I've heard noises about people wanting to make big sweeping changes to Field UI. In case that doesn't happen, I've seen some smaller changes I've seen in designs by Noyz that I think it makes sense to implement:

- move the "required" checkbox below the description
- move the Delete tab to a button, the way it is on node forms
- rename the Field settings fieldset to "Global settings" when it's on the same page as the instance settings

Patch and screenshots forthcoming.

Comments

ksenzee’s picture

Status: Active » Needs review
StatusFileSize
new3.06 KB
new21.64 KB
new32.3 KB

Screenshots:

Required field checkbox is now below the description, to keep the label and description together

The field settings fieldset is now called Global settings and is collapsed by default. The Delete tab has been turned into a button called Delete field and lives to the right of the Save settings button.

ksenzee’s picture

Issue tags: +Usability

Tagging.

ksenzee’s picture

StatusFileSize
new73.18 KB
new37.52 KB

aspilicious requested before screenshots in IRC so here they are:

We currently have a Delete tab, not a delete button, and the Required field checkbox is hanging out between the label and the description.

The fieldset with field-wide settings is expanded and not clearly labeled as belonging to all instances of this field.

aspilicious’s picture

Looking at the code and the screenshots I think this is a major +1.
I hate those long pages.

Bojhan’s picture

I think this makes a lot of sense, if yched confirms the code it can be moved to RTBC quickly. You might want to add "no actions" as tabs as guideline to http://drupal.org/node/1089894 .

Noyz’s picture

It would also be good if we could shrink the size of help text down to 1 row - 2 max. Brief, succinct statements will go a long way towards helping people use Drupal.

yoroy’s picture

Another thumbs up for this. I'll gladly rewrite UI strings in a follow-up (other! ;-) issue.

yched’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.13 KB
new3.39 KB

The proposed changes are fine by me. Note that the "Global settings" section should supposedly be on its way out in D8 - was too late to do it in D7.

Changed 2 nitpicky stuff :
- 'required' / 'description' form elements : instead of just changing weights, swapped the code blocks so that the code flow follows the form flow.
- for visual code consistency, expanded the $form['actions']['submit'] definition as well.

That's only code formatting (interdiff attached), so pushing to RTBC.

ksenzee’s picture

yched's changes look good to me as well.

dries’s picture

For a proper clean-up, shouldn't we get rid of the delete page callback too?

aspilicious’s picture

@@ -138,7 +138,7 @@ function field_ui_menu() {
             'title' => 'Delete',
             'page callback' => 'drupal_get_form',
             'page arguments' => array('field_ui_field_delete_form', $field_position),
-            'type' => MENU_LOCAL_TASK,
+            'type' => MENU_VISIBLE_IN_BREADCRUMB,
             'weight' => 10,
             'file' => 'field_ui.admin.inc',

Dries, I think this does the job by changing the menu item.

29 days to next Drupal core point release.

joachim’s picture

+++ b/modules/field_ui/field_ui.admin.inc
@@ -1865,11 +1868,32 @@ function field_ui_field_edit_form($form, &$form_state, $instance) {
 /**
+ * Handle the 'Delete' button on the field instance edit form.
+ */
+function field_ui_field_edit_form_delete_submit($form, &$form_state) {
+  $destination = array();
+  if (isset($_GET['destination'])) {
+    $destination = drupal_get_destination();
+    unset($_GET['destination']);
+  }
+  $instance = $form['#instance'];
+  $form_state['redirect'] = array('admin/structure/types/manage/' . $instance['bundle'] . '/fields/' . $instance['field_name'] . '/delete', array('query' => $destination));
+}
+
+/**

Just a side node to say that as a future clean-up, it would be nice to refactor this and node_form_delete_submit() in a FormAPI delete helper.

joachim’s picture

I've posted #1236780: generalize node_form_delete_submit() to a FormAPI helper -- which will need rerolling when this patch gets in.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

kika’s picture

It would also be good if we could shrink the size of help text down to 1 row - 2 max. Brief, succinct statements will go a long way towards helping people use Drupal.

What about "Let's Make All Help Text Fields 2 Rows Max Initiative"?

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