-
Notifications
You must be signed in to change notification settings - Fork 993
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
Update to cursive 0.16 #3547
Update to cursive 0.16 #3547
Conversation
Hi @gyscos thank you for the PR! Would you be able to fix the depreciation warning too?
Thanks ! |
Would you consider moving back to the upstream cursive_table_view? (The EDIT: I just realized there were a few more changes to the |
I'll look into it. Though I'm not very familiar with that part of the code and the reasons why we use our own |
I've switched it to use the upstream cursive_table_view. I did not notice any difference except that some of the colors are differents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the "current" column is lost on refresh which makes sorting/navigation tricky.
The tui used to be like this an I guess we worked out a way to preserve the current selected column somehow.
It would be really useful if we could find a way to do this.
Example -
- use the arrow keys to select/highlight a column header
- screen refreshes before you have chance to change sort order
- defaults back to leftmost column highlighted
It becomes a race to navigate to the column and reorder it before the screen refreshes.
Similar issue with selecting and highlighting a row.
On screen refresh the selected row is lost (I think) and things jump around, seemingly arbitrarily.
@gyscos Is this behavior something we could consider pushing into the upstream cursive_table_view?
I'm not overly familiar with this code and I don't recall how much work it was for us to implement this "preserve row, column etc. across screen refresh" behavior.
It is entirely possible that there are changes we could make to the way we do refreshes that would mitigate this issue.
So any suggestions there would be appreciated.
There seem to be 2 different levels of "selected", I'll call them "soft" and "hard" select. |
Absolutely! It even sounds like a bug if the current selection is so easily lost.
I'll have a look. |
I think you'll want to use This takes care of the row selection. Now looking at column selection. ... Released in 0.13.2. Added a commit to this branch to switch to this version. |
Just tested this out and it works now! Thanks @gyscos! Edit: Actually maybe it was doing it this way before. Feels different somehow though. Maybe something is subtly different if the table body scrolls? I'm 👍 on this but maybe give it another day or so before merging to let people test it out if interested. |
The latest change does resolve the soft-selcted (highlighted) reset on refresh. |
Thanks @gyscos! Yeah @bladedoyle I noticed the mouse issue in specific configurations but not a blocker for me. LGTM 🚀 |
Ah indeed, the mouse issue should be fixed in 0.13.3. |
* Update to cursive 0.16 * Switch to upstream table view * Use TableView::set_items_stable
No description provided.