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

Notebook tab menu: Move tab filenames to a button menu at end of tabs #2348

Open
wants to merge 4 commits into
base: master
from

Conversation

@ntrel
Copy link
Member

commented Oct 9, 2019

The existing popup menu lists all the notebook tabs first then shows command items below. This means the command items are harder to access (user has to move mouse further). They can also get pushed off screen when there are many tabs open (see #2346 (comment)). Instead, let's split up the menu for better UX.

New notebook action widget menu, left or right click ☰ button:
image

Commands-only tab menu:
image

The single close item has been put first and grouped separately because:

This will be the most common choice for anyone who disables notebook tab [close buttons].
This also groups the commands closing multiple documents separately from the other commands. Closing multiple documents is a more drastic action so should be grouped separately.

ntrel added 4 commits Oct 8, 2019
This will be the most common choice for anyone who disables notebook tabs.
This also groups the commands closing multiple documents separately from the other commands. Closing multiple documents is a more drastic action so should be grouped separately.
void notebook_init(void)
{
GtkWidget *btn = gtk_button_new_with_label("");

This comment has been minimized.

Copy link
@codebrainz

codebrainz Oct 10, 2019

Member

I think I've seen in some GNOME apps they use icon button with an icon like view-list or view-more or maybe some more semantically correct name for same icon. I guess the advantage of the icon is that it looks correct no matter which font or size being used (ex. in my browser here, it looks like an equal symbol).

This comment has been minimized.

Copy link
@ntrel

ntrel Oct 11, 2019

Author Member

Ok, but do they work on Gtk 2?

More generally, how do we know which strings are guaranteed to have icons with Gtk 3, is there a list of common strings? (I saw they deprecated stock items).

This comment has been minimized.

Copy link
@ntrel

ntrel Oct 11, 2019

Author Member

BTW haven't tried it, but Gtk 3 has a menu button widget that defaults to a down arrow:
https://developer.gnome.org/gtk3/stable/GtkMenuButton.html

@codebrainz

This comment has been minimized.

Copy link
Member

commented Oct 10, 2019

I haven't tried this yet in practice, but it seems like a good improvement.

This will be the most common choice for anyone who disables notebook tabs.

If they disable notebook tabs, why does it matter? Isn't the menu only shown for people who keep tabs enabled?

This also groups the commands closing multiple documents separately from the other commands. Closing multiple documents is a more drastic action so should be grouped separately.

This doesn't really give a good reason for the ordering, for example an alternative layout that puts the least drastic action first but maintains grouping of "close" related items together would be:

Open in New Window
----
Close
Close Other Documents
Close Documents to the Right
(Close Documents to the Left)
(Close Documents in Same Folder)
(Close Documents in Other Folders)
Close All
@ntrel

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2019

If they disable notebook tabs, why does it matter?

Sorry, I meant to write disabling notebook tab close buttons. I think that's a gnome HIG recommendation (which arguably doesn't apply widely to programmers).

@ntrel

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2019

One downside to this is that you have to move the mouse further to click the menu button than before. Clicking any tab is easier.

A simpler solution to this pull would be to move the fixed commands above the notebook tab item list. As they don't change they shouldn't appear in different vertical positions depending on number of tabs.

@ntrel

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2019

an alternative layout that puts the least drastic action first

But we should also consider frequency of use - I would guess Close would be used more often than Open in New Window.

Closing a single document is not a drastic action.

@codebrainz

This comment has been minimized.

Copy link
Member

commented Oct 11, 2019

Sorry, I meant to write disabling notebook tab close buttons.

I didn't even realize that option existed until now. I would guess users who do that, it is because they use the keybindings.

One downside to this is that you have to move the mouse further to click the menu button than before... A simpler solution to this pull would be to move the fixed commands above the notebook tab item list.

I was going to suggest doing that until I saw this PR for splitting it which seems nicer. I personally don't think it's a big deal that you move your mouse to a different location.

But we should also consider frequency of use - I would guess Close would be used more often than Open in New Window.

I would guess the large majority of users don't disable the tab close buttons and of those that do, don't use the menu to close tabs. Personally I don't think I've ever used the item to close a single document from that menu, though I use all of the others often.

Closing a single document is not a drastic action.

Indeed, but it's more "drastic" than not closing any document.

@elextr

This comment has been minimized.

Copy link
Member

commented Oct 12, 2019

I think that's a gnome HIG recommendation (which arguably doesn't apply widely to programmers).

Agree, the HIG is written for the lowest common denominator, we can reasonably allow developers more options.

Closing a single document is not a drastic action.

In some ways it is, it irreversably loses edit history and any document settings. But that applies more to closing multiple documents with a single action where the user may accidentally include a document they didn't mean to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.