I think that the user interface would be improved if we moved all the subtabs into primary tabs. Seems like it would cut down a click to get to an inbox :)

Current layout of tabs:

* Messages
o All messages
o Inbox
o Sent Messages
* Write new Message
* Tags

Consolidated Layout

* All messages
* Inbox
* Sent Messages
* Write new Message
* Tags

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Plazmus’s picture

I agree and I would say that it will look better just to have one tab's row.

frankcarey’s picture

This should be an easy patch, anyone have any suggestion why we shouldn't do it?

frankcarey’s picture

all urls can remain the same right?

NaheemSays’s picture

Version: 6.x-1.0-rc2 » 6.x-1.x-dev

afaik, no the links would need t be changed. More, it might also need changes to other functions aswell.

frankcarey’s picture

@Plazmus re: your vertical tab comment from the other issue. thanks for the feedback! Vertical tabs could probably be easy to do with css, but in our case we have limited width, so it might not be so great by default. At least if they were all in the primary tab level, it would prob be easier to theme?

frankcarey’s picture

litwol, should I go ahead and make a patch? should just be a couple lines in the hook_menu ?

NaheemSays’s picture

(I'm not litwol, but) that would be upto you. As for the chance of it being accepted, no idea.

For reference, the original issue where we decided to change from a tree structure to tabs: #297835: Tabs, not tree (the code from there would be useless for a patch here).

Personally, i am a fan of the tabs we have over a tree structure, but I am not the maintainer either, so who knows. (on the other hand, I do have a curiosity over what changes such a patch would involve...)

Berdir’s picture

Status: Active » Needs review
FileSize
3.41 KB
18.93 KB

nbz, I think you confused something here. AFAIK, the idea was not to re-introduce the tree we had. The idea is to kill the second level of the tabs, below messages.

I agree that it is not necessary, attached is a simple patch. I had to add a simple hook_menu_alter function to rename Messages to All messages and change it to a default local tab (and not default). Except of that, all I did was to update some weights.

What this patch does (also see the attached screenshot):
- Add Inbox and Sent messages to the first level tabs
- Make Inbox the first and default tab
- Re-order some tabs to have sent before read message and write new message

No links changed, except that I renamed messages/list/inbox to messages/inbox and the same for sent. But we do not link to these anywhere.

Plazmus’s picture

Great @Berdir! Thanks for the patch.

This is definitely the way it should looks like, just one row. I think that it might be also a good moment to correct strings #469362: UI Improvements: Tab Strings more consistent and shorter

frankcarey’s picture

sweet! , thanks @Berdir for knocking that out. I agree might be a good idea to knock them both out at once.

NaheemSays’s picture

Should it be an option to select what is the default - "all messages" or "inbox"?

Need to test yet.

frankcarey’s picture

yes +1 for that feature, but we might as well do an option for each tab if it's not really any more work... for instance someone might want want new message to be default?

Plazmus’s picture

I have a one problem with the patch, even thought the "Inbox" tab is active the path for it is just 'messages'.

When I change 'MENU_DEFAULT_LOCAL_TASK' for Inbox to 'MENU_LOCAL_TASK' path is fine but it's not active/default, any ideas?

frankcarey’s picture

if inbox was the default, both "/messages" and "/messages/inbox" should give you the same thing?

Berdir’s picture

if inbox was the default, both "/messages" and "/messages/inbox" should give you the same thing?

That's what I thought too.. turned out, we were wrong :)

Updated patch
- Included renames from #469362-8: UI Improvements: Tab Strings more consistent and shorter. Also removed "message" from read and delete
- Re-ordered stuff a bit, it is now "Inbox Sent All ...", see screenshot.
- inbox is now really the default, not just in the UI...

NaheemSays’s picture

I am not a fan of the shortened names. They are lacking in context and seem a little too... lacking.

The main ones that I dislike most are "All" and "create new". Sent and inbox by default have some context associated with them IMO.

Besides, site admins can customise the names through "translations" and other ways, so we should try to set up good defaults and let them worry about framing them better into their applications.

NaheemSays’s picture

Status: Needs review » Needs work
Issue tags: +pmsg ux

In the other issue it was decided to stick to the current names/titles.

Berdir’s picture

The other issue needs more discussion, let's make this unrelated again..

Reverted almost all title renames in that patch, except Sent Messages => sent messages because that's the only place where Messages started with a capital letter..

Berdir’s picture

Status: Needs work » Needs review
Plazmus’s picture

Is there any chance that this patch will be included?

I personally way more prefer just one tabs row and would love to see that in next release, but if maintainer has a doubts maybe we should make a poll and check preferences other people? or maybe someone could extend this patch and create possibility to switch between 2 and 1 row if there is a need?

Berdir’s picture

Note: I talked with litwol and we agreed that this change will be commited.

So please test the latest patch in detail and report back if it works and in an expected way. Once we have 2-3 confirmations that this works OK, we can set it to RTBC.

NaheemSays’s picture

Title: UI Imporvements: Move secondary tabs to primary tabs » UI Improvements: Move secondary tabs to primary tabs
FileSize
7.04 KB

I like the overall patch, but I wanted to also have the option to keep "All messages" as the default listing, so I have added an option for that too.

Also a comment clear up further down the page, and I changed the fieldset in email notify module to collapsible => FALSE as there is only one think on that page and making it collapsible seems... not the right thing to do.

Other than that, good to go after some reviews.

Plazmus’s picture

Thanks for your patch @nbz more flexible solutions are always welcome.
However there is a little problem with cashing, when I have changed to "All messages" I had to flush cash to make it work.

frankcarey’s picture

@ Plazmus : yes should be the menu cache... maybe adding something like a menu cache clear on form submit?

Berdir’s picture

Status: Needs review » Needs work
+  if(variable_get('privatemsg_filter_default_list', 0) == 0) {
+    // Change default argument of /messages to inbox. and set the task to MENU_LOCAL_TASK.
+    $items['messages']['page arguments'] = array('privatemsg_list', 'inbox');
+    $items['messages/list']['type'] = MENU_LOCAL_TASK;
+  }

I think the page arguments change is always necessary and does not depend on the option...

Berdir’s picture

Forget #25, that's simply wrong :)

Two changes:

- Move the setting into the existing Configure listings fieldset and make that non-collapsed by default
- Add a menu_rebuild() when the settings changes

Please test the updated patch and confirm that it does work correctly. After 2-3 confirmations, set it to RTBC so that we can finally commit it.

Berdir’s picture

Status: Needs work » Needs review
Plazmus’s picture

I tested it and works like a charm, great job @Berdir !

Please test it and give a feedback.

Berdir’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Fixed

Fixed in 6.x-1.x-dev and 7.x-1.x-dev. My first commit, yay! :)

NaheemSays’s picture

congrats!

Status: Fixed » Closed (fixed)

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

Tafa’s picture

Is it possible to move all tabs to a primary link menu block then? If so, would this involve changing from MENU_LOCAL_TASK to whatever the primary link variant is?
Please let me know. I have been struggling with this for over a week now and I am desperate to find an answer to it.
Thanks,
T