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

Added ability to toggle visibility of tabs #2600

Merged
merged 34 commits into from
May 30, 2021

Conversation

zneix
Copy link
Collaborator

@zneix zneix commented Apr 7, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable.
  • Toggle tab visibility with a shortcut (Ctrl+U).
  • Toggle tab visibility with a Split header context menu entry.
  • Show dialog upon hiding tabs for the first time.

Description

This Pull Request adds an ability to toggle visibility of chat tabs - With a keyboard shortcut (Ctrl + U) and a Split header's context menu entry ("Toggle visibility of tabs").

Open questions

  1. Currently, (in both vertical and horizontal tab layouts) special buttons are still visible. Question is whether we gonna get rid of those if tabs are hidden or not. I personally say those could stay, but I'm not 100% sure if that's what we want.
Demonstration

hide_tabs_yunglpr

Related #1484
Closes #2313

@jupjohn
Copy link
Contributor

jupjohn commented Apr 18, 2021

Implements feature of #2313

@zneix zneix marked this pull request as ready for review April 18, 2021 19:37
Copy link
Collaborator

@leon-richardt leon-richardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keybinding Ctrl+U should also be added to the "Keybindings" page in the settings.

Other than that, I like the implementation. Feels nice to use from my perspective :)

src/widgets/Notebook.cpp Outdated Show resolved Hide resolved
src/widgets/Notebook.cpp Outdated Show resolved Hide resolved
src/widgets/Window.cpp Outdated Show resolved Hide resolved
src/widgets/settingspages/GeneralPage.cpp Outdated Show resolved Hide resolved
src/widgets/Notebook.cpp Outdated Show resolved Hide resolved
src/widgets/Notebook.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@jupjohn jupjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording changes could be made.

Copy link
Collaborator

@leon-richardt leon-richardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and other than this little nitpick, looks good and works just as expected 👌

src/widgets/Notebook.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@jupjohn jupjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't break it, looks good to me 👍

@ALazyMeme
Copy link
Collaborator

Works fine on Windows 21H1, leaves a little space, but it appears to be windows related:

Showing tabs:
image

Without tabs:
image

If you have quite a few more tabs, it will minimize down to just a single blank line (as shown in the second screenshot).

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changelog entry nitpick, other than that looks good 👌

CHANGELOG.md Outdated Show resolved Hide resolved
@ALazyMeme
Copy link
Collaborator

Found this weird bug too, only seems to occur on windows?

jif

zneix and others added 2 commits May 29, 2021 12:33
…bar for right-clicking in case the tabs are hidden

For horizontal tab layouts, this will make the already-existing bar smaller
For vertical tab layouts, this will add the small bar
@pajlada
Copy link
Member

pajlada commented May 29, 2021

@ALazyMeme Could you test 'tab area' width/height in horizontal/vertical mode in the latest build please?

@ALazyMeme
Copy link
Collaborator

Line is still there, looks a bit weird now that there's random space on the side (since the space was not there before and the line is evidently moved upon the "creation" of the space)

Bug outlined in #2600 (comment)
image

Random space:
jif

@pajlada
Copy link
Member

pajlada commented May 29, 2021

gotta review paint event to ensure it's aligned with the 'empty space' logic

@pajlada
Copy link
Member

pajlada commented May 30, 2021

@ALazyMeme Once the Windows build has succeeded, could you please take this for one (hopefully last) spin? Thank you!

Known 'quirks': Swapping between horizontal and vertical tab layout will result in the line around buttons (if you have buttons enabled) to not fully settle until you have pressed ok in the settings dialog.

@zneix
Copy link
Collaborator Author

zneix commented May 30, 2021

I (sadly) tested this on Windows and this seems fine
this shit os is so slow forsenY

Copy link
Collaborator

@ALazyMeme ALazyMeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this works perfectly.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Would be good to have the phrase "tab area" added to the glossary

@zneix zneix enabled auto-merge (squash) May 30, 2021 11:22
@zneix zneix merged commit 5735428 into Chatterino:master May 30, 2021
@zneix zneix deleted the feature/hide-tabs-for-vhns branch May 30, 2021 11:40
zneix added a commit to SevenTV/chatterino7 that referenced this pull request May 30, 2021
Changes from upstream we pulled:
5735428 (origin/master, origin/HEAD, master) Added ability to toggle visibility of tabs (Chatterino#2600)
01bda9c Fix tab direction not applying to popup window (Chatterino#2839)
faae2c2 Match game names exactly when using /setgame (Chatterino#2825)
7e4f8be Bump ilammy/msvc-dev-cmd from 1.8.0 to 1.8.1 (Chatterino#2828)
708670b Bump actions/cache from 2.1.5 to 2.1.6 (Chatterino#2830)
@Alicyl
Copy link

Alicyl commented Jul 1, 2021

Sorry to intrude upon this lovely little thread, but where can one access the version of Chatterino with this feature (or when can we expect if it's inaccessible to the public)? Nightly builds?

@ALazyMeme
Copy link
Collaborator

ALazyMeme commented Jul 1, 2021

Nightly builds?

Yes.

@ichigo-gyunyu
Copy link

Hello, is there a way to have the tabs be hidden by default on launch and hitting Ctrl + U toggles visibility like usual. Tried to find search the settings but couldn't find any option :/

@pajlada
Copy link
Member

pajlada commented Jul 4, 2021

Hello, is there a way to have the tabs be hidden by default on launch and hitting Ctrl + U toggles visibility like usual. Tried to find search the settings but couldn't find any option :/

There is not, no

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 this pull request may close these issues.

Channel Tab Panel Minimization
7 participants