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): fix tab bar click when tabs are collapsed, fix tab bar length calculation #1658

Merged
merged 3 commits into from
Sep 9, 2022
Merged

Conversation

prscoelho
Copy link
Contributor

@prscoelho prscoelho commented Aug 14, 2022

Fixes #1603 , as well as another bigger issue. I noticed that clicking on a tab used index in the linepart vector, which will be incorrect for every tab if there's collapsed tabs. We have to save tab index in LinePart, and then use that to switch tabs.

Clicking on the collapsed tabs brings the user to the first hidden tab on that side.

Fixing the issue in #1603 was as discussed in the issue, as well switching the click comparison to be click >= length && click < length instead of click > length && click <= length

@prscoelho
Copy link
Contributor Author

I split it into two commits, but let me know if you'd prefer this squashed.

Copy link
Member

@imsnif imsnif left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long to get to this! This looks great. I gave it a go and it fixes the problem. Thanks for your work on this.

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.

Probably incorrect calculation of tab length in tab-bar plugin
2 participants