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

fix(tab-bar): prevent active tab from being hidden #703

Merged
merged 1 commit into from
Sep 9, 2021
Merged

fix(tab-bar): prevent active tab from being hidden #703

merged 1 commit into from
Sep 9, 2021

Conversation

prscoelho
Copy link
Contributor

This PR fixes #668 (somewhat) and #699. The active bar won't disappear anymore, but which tabs render is still inconsistent. I think the only way to make it more consistent would be to calculate space required for the collapsed tabs beforehand and remove that amount before calling tabs_to_render.

@prscoelho
Copy link
Contributor Author

Oops. Forgot clippy...

@prscoelho
Copy link
Contributor Author

Sorry about another force push.. I wasn't fully happy with the solution since it was still not consistent and in certain widths not using up all possible space.

The issue was that we can't really populate tabs and then collapse after. I thought about it and we should start from a state of collapsed left, middle, collapsed right and expand tabs while they fit. This current version is completely consistent from what I can tell! Now it should fully close #668 and #699. But it does not attempt to keep active bar in the middle.

@prscoelho
Copy link
Contributor Author

Okay, now the active tab should be kept in the middle.

@imsnif
Copy link
Member

imsnif commented Sep 9, 2021

@prscoelho - this looks great! Thanks for your meticulous work on this :)

@imsnif imsnif merged commit f2850d2 into zellij-org:main Sep 9, 2021
@prscoelho prscoelho deleted the tab-bar-preserve-active branch September 9, 2021 15:26
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.

Inconsistent Tab Bar Behaviour at small window sizes
2 participants