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

Consider migration to crossterm #133

Open
kamiyaa opened this issue Jan 26, 2022 · 10 comments
Open

Consider migration to crossterm #133

kamiyaa opened this issue Jan 26, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@kamiyaa
Copy link
Owner

kamiyaa commented Jan 26, 2022

With the release of tui-rs 0.17.0, crossterm is now the default backend for tui-rs.

We might consider migrating to crossterm if there are clear advantages.

Research and feedback would be appreciated.

I will do some research whenever I have time.

@adrianstaniec
Copy link

I think the clear advantage would be that it would make josuto also available on Windows!

@Ragnyll
Copy link
Contributor

Ragnyll commented May 4, 2023

@kamiyaa is there any chance that you are actively looking at this? I'm starting to look into changing backend.rs to crossterm so I can spend some time with this if it'd help at all.

Using file explorer on window is horrible. So if I can help this along somehow that would great.

Funnily looking to this his how i got down in the rabbit hole of #289

@kamiyaa
Copy link
Owner Author

kamiyaa commented May 4, 2023

@Ragnyll not currently looking into this at the moment.
If we do migrate, I would probably want to keep the termion backend around but just behind a feature flag.
Because from my experience, different backends tend to behave a little differently even if they have the same features

@Ragnyll
Copy link
Contributor

Ragnyll commented May 6, 2023

i've started a branch over on my fork to screw around with this. At this point I'm just trying to wrap my head around how tui + crossterm + termion work. Hopeuflly i can get a better idea on that this weekend so i can make a little progress. If you have a good idea on what needs to change and wanna enumerate that out here that might be helpful, Otherwise I'm just braindumping whatever i can find as im following the code around on my WIP pr Ragnyll#2 .

@Ragnyll
Copy link
Contributor

Ragnyll commented May 8, 2023

For whomever is watching this, I've got the AppBackend re-implemented such that the initial UI is rendered. However i still need to rework the event handling system so that it actually does someting. I'm making progress, but this is probably the hard part. We'll see what I can knock out this week.

@Ragnyll
Copy link
Contributor

Ragnyll commented May 24, 2023

Hey, so just so yall know, i am still working on this. From @kamiyaa 's request to keep the current termion backend intact and have this be enable via a feature makes this significantly more difficult. Everything on the event side is wired into termion. I tried swapping it out without regard for keeping termion working and i'm still left with a ton of crashes from todo!() .

I'm going to restart from what i had working before, which was really just the tree render, then refactor everything with traits. I think that will make this eventual migration easier. I think that's the move in case we ever need to do something like this again anyways. The tight coupling here makes backend changes rough. that's probably not a surprise to anyone here.

I'm sorry if I'm not moving as fast as people would like to see this feature. My time is pretty limited, but I'm trying to make progress when i can.

@DLFW
Copy link
Contributor

DLFW commented May 24, 2023

We all know the "limited time" problem ;)

It takes what takes. Your efforts are for sure appreciated! If you can really manage to abstract the backend behind traits, that would be amazing. Hope that goal is reachable with feasible efforts and without to much added code complexity. Wish you luck! 👍

@Ragnyll
Copy link
Contributor

Ragnyll commented Jun 6, 2023

I started a conversation with some of the ratatui guys about some difficulties i'm encountering here. mostly just looking for opinions from them. I'm kinda fumbling around with the terminal read key stuff, if yall have any idea on how i can do that lemme know. i'm not actually getting the input into the buffer i think when using crossterm. Here's the link to the block im having trouble getting to work correctly on crossterm on my branch.

also here is the ratatui discussion if you wanna see it, or just hop in the conversation on that discord
2023-06-06-000744_2590x965_scrot

@adrianstaniec
Copy link

because of this issue I switched to
https://github.com/sxyazi/yazi
(just saying, not hating or sth)

@kamiyaa
Copy link
Owner Author

kamiyaa commented Sep 18, 2024

I can look into this again. Thanks for all the work @Ragnyll 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants