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

tab text and new-tab button layout needs tweaking... #252

Open
xpusostomos opened this issue Jan 16, 2025 · 2 comments
Open

tab text and new-tab button layout needs tweaking... #252

xpusostomos opened this issue Jan 16, 2025 · 2 comments

Comments

@xpusostomos
Copy link

There seems to be a bunch of issues with tab layout...

  • The new tab button is sometimes hidden on the right. If you get to the last tab, you might see a sliver of pixels on the right which is the + button, but it's hidden off the right of the screen. Since it's not a real tab, you can't actually forward and backward to get to it either. You've just got to hope it's there, hope you are at the end, and click the sliver of pixels there sometimes.

  • which brings me to a related issue ... tab names are never abbreviated, they are always shown in full. Something like Chrome tabs would start to abbreviate things as you get more tabs. Of course, you get to configure your own titles, but you don't really get to reconfigure them all as tabs are added and disappeared. It would be nice if there was a heuristic to optionally start abbreviating them as you accumulate more. Because there is no such heuristic, and the " + " add button isn't really a tab, I think the algorithm sometimes never shows it, depending on the luck of length of tabs.

  • I tend to think the add button should actually be on the left. The other tab navigation buttons are there, we don't have to follow Chrome on this. But whereever it is, it should ALWAYS be visible. I don't want to have to scroll scroll scroll through tabs just to find the " + " button, the " + " button always needs to be there.

  • The default seems to be the active tab is shown with white font, and the non active tabs grey font. But the navigation buttons for some reason are shown in grey font! You can't see them. The menu button looks like a dot (I guess it's a down triangle, but really small. Maybe vertical "..." ala chrome would be a more known menu icon). Either way, we need better default icons for them.

  • If using centaur tabs with exwm, a browser will change its title when its contents changes... and there is a hook in exwm that it renames the buffer. However the centaur tabs don't change until you exit the tab. It's not clear in the documentation if there is a function that can be used to update the centaur tabs title when that happens.

@jcs090218
Copy link
Collaborator

Hi! Thanks for reporting this issue.

These issues seem a bit complicated. Do you mind posting some screenshots here? Thanks!

@xpusostomos
Copy link
Author

It's tricky without making a video, but I'll do my best. In the pictures below, I have 7 Chrome centaur tabs, with names, 11111, 22222, 33333, 44444, 55555, 66666 and 77777. So let's say I start at tab 11111. I cycle through the tabs using the centaur tabs > right button. So I get to 22222, 33333 and eventually to 77777.

Sorry, about the screen shots, I truncated a bit at the top, but you can still see how I reach the last tab, and it's not a full tab.

So first thing to notice is I don't ever get to see the whole of the 77777 tab. Specifically the close X button is hidden. If I click > right again I'll go to 11111, and I'll never see the X close button. Worse, I'll never see the " + " add new tab button. And " + " add tab isn't even an option on the right click menu, so add tab is dead functionality. It should also be a menu option.

Of course this all depends on the luck of how big the titles are on your tabs and how they fit in the space. But the heuristic for showing tabs, if you're unlucky, will never show the "X" or the " + " tab.

So what should happen?

(1) The " + " button should ALWAYS be visible. the right most space should be permanently reserved for that. Because " + " is such core functionality, you should never have to scroll to get to it. Also it should be an option on the right click menu.

(2) as you scroll through tabs, it should not wait till you get to the very end to start scrolling. This is for several reasons, firstly because if the last tab is only half visible, it will never become fully visible. Secondly, because it is jarring for the user that if you're on the last visible tab, you can't see what is coming next, or if there is something coming next. Thirdly, if you're on the last visible tab, you can't tell that is or isn't the last actual tab. I would say the scrolling algorithm should be, when you get to the middle tab, and you right > click next tab, that's when you should scroll. That way, let's say you can see 7 tabs at once, you can always see the next 3 and the previous 3 tabs at all times, unless of course you've reached the beginning or the end. When you reach the last visible tab, you know that is the last actual tab, because you can't scroll to the last visible tab without it being the last actual tab.

(3) Most web sites have quite long titles. I've written elisp to truncate titles to the first 3 words. However what would be nicer is if there was some configuration so that centaur would start to truncate titles the more tabs you get. If you have one tab, it can probably show it all. If you have 2 tabs, it may need to truncate a bit... the more tabs you get, the more it truncates. This could probably be a callback function so the user can decide. Hard to say what the callback would pass, maybe the number of tabs, the total characters available, and the string, and the user would decide how much they want to truncate and how (e.g. by word, or by just character truncation). This is basically what Chrome does, except I think Chrome will never scroll tabs, it always just squeezes them in somehow, even it the titles start disappearing.

(4) I don't know why the icons on the left buttons are grey font, instead of the bright white font of the active tab.

(5) I realise you don't use it with exwm, but as you know, as you navigate around web pages, the titles of the browser window keep changing. However the centaur tab doesn't change until you click out of it. So the question is, what function should be called to update the title? If I know that, maybe I can coordinate with the exwm folks to see how I can get the tab names to update when appropriate.

Image

Image

Image

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

No branches or pull requests

2 participants