-
Notifications
You must be signed in to change notification settings - Fork 815
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
TabbedContent.remove_pane
unexpected behaviour
#2807
Comments
davep
added a commit
to davep/textual-sandbox
that referenced
this issue
Jun 19, 2023
davep
added a commit
to davep/textual
that referenced
this issue
Jun 19, 2023
By the looks of things the bug is actually in |
davep
added a commit
to davep/textual
that referenced
this issue
Jun 19, 2023
Marked as xfail for the moment, I suspect the root cause of Textualize#2807.
willmcgugan
added a commit
that referenced
this issue
Jun 20, 2023
* Add a unit test for #2807 * Add a test for removing tabs in reverse * Add a test for the messages sent when removing tabs in reverse Marked as xfail for the moment, I suspect the root cause of #2807. * Don't sent Changed when tab removal doesn't result in change * Update the CHANGELOG --------- Co-authored-by: Will McGugan <[email protected]>
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stemming from a question on Discord, there is something not quite working right with
remove_pane
, which unfortunately didn't get noticed with the current set of unit tests (or the test rig I built for visually/manually testing and experimenting). There are two issues at play, which I think are related.First, if you run up this code:
first notice that the first tab is highlighted. Now hit Delete. At this point we'd expect the third tab to be removed and the highlight to remain in place. Instead it slides over to the second tab!
And then on to the problem reported on Discord. If you take a variation on the above, like this:
so just the two tabs, and do the same, that results in an exception.
The priority here is to start out with a version of this test, but remove the panes in reverse. This should fail.
The text was updated successfully, but these errors were encountered: