One of the most common complaint I've received from clients for the Subscriptions module is that the user subscriptions page is more convoluted than it should be. In multiple cases the clients suggested having all options on one page would have been a better solution than having subpages for each subscriptions type.

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new7.9 KB

This patch makes a few changes:

  • There's now a new option on the main Subscriptions settings page called "Use all-in-one user overview page" which lets you turn on the new functionality.
    • Each time this form is submitted it checks if this value has changed, and if so it rebuilds the menu cache.
  • Once the option is enabled, the user/:user/subscriptions subpages disappear and the overview page's summary information is replaced with each of the subpage forms.

A D6 patch will be easily to put together once you're happy with this :)

damienmckenna’s picture

StatusFileSize
new53.9 KB

FYI this is what the page looks like after the update (Bartik theme:

Example of how the page looks with the changes

salvis’s picture

Status: Needs review » Needs work

I like this idea, but it needs some refinement:

1. Having multiple [Save] buttons is confusing and is unlikely to work correctly. We'll need a single [Save] button at the bottom.

2. We have an option to hide the Overview page, with the following goals:
a) to reduce the number of tabs, possibly to one, if we only have one type of subscriptions, and
b) to remove the per-user settings.
Your all-in-one page covers a), and it needs to cover b) as well, and the option needs to be reworded to cover both cases.

3. Implementing both types of Overview pages in the same function makes this function overly complex and long, especially because it already does double duty. I would prefer to have a new subscriptions_page_user_combined() function that embeds the relevant parts subscriptions_page_user_overview().

Here are some preliminary comments based on a first look through your code. I'd like to have a third party review and test this, too.

+++ b/subscriptions.admin.inc
@@ -384,47 +384,74 @@ function subscriptions_page_form($form, &$form_state, $account, $stype) {
+  // Alternative UI to provide all subscriptions options on the overview page.

When reading from top to bottom, it does not make sense to read about the "alternative UI" before having encountered the normal one.

+++ b/subscriptions.admin.inc
@@ -384,47 +384,74 @@ function subscriptions_page_form($form, &$form_state, $account, $stype) {
+  if (variable_get('subscriptions_improved_overview', TRUE)) {

You're offering an inappropriate judgement here.

+++ b/subscriptions_ui.module
@@ -357,6 +357,16 @@ function subscriptions_ui_form_subscriptions_settings_form_alter(array &$form, a
+    '#default_value' => variable_get('subscriptions_improved_overview', FALSE),

This is the correct default, but on other occasions you pass TRUE (see above), leading to incoherent behavior as long as the variable is not set.

+++ b/subscriptions_ui.module
@@ -357,6 +357,16 @@ function subscriptions_ui_form_subscriptions_settings_form_alter(array &$form, a
+    '#description'   => t("By default the user subscriptions pages are split by type, this will merge all of these into the main overview page and removes the subpages."),

The text needs tuning and it should adapt to the style of the existing option descriptions.

+++ b/subscriptions_ui.module
@@ -357,6 +357,16 @@ function subscriptions_ui_form_subscriptions_settings_form_alter(array &$form, a
+  ¶

Trailing space.

damienmckenna’s picture

Assigned: Unassigned » damienmckenna

Working on it.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new8.53 KB

I've made all of the requested changes, please give it a try. I ended up merging the two different overview options into a single selector and the logic has been updated accordingly; an update script has been included to handle changing the existing variable.

salvis’s picture

I ended up merging the two different overview options into a single selector

Please explain. Maybe I was too fuzzy in #3, but I think these are two orthogonal settings:
-- multipage or combined
-- show settings or hide them

BTW, have you checked how this works with bulk adding/removing subscriptions from the user list? This functionality needs to continue to work, of course. I'm on the fence whether to offer combined mode for bulk operations. We could save the extra step with the [Done] button and return immediately to the user list, but this is a rare administrative function and maybe it's better not to cut any corners. What do you think?

damienmckenna’s picture

@salvis: The patch changes the "hide overview" option to be a selector with the following options:

  • Show the overview page and individual settings pages (default).
  • Hide the overview page from your users but show individual pages.
  • Show a single page that combines all user settings in one.

You can change as many different checkboxes as you wish, each subform still behaves correctly.

salvis’s picture

Let's not call the per-content-type subscription pages "settings pages." Subscriptions are not settings and there are no settings on those pages. The only page that has settings is the Overview page, in the bottom part.

Have you looked at admin/config/system/subscriptions/userdefaults? Do we agree that this will not be available for combining?

I'm sure someone will come along who likes to have all subscription types on the combined page but who doesn't want to expose any of the settings to his users. So, sorry, but I disagree with your decision to use a 'select' element. What we need on admin/config/system/subscriptions/userdefaults is two checkboxes:

[  ] Hide the Overview page from your users
...
[  ] Combine all subtabs into one single page
If you combine the subtabs, the settings from the Overview page will appear at the bottom of the combined page, unless you've hidden the Overview page. The default is OFF.

Please address each of the points that I raised.

salvis’s picture

Status: Needs review » Needs work
arekanderu’s picture

I would like to make a suggestion here as well since you are working on this. I posted it here http://drupal.org/node/1617008 but you can adjust it accordingly to your UI changes i believe.

Sifro’s picture

subscribing, would love a simpler interface like the one you proposed.

BTW, patching failed 2 chunks.

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Issue summary: View changes