Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

shorten status bar text and add tooltip for full text #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

shorten status bar text and add tooltip for full text #11

wants to merge 2 commits into from

Conversation

mmehnert
Copy link

For long account names and nested folders, the status bar text can get so long, that in order to contain it, the whole Thunderbird window is made wider than the monitor.
This merge request shortens the status bar text to the account name and last folder name in the path if the path contains nested folders.
Additionally, it adds the full path as a tooltip to the status bar text.

@alainfrisch
Copy link
Collaborator

Thanks! When you build the shortened name, shouldn't you add "/" before and after the ellipsis?

@mmehnert
Copy link
Author

Well, I wanted to save as much space as possible. As you can see, I also changed " ==>" to "=>" in the status bar and saved 2 characters there. I actually think that having just ".." between the account and the folder looks pretty non-ambiguous and that adding the slashes would just add optical clutter. If it's about removing ambiguity, changing ".." to "..." might be the better choice. But that's just my personal taste and I'm fine with pushing the patch again with the slashes added or with "..." if you like that better.

@alainfrisch
Copy link
Collaborator

I think it's useful to show that the omitted parts are inner folders, not an arbitrary part of the local names.

Also, do you think it would make sense to apply the shortening only when the total length is greater than a fixed threshold? In many cases, with no too long folder names, it's ok to show the full path.

@mmehnert
Copy link
Author

OK. Then we'll go with "/.../" :-)

Using a length threshold would be very nice - but I don't think it makes sense unless we know how much space there is left in the status bar. I encountered problems with a screen width of 1080 pixels (pivoted 1920x1080).
I have an add-on that shows the IMAP quota in the status bar and lightning also needs about 125 pixels. All in all that leaves about 470 pixels to display the "[+Shift.....]" part for me.

I never did any mozilla add-on development before - so I really don't know what I'm doing here. ;-)
If you know a method to get the available space left in the status bar, it would be possible to dynamically calculate a threshold. But I could not find anything on that topic in reasonable time.
Another solution would be to add an option to switch off the status bar and offer a toolbar that uses the whole window width to display the nostalgy status for users with not so large screens.

@alainfrisch
Copy link
Collaborator

Ok, let's stick with your initial strategy (with slashes, please :-)).

@MLopez-Ibanez
Copy link

@mmehnert In my fork, I used a unicode arrow, which looks very nice and short. I like the idea here but I believe it should only be applied when the string is longer than a fraction of the status bar. Perhaps something like 1/4. How to query this information is not clear to me. Suggestions welcome. See also https://developer.thunderbird.net/add-ons/tb68/changes

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

Successfully merging this pull request may close these issues.

None yet

3 participants