I had an idea how this can be done and had to try it out..

Imho, that patch is filled with pure awesomeness :)

It contains/changes:
- It moves the header and field theming from privatemsg_list() to theme_privatemsg_list(), because...
-- memory improvement, we don't need to carry that around, pass it to hooks, save it into {cache_form} and so on.
-- it allows other modules to alter $form['#data'] and it will then call (or not call) additional theme function to collect headers and field data.
-- It's a cleaner separation between theming and logic

- privatemsg_filter adds 0-3 tags per thread to the list..
-- can be enabled/disabled, of course :)
-- All tags are fetched in a single query, that should be quite fast
-- It implements it in a way that we should be able to use for participants too.. that would allow us to remove db-specific code, countless user_load() calls from that page and make the list query simpler (separate patch, of course)
-- it is well documented, I think ;)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NaheemSays’s picture

Issue tags: +filter, +pmsg ux

tagging.

litwol’s picture

Try a screenshot with longer subjects and more realistic tag names. also subject column should have most width. I realize those are rather minor details but they add much to the 'UX' aspect.

Berdir’s picture

FileSize
27.78 KB
9.05 KB

Re-roll with a few simple fixes..

- when the first thread did not contain tags, no tags were displayed at all. Fixed.
- made the subject column atleast 35% wide. This is just a test and will not work on older browsers like IE6 (who cares? :) )
- Long tags are now shortened

Berdir’s picture

FileSize
45.82 KB
9.42 KB

Did a re-roll for this. Looking for reviews :)

I think this is now even nicer, together with the actions. See attached screenshot.

Berdir’s picture

FileSize
9.97 KB

Fixed a but that removed the last_updated column from the output.

Looking for reviews, this should be quite ready...

Berdir’s picture

FileSize
9.96 KB

Above patch missed a small change, all table columns are now displayed even if there are no new messages.

I'll go forward and commit this and wait a few days to fix bugs if they are reported.

Berdir’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Patch (to be ported)

Commited to 6.x-1.x-dev, needs to be ported to 7.x-1.x-dev.

Berdir’s picture

Status: Patch (to be ported) » Needs review
FileSize
19.12 KB

Oh well, that port grow a bit ;)

The patch uses now tablesect for the checkboxes, which eliminates all our code to generate these checkboxes. It also removes theme_privatemsg_list() and instead converts _privatemsg_list_thread() to a #pre_render function, automatically executed before the table is rendered.

Berdir’s picture

Status: Needs review » Fixed

Commited to 7.x-1.x-dev

Status: Fixed » Closed (fixed)
Issue tags: -filter, -pmsg ux

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