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

Statusbar - not displaying as configured #1764

Closed
tran-h-trung opened this issue Oct 6, 2022 · 3 comments · Fixed by #1912
Closed

Statusbar - not displaying as configured #1764

tran-h-trung opened this issue Oct 6, 2022 · 3 comments · Fixed by #1912

Comments

@tran-h-trung
Copy link
Contributor

Statusbar not displaying as configued

This issue is not a software bug, but it is a UX design flaw.

/statusbar is configued to hide all read chat and display the unread chat:

[time] - Show tab names (/statusbar)             : ON
[time] - Show tab numbers (/statusbar)           : ON
[time] - Show tab with no actions (/statusbar)   : ON
[time] - Max tabs (/statusbar)                   : 10
[time] - Max tab length (/statusbar)             : OFF
[time] - Self statusbar display (/statusbar)     : jid
[time] - Chat tab display (/statusbar)           : user
[time] - Room tab display (/statusbar)           : room

With the above configuration, /statusbar display the number and name of the current window on the right side and only display additional items when new message are recieved.

Context

/statusbar is working just fine when user opens less than 10 chat windows which is the max limit of /statusbar maxtabs. Because there are only 10 numbers printed on the physical keyboard. When user have more than the limit, by default, it shows [>] to signal there are more windows than can be shown.

The problem comes when the unread messages are assigned in windows that are above the /statusbar maxtabs.

At the moment I look there and either feel confused or think that I have no new message to read.

It felt like I broke my back bone in 5 places. (no it doesn't.)

Current Behavior

It is showing [>].

This is annoying because this is the corner of the screen that I look to check and decide before giving the command /win + [number|name] to open the very window I want read.

At the moment, I have to go to the console window and run /wins before I can decide which window I want to open.
In terms of speed, this costs at least 12-key-strokes.
In terms of human relationship, this might costs a heart break if the user missed the new message.

Expected Behavior

As a user I expect it to show the maximum of 10 windows. This includes my current window AND as many unread windows as possible BEFORE signal to me that there are even more new messages to read.

Steps to Reproduce (for bugs)

  1. Open less than the limit.
  2. Recieve a new message.
  3. Open more than the limit.
  4. Move the new message over the limit with /wins swap.
  5. Feel confused on why it vanished.

Environment

  • Give us the version and build information output generated by profanity -v
    profanity 0.13.0.7dev.local.ffe55e9

  • Operating System/Distribution
    doesn't matter.

  • glib version
    doesn't matter.

Possible Solution

Code in English:

window_max = 10;
window_displayed = 0;
window_unread = ??;
more = "[>]";

display_statusbar() {
    // Some-magical-cursor-movements here.

    // Display the n° || name of current window.
    print_window_current();
    window_displayed = 1

    // Display all the unread.
    if (window_unread > 0) {
        while (window_unread > window_displayed) {
            while (window_displayed < window_max) {
                print_window_newest();

                // some-magical-pointers passing here.

                window_displayed++;
            }  

            // Display signal if there are still more.
            if (window_max < window_displayed + window_unread && window_unread > 0) 
                print("%s", more);
            window_unread--;
        }
    }
}
@rajdeepdas2000
Copy link

Hi, I want to work on this issue. Can you assign it to me? Thanks.

@jubalh
Copy link
Member

jubalh commented Dec 1, 2022

Hi @rajdeepdas2000! That's great to hear.
I didn't have time to read this issue yet so I don't know if it is a real issue or a user mistake.
You can certainly work on it and open a PR with your suggestions but I can't promise it will be merged (until I understood the issue).

If your main goal is to contribute to profanity you could also choose another issue that is already tagged. So the chances of it being merged would increase.

That being said feel free to work on this one!

@H3rnand3zzz
Copy link
Contributor

H3rnand3zzz commented Nov 8, 2023

@tran-h-trung , please, try out my change and tell me what do you think :)

also check out /statusbar tabmode setting, it might just do exactly what you want.

H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 8, 2023
Current paging only shows up to `maxtabs` pages starting from console (1),
no matter the current page (tab). It does not allow to see pages near
which can be useful if tab names (`/statusbar show names`) are displayed.

It can be as well useful to know which exact window number is open and
how much more windows are there, at least in the displayed tabs range.

It can be as well useful to know messages that are
left to current position (and even out of display range)
e.g. that you got a message on tab 10, while you are on tab 11 or even 25.

Significantly improve navigation by
making statusbar paging follow current page and display pages/tabs near.

Fix profanity-im#1283
Fix profanity-im#1764
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 8, 2023
Current paging only shows up to `maxtabs` pages starting from console (1),
no matter the current page (tab). It does not allow to see pages near
which can be useful if tab names (`/statusbar show names`) are displayed.

It can be as well useful to know which exact window number is open and
how much more windows are there, at least in the displayed tabs range.

It can be as well useful to know messages that are
left to current position (and even out of display range)
e.g. that you got a message on tab 10, while you are on tab 11 or even 25.

Significantly improve navigation by
making statusbar paging follow current page and display pages/tabs near.

Fix profanity-im#1283
Fix profanity-im#1764
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 15, 2023
Current paging only shows up to `maxtabs` pages starting from console (1),
no matter the current page (tab). It does not allow to see pages near
which can be useful if tab names (`/statusbar show names`) are displayed.

It can be as well useful to know which exact window number is open and
how much more windows are there, at least in the displayed tabs range.

It can be as well useful to know messages that are
left to current position (and even out of display range)
e.g. that you got a message on tab 10, while you are on tab 11 or even 25.

Significantly improve navigation by
making statusbar paging follow current page and display pages/tabs near.

Fix profanity-im#1283
Fix profanity-im#1764
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 15, 2023
Current paging only shows up to `maxtabs` pages starting from console (1),
no matter the current page (tab). It does not allow to see pages near
which can be useful if tab names (`/statusbar show names`) are displayed.

It can be as well useful to know which exact window number is open and
how much more windows are there, at least in the displayed tabs range.

It can be as well useful to know messages that are
left to current position (and even out of display range)
e.g. that you got a message on tab 10, while you are on tab 11 or even 25.

Significantly improve navigation by
making statusbar paging follow current page and display pages/tabs near.

Fix profanity-im#1283
Fix profanity-im#1764
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 16, 2023
This commit changes the current behaviour which displays always the first
tabs until `maxtabs` to display N tabs around the currently selected tab.

So if we are having a maxtab of 1 and the actively selected window is 2,
then 2 is displayed only.

So far we have only displayed `>` to indicate that there are more windows.
Since this PR shifts the range of tabs that are displayed we also add `<`
indicator now to indicate windows to the left of the currently displayed.

Fix profanity-im#1283
Fix profanity-im#1764
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Nov 20, 2023
This commit changes the current behaviour which displays always the first
tabs until `maxtabs` to display N tabs around the currently selected tab.

So if we are having a maxtab of 1 and the actively selected window is 2,
then 2 is displayed only.

So far we have only displayed `>` to indicate that there are more windows.
Since this PR shifts the range of tabs that are displayed we also add `<`
indicator now to indicate windows to the left of the currently displayed.

Fix profanity-im#1283
Fix profanity-im#1764
@rajdeepdas2000 rajdeepdas2000 removed their assignment Nov 21, 2023
H3rnand3zzz added a commit to H3rnand3zzz/profanity that referenced this issue Dec 28, 2023
This commit changes the current behaviour which displays always the first
tabs until `maxtabs` to display N tabs around the currently selected tab.

So if we are having a maxtab of 1 and the actively selected window is 2,
then 2 is displayed only.

So far we have only displayed `>` to indicate that there are more windows.
Since this PR shifts the range of tabs that are displayed we also add `<`
indicator now to indicate windows to the left of the currently displayed.

Fix profanity-im#1283
Fix profanity-im#1764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants