[patch] Selection stats in statusbar
Pavel Sanda
sanda at lyx.org
Thu Aug 11 06:54:11 UTC 2022
On Wed, Aug 10, 2022 at 08:01:47AM +0200, Daniel wrote:
> I just tested the new feature. Here are a couple of things that came to my
> mind:
>
> 1. The delay timer seems not to be working as expected. Normally, i.e. in
> other word processors, the idea is this:
>
> While typing, no updating takes place, only once the typing stops, the
> update timer starts. Once typing is continued, the update timer is stopped.
> I guess this is to make sure that calculation of the statistics is very
> unlikely to interfere with the typing.
This seems reasonable approach, actually better then the current one.
> However, as it is now, the word count gets updated sometimes while
> continuously typing. I thought that I had figured this out in my patch but
> maybe not. (Or that is a part where you where wondering why it was as it
> was.)
Yes, your patch didn't make it clear in the comments how it works, and it was
not straightforward from the code what is the combination if stops/starts
supposed to do. This makes it hard to anyone from outside to fix if something
breaks.
If you are willing to improve it I am happy to push it into master.
> 2. The display is quite cryptic since it is not immediately clear what "w",
> "c" and "cb" is. Minimally, I suggest to add a tooltip explaining this.
> Ideally, I would write at least "3 words, 23 characters" out, as it is the
> case in other word processors (Writer and Word).
>
> I see that this might get a bit longish if "characters including blanks" is
> written out. Here are a couple of alternatives:
>
> a. abbreviate only these: "42 cb".
> b. show blanks: "19 blanks".
I agree with initital cryptic impression and was expectecting someone will
question it. For me, once you get what w/c/cb is supposed to mean the current
display is easier to parse, especially if you are actively changing the
selection size and need quick feedback while selecting.
We can change it if others will complain as well.
I totally agree with tooltip part though.
> 3. One should be able to choose ones statics that are shown. I have never
> come across a scenario where I had to keep track of both words and
> characters. And most of the time it is the same, only words for me. So, it
> would be nice, if there was a specific context menu for the statistics that
> lets one choose which one to show in order to avoid clutter with extra
> information. This doesn't rule out showing multiple statistics at least in
> principle and abbreviations could be used depending on the number of
> statistics shown.
Looks overengineered to me and it actually shows why w/c/cb labels are good -
it doesn't feel bloated compared to situation when you need to parse full
sentence and start thinking about "new options".
I am encountering silly forms requiring characters limits regularly, so
choosing the one right stat is not solution either.
> 4. At least on macOS, there is currently a border around the statistics in
> the status bar. This does not integrate well with the other information
> shown which does not have a border. The border-less style seems more clean
> to me.
I just followed the way we display version control into toolbar (shows border
which makes it visually distinct as a separate functionality). But I don't
have strong opinion, be my guest if you feel strongly about this.
Pavel
More information about the lyx-devel
mailing list