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

Ellipsis overflow button appearance flickers #215

Open
irahopkinson opened this issue Jul 26, 2023 · 0 comments
Open

Ellipsis overflow button appearance flickers #215

irahopkinson opened this issue Jul 26, 2023 · 0 comments

Comments

@irahopkinson
Copy link
Contributor

irahopkinson commented Jul 26, 2023

There are two CSS settings when used together that cause this issue: tabs take all the space; and hide tab group overflow button when the button is not needed. The CSS looks like this:

/* tabs take all the space */
.dock-layout .dock-nav-list {
  flex-grow: 1;
}
.dock-layout .dock-tab {
  flex: 1 0 auto;
}

/* Hide tab group overflow button when the button is not needed */
.dock-layout .dock-nav-operations-hidden {
  display: none;
}

When you resize panels, the code can't always decide if it should show the ellipsis overflow button as shown here:
SandboxEllipsisFlicker
I've created this CodeSandbox to demonstrate the issue.

I've created another CodeSandbox with a patch that alleviates the issue by debouncing the appearance of the button but it doesn't completely solve it as you can see in the CodeSandbox (however, this patch was sufficient for my use).

I haven't created a PR to fix it here because the issue is in the dependency rc-tabs, which in the latest rc-dock (v3.2.18), rc-tabs is at v11.16.1. However, the latest rc-tabs is at v12.10.0 so a PR there won't help rc-dock. Besides the code there in v12 has changed enough for me to think the issue may have already been fixed (the relevant code is in useVisibleRange and where it's called in TabNavList). An upgrade to the latest rc-tabs would be a good first start to fixing this and may be sufficient.

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

1 participant