Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#26 | privatemsg_move_secondary_tabs5.patch | 7.84 KB | Berdir |
#22 | privatemsg_move_secondary_tabs4.patch | 7.04 KB | NaheemSays |
#18 | privatemsg_move_secondary_tabs3.patch | 4.14 KB | Berdir |
#15 | messages2.png | 6.32 KB | Berdir |
#15 | privatemsg_move_secondary_tabs2.patch | 4.29 KB | Berdir |
Comments
Comment #1
Plazmus CreditAttribution: Plazmus commentedI agree and I would say that it will look better just to have one tab's row.
Comment #2
frankcarey CreditAttribution: frankcarey commentedThis should be an easy patch, anyone have any suggestion why we shouldn't do it?
Comment #3
frankcarey CreditAttribution: frankcarey commentedall urls can remain the same right?
Comment #4
NaheemSays CreditAttribution: NaheemSays commentedafaik, no the links would need t be changed. More, it might also need changes to other functions aswell.
Comment #5
frankcarey CreditAttribution: frankcarey commented@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?
Comment #6
frankcarey CreditAttribution: frankcarey commentedlitwol, should I go ahead and make a patch? should just be a couple lines in the hook_menu ?
Comment #7
NaheemSays CreditAttribution: NaheemSays commented(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...)
Comment #8
Berdirnbz, 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.
Comment #9
Plazmus CreditAttribution: Plazmus commentedGreat @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
Comment #10
frankcarey CreditAttribution: frankcarey commentedsweet! , thanks @Berdir for knocking that out. I agree might be a good idea to knock them both out at once.
Comment #11
NaheemSays CreditAttribution: NaheemSays commentedShould it be an option to select what is the default - "all messages" or "inbox"?
Need to test yet.
Comment #12
frankcarey CreditAttribution: frankcarey commentedyes +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?
Comment #13
Plazmus CreditAttribution: Plazmus commentedI 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?
Comment #14
frankcarey CreditAttribution: frankcarey commentedif inbox was the default, both "/messages" and "/messages/inbox" should give you the same thing?
Comment #15
BerdirThat'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...
Comment #16
NaheemSays CreditAttribution: NaheemSays commentedI 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.
Comment #17
NaheemSays CreditAttribution: NaheemSays commentedIn the other issue it was decided to stick to the current names/titles.
Comment #18
BerdirThe 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..
Comment #19
BerdirComment #20
Plazmus CreditAttribution: Plazmus commentedIs 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?
Comment #21
BerdirNote: 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.
Comment #22
NaheemSays CreditAttribution: NaheemSays commentedI 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.
Comment #23
Plazmus CreditAttribution: Plazmus commentedThanks 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.
Comment #24
frankcarey CreditAttribution: frankcarey commented@ Plazmus : yes should be the menu cache... maybe adding something like a menu cache clear on form submit?
Comment #25
BerdirI think the page arguments change is always necessary and does not depend on the option...
Comment #26
BerdirForget #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.
Comment #27
BerdirComment #28
Plazmus CreditAttribution: Plazmus commentedI tested it and works like a charm, great job @Berdir !
Please test it and give a feedback.
Comment #29
BerdirFixed in 6.x-1.x-dev and 7.x-1.x-dev. My first commit, yay! :)
Comment #30
NaheemSays CreditAttribution: NaheemSays commentedcongrats!
Comment #32
Tafa CreditAttribution: Tafa commentedIs 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