You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WIP Band-aid fix for the failing integration tests
The problem here is that the view selection is out of sync with the list model
selection, because section headers have been added or removed since the last
refresh, but the view selection hasn't been updated accordingly. The
synchronization of list model selection to view selection is part of the
HandleFocus call that runs at the end of postRefreshUpdate, but it only runs if
the view is focused. In these two tests, a different view is focused at the time
we check the selection, hence the failures.
Fix it by focusing the view whose selection we want to check. For the
rebase_and_drop test this fix is good enough because you don't see the selection
while the other panel is focused; for the other test though there is actually a
visual bug (although very minor): as long as the error panel is showing, we show
the selection in the underlying view in bold text, and you can see that the
wrong item is selected as long as the error panel is showing. This is even more
obvious when setting the gui.theme.inactiveViewSelectedLineBgColor config.
A better fix would be to untangle the responsibilities of the HandleFocus call.
Right now it does two things: FocusLine, which sets the view selection, and
render to main view. The latter is the reason why we can only call it if the
view is focused, but the former needs to happen unconditionally. However, this
feels like a bigger refactoring that I'm not sure we should do as part of this
PR.
0 commit comments