Cleanup the signup_status admin UI and provide status weights

dww - September 19, 2009 - 01:55
Project:Signup Status
Version:6.x-1.x-dev
Component:User interface
Category:task
Priority:normal
Assigned:dww
Status:closed
Description

Working with admin/settings/signup_status leaves a lot to be desired. ;) I'd like to fix it in the following ways:

A) There's no notion of a status weight, so there's no way to re-order the status options anywhere in the UI.

B) There's no easy way to edit multiple status at once. For example, if you have 10 status options and you want to mark N of them so that they don't appear on the signup form, you have to click 3*N times (with N page loads), instead of N+1 clicks with no page load.

So, I'd like to make admin/settings/signup_status itself be a tabledrag form, with a weight column, all of the things listed there as text fields (name, description) or drop-downs (modify signup count, show on signup form), remove the "edit" links, and add a blank row at the bottom for adding a new status...

#1

dww - September 19, 2009 - 03:22
Status:active» needs review

Pretty easy patch. I'm attaching screenshots of the new UI, plus a few screenies of the existing UI for comparison.

AttachmentSize
581846-1.signup_status_settings_new_ui.patch 14.84 KB
581846-1.signup_status_settings_new_ui.png 41.48 KB
581846-1.signup_status_settings_old_ui.png 36.57 KB
581846-1.signup_status_settings_old_ui.edit_.png 35.28 KB

#2

mlsamuelson - September 19, 2009 - 14:39
Status:needs review» reviewed & tested by the community

The patch applies cleanly and the schema updates executed without issue.

I tested out the UI and I experienced no errors or bugs.

Awesome UI improvement. It'll be a breeze setting up and modifying signup statuses with this UI, and the concept of weight is great to have.

If a default status ala #503368: Default Status on Signup is eventually worked into the UI, these changes will make it a lot easier to work with, too.

#3

ezra-g - September 19, 2009 - 16:10

This is a great improvement. Quick (low priority) question: Is it possible to modify the machine-readable name of the signup statuses anywhere?

#4

dww - September 19, 2009 - 18:24
Status:reviewed & tested by the community» fixed

Thanks for the reviews! Committed to HEAD.

ezra-g: There's no machine-readable name of the status. There's only a serial DB column for the status id, then the 'Name' field. As far as I can tell, the description isn't used anywhere in the code -- not sure what the intention is there. That's part of why I didn't care about making it a shorter text field instead of a multi-line text area. On the project issue status setting page UI (which I based this heavily on), the numeric status code is displayed (readonly) in the UI -- however, that's because there were times when the status code was actually visible in the UI (e.g. in GET params to issue queue queries), so I figured it was worth displaying there. In this case, no human ever needs to know what numeric status ID corresponds to any given status, so I just left it out.

#5

dww - September 20, 2009 - 09:19
Status:fixed» needs review

Playing with this a bit more, I wanted to add some help text (especially in light of #581826: Fix status "modify signup count" code to actually do something). I also wanted to visually handle the required form elements better, since it was a bit clunky before. It's a wee bit of a hack, but if you define the #title attributes on the form elements in the form builder, but unset them during the theme function when rendering the rows in the table, the table still looks normal, but form validation errors have the right wording. And, I just lifted the span used by core's theme_form_element() when marking required form fields and used that in the table header over the Name column. I think that works pretty well.

Attached patch implements the fixes, and screenshots showing off various aspects. There's also a "before" screenshot of how the code currently in HEAD looks when you try to set an existing status to a blank name...

p.s. It would potentially be nice if core provided that marker in its own theme function, see #582584: Move required form element marker into its own theme function if you're interested. ;)

AttachmentSize
581846-5.signup_status_settings_ui.patch 5.18 KB
581846-5.signup_status_settings_ui.png 41.99 KB
581846-5.signup_status_settings_ui.name-required.png 43.7 KB
581846-5.signup_status_settings_ui.new-status-name-required.png 44.97 KB
581846-5.signup_status_settings_ui.before.png 25.51 KB

#6

mlsamuelson - September 20, 2009 - 23:18
Status:needs review» reviewed & tested by the community

Works as advertised. I like the addition of help text.

#7

dww - September 20, 2009 - 23:33
Status:reviewed & tested by the community» fixed

Based on a little more IRC discussion, we decided to add a line explaining why the order in this table matters. The help text is now:

This table defines the signup status options available on this site. If the 'Modify signup count' box is checked, signups in that status will be counted towards the signup limit (if any). Note that changing this value once signups exist will update those signups and potentially open or close signups on the affected event(s). If the 'Show on form' box is checked, users will have the option of selecting the status when they signup or edit an existing signup. The order of statusus in this table determines the ordering choices on the signup form (if any are shown). The blank row at the bottom can be used to add a new status.

Committed to HEAD.

#8

System Message - October 4, 2009 - 23:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.