FiltaQuilla icon indicating copy to clipboard operation
FiltaQuilla copied to clipboard

Display Full Pathname for "Move Message to" and "Copy Message to" Actions

Open WoofGrrrr opened this issue 9 months ago • 10 comments

Is it possible to display Full pathname for the target directory for actions "Move Message to" and "Copy Message to"?

WoofGrrrr avatar Jan 29 '25 17:01 WoofGrrrr

Is it possible to display Full pathname for the target directory for actions "Move Message to" and "Copy Message to"?

no these are built in methods, we no method of modifying them. Do you need to find out the file location of a specific folder?

I think you can do it via right-click in folder tree on the General Information tab:

Image

A really fast and convenient way to jump to the folder in explorer is with my Add-on QuickFolders:

click on the current folder tab, and select Mail Folder Commands >> Explore Folder Location...

Image

RealRaven2000 avatar Jan 29 '25 21:01 RealRaven2000

Actually, the problem I have is that I have different folders with the same name at different locations in the folder hierarchy, and I cannot find any way to know which folder is which.

Say, just for example, I have a structure like this:

Financial
-> Banks & Credit Unions
   -> My Bank
      -> Credits
      -> Messages
      -> Withdrawals
   -> My Credit Union
      -> Credits
      -> Messages
      -> Withdrawals

I want emails from My Bank about Credits to be moved to --->Financial -> Banks & Credit Unions -> My Bank -> Credits

and emails from My Credit Union about Credits to be moved to ---> Financial -> Banks & Credit Unions -> My Credit Union -> Credits

When I look at the filters that do this, there is no way to know which actual folder "Credits" is selected. The only thing I can do is select the folder again to make sure it is the correct one. Or give each folder a unique name which somehow duplicates the hierarchy.

But if there's no API to make this possible, I guess that's that. Not that big of a deal. Just a suggestion.

WoofGrrrr avatar Jan 30 '25 02:01 WoofGrrrr

I want emails from My Bank about Credits to be moved to --->Financial -> Banks & Credit Unions -> My Bank -> Credits

and emails from My Credit Union about Credits to be moved to ---> Financial -> Banks & Credit Unions -> My Credit Union -> Credits

When I look at the filters that do this, there is no way to know which actual folder "Credits" is selected. The only thing I can do is select the folder again to make sure it is the correct one. Or give each folder a unique name which somehow duplicates the hierarchy.

let me stop you there, you are talking about filter names? If you want the filter name to be generated automatically, then this is a job for quickFilters. FiltaQuilla does not create filters. Otherwise please explain where you expect to see the path name.

RealRaven2000 avatar Jan 30 '25 12:01 RealRaven2000

PS: when you create a filter manually (without the help of quickFilters) you have to move through the folder hierarchy:

Image

since this (and navigating a vertical tree of folders) is a horrible experience, I created the add-ons quickFilters and QuickFolders to make these processes simple or automate them. With QuickFolders, you can use the quickMove function to move an email AND create a filter (with the quickFilters assistant active) at the same time:

Image

you don't even need to know the complete path, just parts of it. Anyway to see the filter name reflect the path that's a job for quickFilters.

RealRaven2000 avatar Jan 30 '25 13:01 RealRaven2000

I'm not talking about Filter NAMES created by QuickFilters for this issue. That is the other issue I entered: https://github.com/RealRaven2000/quickFilters/issues/290. And not about how to navigate the menus to select a folder, nor to see the full path from the folder list tree. I do use QuickFilters and QuickFolders. They're great! Thank you so much.

I'm talking about the Folder Names in the "Move Message to" and "Copy Message to" Actions in the filter definitions themselves:

Image

These display only the name of the last folder in the path and the server name.

(Sorry about the dark image, When I move the cursor out of the window to take the screenshot, Thunderbird does this.)

I'm looking for some way to just see the full folder path. Since FiltaQuilla is the one that adds options to the Match Criteria and to the Actions, I thought that is where this request would fit. Modify how one of the existing Actions gets displayed. Even a tooltip would help. Sorry if I got that wrong.

WoofGrrrr avatar Jan 30 '25 18:01 WoofGrrrr

I inspected the Thunderbird XML for the Filter Editor, and the full path is available in the value attribute:

<menulist xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  class="ruleactionitem folderMenuItem"
  flex="1"
  displayformat="verbose"
  value="imap://XXX%[email protected]/INBOX/$$-CRAP-$$"
  label="$$-CRAP-$$ on IONOS [email protected]"
  IsServer="false"
  IsSecure="true"
  ServerType="imap"
  SpecialFolder="none"
  IsFeedFolder="false">

Of course, this is a very simple example, as the path is only "/INBOX/$$-CRAP-$$"

I was able to cobble-together a rudimentary solution using CSS:

html#FilterEditor {
  & richlistbox#filterActionList menulist.folderMenuItem:hover::after {
    background: #90a0b0;
    border:     1px solid black;
    color:      #222;
    content:    attr(value);
    display:    block;
    position:   absolute;
    padding:    .15em;
  }
}

It would work better if I could parse the value attribute and get rid of the leading IMAP URL, but I guess I'd need to do that with JavaScript.

WoofGrrrr avatar Jan 30 '25 19:01 WoofGrrrr

Of course, this is a very simple example, as the path is only "/INBOX/$$-CRAP-$$"

I was able to cobble-together a rudimentary solution using CSS:

html#FilterEditor {
  & richlistbox#filterActionList menulist.folderMenuItem:hover::after {
    background: #90a0b0;
    border:     1px solid black;
    color:      #222;
    content:    attr(value);
    display:    block;
    position:   absolute;
    padding:    .15em;
  }
}

It would work better if I could parse the value attribute and get rid of the leading IMAP URL, but I guess I'd need to do that with JavaScript.

That's a very creative solution! Regarding a JavaScript solution: Unfortunately we cannot modify existing filter methods, we could only create a new "move to folder 2" that behaves that way, and I think that would be kind of overkill since we already have so many additional actions.

RealRaven2000 avatar Jan 30 '25 22:01 RealRaven2000

... we could only create a new "move to folder 2" that behaves that way, and I think that would be kind of overkill since we already have so many additional actions.

agreed.

I think I can do something in my userChrome.js, maybe grab the value of the existing "value" attribute, parse it, and add the result as a new attribute, say "path", onto the menulist element, then use the CSS above to display the value of that new "path" attribute instead of the existing "value" attribute. But this won't work if I change the folder.

I modified the userChromeJS extension so that it runs my userChrome.js when the Filter Editor (and many other windows and dialogs) opens.

I haven't written a complete extension myself yet. I'm learning things with userChrome.js. And I think it might have fewer API restrictions???

WoofGrrrr avatar Jan 30 '25 22:01 WoofGrrrr

I modified the userChromeJS extension so that it runs my userChrome.js when the Filter Editor (and many other windows and dialogs) opens.

I am not familiar with that one but it sounds like it is experimental.

I haven't written a complete extension myself yet. I'm learning things with userChrome.js. And I think it might have fewer API restrictions???

Yes, if it is experimental. APIs will not give you access to any of the filter editor interface. The back end of the filters is a service, which is compiled with C++ and cannot even be modified with experimental extensions. The only thing that is possible is adding our own search custom terms and custom actions.

To modify the editor interface is extraordinarily tricky, check out the FiltaQuilla source code, see: https://github.com/RealRaven2000/FiltaQuilla/blob/ESR115/content/fq_FilterEditor.js#L487 and https://github.com/RealRaven2000/FiltaQuilla/blob/ESR115/content/fq_FilterEditor.js#L681

I am not saying it is impossible but it is very difficult to modify these standard actions without breaking the functionality. I think you would have to create an event handler that watches for modification of this particular input control.

Image

RealRaven2000 avatar Jan 30 '25 23:01 RealRaven2000

beyond my abilities, that's for sure.

Thanks for looking at this.

WoofGrrrr avatar Jan 31 '25 18:01 WoofGrrrr

Haven't forgotten about this one, please comment if you're still interested. Maybe it can be implemented as a tooltip somehow.

RealRaven2000 avatar Mar 07 '25 09:03 RealRaven2000

I'm definitely interested, A Tooltip would be great, thanks. I have a number of folders with the same names. Categories and sub-categories, etc.

I tried to implement a tooltip of sorts in my userChrome.css as mentioned earlier - with a "::before" - but it messed with how the menus worked for some reason. Beyond my understanding.

WoofGrrrr avatar Mar 07 '25 13:03 WoofGrrrr

ok, can you send me the code you wrote so far? I also feel we should transfer this to quickFilters which also already messes with the filter editor UX. Whereas FiltaQuilla adds it's own methods / search terms / actions, this one is more about a "gentle" modification of the UX. Btw. did you try pitching this as a suggestion on Bugzilla? Might be a nice addition to core.

RealRaven2000 avatar Aug 28 '25 09:08 RealRaven2000

Sorry. Since it was causing problems as mentioned, I removed the code, and since it's been so long since I did all that, I cannot remember what I did for certain. I think what I did was that I added a ::before in CSS in userChrome.css. Anyway, I think I used ::before and it had a title attribute in it and the value of the title was thus displayed when my cursor was over the field. But it caused problems. Again, it's been too long, I'm old, and I cannot remember that far back.

WoofGrrrr avatar Aug 28 '25 17:08 WoofGrrrr