-
Notifications
You must be signed in to change notification settings - Fork 1
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
Tweaks to Tab UI #164
Tweaks to Tab UI #164
Conversation
Not super fussed about the code changes, but I'm noting that the main.stan window refreshes when showing/hiding the errors pane, which doesn't happen on the main branch. |
Yeah, I noticed that. This version of a splitter doesn't support a variable number of children -- which is good, since we were running into issues with the size persisting from the old splitter because it was re-rendering based on the children array, but it does mean to get the old behavior we need to return a different component based on the value of syntaxWindowVisible. Do you know of any way to avoid re-rendering in that case? |
Hmm... One could memoize the main.stan pane maybe? I'm not sure if that would actually help, though, since its parent would be conditionally popping in and out, which is probably going to cause a rerender regardless... |
Yeah, that doesn't help, since the parent component is changing anyway. Maybe keep the |
Nope, that isn't it either--the |
@jsoules I found another option I could set to make the actual splitter itself invisible, so the fact that it's always two children no longer matters |
Oh awesome! |
hidden
. As such, the splitter was un-mounting its children if it was hidden.I preferred the look of the other splitter, and this one seems to be a bit heavier in terms of dependencies, so I'm open to alternatives here.