Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic: display email size #7162

Closed
manurevah opened this issue Jan 10, 2020 · 17 comments
Closed

Elastic: display email size #7162

manurevah opened this issue Jan 10, 2020 · 17 comments

Comments

@manurevah
Copy link

The size of emails is not visible with Elastic theme.

The most useful place for that is in the list of emails, perhaps near the date. This could be shown/hidden by editing CSS if needed. Perhaps size could also be shown in the headers section of emails.

@alecpl
Copy link
Member

alecpl commented Jan 10, 2020

Most of webmail apps I know that have 3-column view do not display message size. So, maybe it's not that important. More important is attachment size which you can see in the mail preview.

@manurevah
Copy link
Author

Hello alecpc,

I don't think that what other 3-column view clients do should define RC's ambitions.
: ]

I'd be happy if the info was there (list + header), even hidden, and I could then tweak local CSS to display it. For me, perhaps others, seeing the size of emails in the list is helpful. Also, some emails with images included inline do not show up as attachments, so no size is displayed.

Cheers,

@hyssop
Copy link

hyssop commented Jul 11, 2020

The size of emails is not visible with Elastic theme.

The most useful place for that is in the list of emails, perhaps near the date. This could be shown/hidden by editing CSS if needed. Perhaps size could also be shown in the headers section of emails.

I totally agree! Being able to sort a mailbox by message size when trying remove large message that are pushing it to over-quota is a MUST. Larry had it right!

Please add those column/sort options back in.

@mwhym
Copy link

mwhym commented Sep 4, 2020

I manage a few dozen companies that use roundcube via cpanel and I have to say that since the new theme was integrated the missing size column has been the one major complaint I have gotten from them. I had to switch them to the old theme to get the functionality back. it would be great to have the option of using it at least. Although its still there via the old theme, it would be great to be able to use it with the new interface which is so very slick.

in any case thank you for such a great app.

@alecpl alecpl modified the milestones: later, 1.5-beta Sep 30, 2020
@japso
Copy link

japso commented Nov 23, 2020

Definitely a +1 from my side.
Missing this feature for exactly the same reason as hyssop: deleting large messages that push the email account toward its quota.
Bringing this back would be much appreciated.

@charlottezweb
Copy link

Definitely a +1 from my side.
Missing this feature for exactly the same reason as hyssop: deleting large messages that push the email account toward its quota.
Bringing this back would be much appreciated.

Registered to add to this. Just came across this issue and had to revert to an older theme to get that functionality. It seems like a simple and justified use case.

Regards,
Jason

@hyssop
Copy link

hyssop commented Dec 15, 2020

This continues to be a problem when assisting account users with quota issues. Without being able to sort by message size it is not easy to help them. Alternatives are extra work for us, or inconvenience and frustration for the user. I hope this can be changed soon.

We like the new theme and don't want to stay with the old, but the need for this ability overrides that.

-Pete

@codegain
Copy link
Contributor

codegain commented Dec 16, 2020

Maybe someone will make a nice PR out of this, but this worked for me (on Roundcube 1.4.9):

program/js/app.js around line 2349 add

    else if (c == 'size') {
        // Remove this whole "if/else" and leave "html = ..." if you want the size to be shown on all messages and not just those with attachments
        if (flags.hasattachment || (!flags.hasnoattachment && /application\/|multipart\/(m|signed)/.test(flags.ctype))) {
          html = cols[c];
        } else {
          // This hides size from emails with no attachments
          continue;
        }
      }

after the last else if statement (which is c == 'folder' in my case)

program/js/app.js around line 260 change

this.env.widescreen_list_template = [
            {className: 'threads', cells: ['threads']},
            {className: 'subject', cells: ['fromto', 'date', 'status', 'subject']},
            {className: 'flags', cells: ['flag', 'attachment']}
          ];

to

this.env.widescreen_list_template = [
            {className: 'threads', cells: ['threads']},
            {className: 'subject', cells: ['fromto', 'date', 'status', 'size', 'subject']}, // Size column added before 'subject"
            {className: 'flags', cells: ['flag', 'attachment']}
          ];

Create a new plugin like message_list_attachment_size and add this in the .php file:
(This will output the "size" attribute of the mail to the js frontend)

<?php

class message_list_attachment_size extends rcube_plugin
{
    function init() {
        $this->add_hook('messages_list', array($this, 'messages_list'));
    }

    function messages_list($args) {
        $args['cols'][] = 'size';

        return $args;
    }
}

?>

and make sure the plugin is loaded.

Add some custom styles to your _styles.less file:

// Display size in mail list
.messagelist {
  td.subject {
    position: relative;

    .size {
      position: absolute;
      right: 0;
      bottom: 2px;
      font-size: 75%;
      color: @color-list-secondary;

      // Only affect subject if there is any size column
      + .subject {
        padding-right: 50px;
      }
    }
  }
}

html.touch {
  .messagelist {
    td.subject {
      .size {
        right: .5em;

        // Only affect subject if there is any size column
        + .subject {
          padding-right: 3.5em;
        }
      }
    }
  }
}

(Don't forget to recompile your .less file)

And this should give you the following result in your message list:

image

This works for my use case: Showing total mail size in list of mails with attachments. If you modify the "if" statement in the first code example this should print out the size of every message.

I could not test this in every use-case and maybe this is not the right way of doing it, but at least it worked for me.

@alecpl
Copy link
Member

alecpl commented Dec 20, 2020

I'm going to work on this. Here's the plan.

  1. When the list IS NOT sorted by size the size will replace the date on tr:hover.
  2. When the list IS sorted by size we'll have the opposite behavior, i.e. the size will get replaced by date on tr:hover.

@alecpl
Copy link
Member

alecpl commented Dec 20, 2020

Done.

@alecpl alecpl closed this as completed Dec 20, 2020
@charlottezweb
Copy link

Awesome!

Newbie here -- What do I need to do to pull the code change to my server?

Is it automatic? If so, when will I receive it and be able to test?

Cheers,
Jason

@trasherdk
Copy link

@charlottezweb Google git fetch and git pull

@TheBlackRoom
Copy link

TheBlackRoom commented Jan 25, 2021

This new theme with a missing size column totally flummoxed me earlier - absolutely crazy that a size sorting method is missing!!! I don't want just attachment size sorting, it has to be everything sorting.

I was trying to explain to someone over the phone that she needed to sort by size to see what was causing the loss of space on the server and it was impossible to describe or find the obvious.

Whoever thought this was a good idea to leave it out? - Crazy!

I had to login to revert things back to the more sensible theme, one that actually does the job properly. I'm beginng to hate the new world of a clean/simple app-view of everything, it throws out so many basic things that took us years to evolve, all lost by one person or team's view of how they can make it better without leaving us the option to easily choose or customise.

Oh well, it's changed back to the old theme now - no doubt elastic theme is interesting but I had no time to explore it and probably never will if it can't do the job.

@BlueWings76
Copy link

Hello everybody,

I wonder what's the publishment policy of such changes, I have version 1.4.10 installed by my hosting provider, but that one doesn't contain this change. Could someone please post the link to the publishing policy of RoundCube which tells me when and how these kind of changes will make their ways to the stable public release ?

Thank you,

Peter

@alecpl
Copy link
Member

alecpl commented Feb 12, 2021

The milestone (1.5-beta) is assigned to this ticket. It should be released soon.

@BlueWings76
Copy link

Wowwwwww, NEVER expected this speed :-))))))))))) thanx thanx thanx

@webolabo
Copy link

webolabo commented May 3, 2022

+1 need this too for all our customers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests