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

[tuify] Use offscreen buffer from r3bl_tui to make repaints smooth #118

Closed
nazmulidris opened this issue Sep 7, 2023 · 7 comments
Closed
Labels

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Sep 7, 2023

Context:

The r3bl_tui crate uses OffscreenBuffer as a way to massively increase the performance of terminal repainting.

Use the OffscreenBuffer in r3bl_tuify to make repainting really fast. And w/ all this extra headroom for performance use lolcat and other enhanced styling for rendering the selection and non selection (all of these can be found in the r3bl_tui crate). For ex, we can not only use interesting emoji and other ANSI glpyhs, we can also use gradient color foregrounds and background much like you see in the r3bl_tui crate.

Here are some videos to illustrate:

@nazmulidris nazmulidris added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 10, 2023
@nazmulidris nazmulidris transferred this issue from another repository Sep 10, 2023
@nazmulidris nazmulidris changed the title Use offscreen buffer from r3bl_tui to make repaints smooth [tuify] Use offscreen buffer from r3bl_tui to make repaints smooth Sep 12, 2023
@johnmcl001
Copy link
Contributor

I can take a look at this.

@nazmulidris
Copy link
Member Author

This issue is open for anyone to work on.

@nazmulidris
Copy link
Member Author

@e0lithic Please let me know if you have any questions about this one.

@johnmcl001
Copy link
Contributor

@nazmulidris Apologies for disappearing for 3 weeks, personal stuff came up 😞.

@nazmulidris
Copy link
Member Author

@johnmcl001 Oh no, I hope you are doing well. Whenever you have opportunity & time & motivation, you are most welcome to start contributing again! ❤️

@e0lithic
Copy link
Contributor

Overview:

  • Exploration of a solution involving an inline buffer encountered challenges, particularly related to terminal resizing.

Considered Solution:

  • Created a buffer matching the required viewport dimensions.
  • Determined the buffer position in the terminal and printed it at this offset.

Constraints:

  • Major issues emerged during terminal resizing.
  • Inconsistent behaviors across different emulators, even in windowed and maximized modes.
  • Difficulty in reconciling diverse behaviors for all potential terminals.

Possible Workarounds:

  • Contemplated capturing the entire screen as a potential workaround.
  • Acknowledged that this approach falls within the domain of tui and is currently out of scope for the existing library.

@nazmulidris
Copy link
Member Author

nazmulidris commented Nov 19, 2023

@e0lithic Thank you so much for capturing this context. This has been a great area of exploration for our core technology. And thank you for leading the charge in this arena and heading into the unknown to see how far we can push this thing! Kudos! 🎉

This is an excellent first PR for someone who is new to TUI and Rust! 👏🏽 🚀
#203

And thank you for bringing light to the resize issue. We have a fix here but it is limited in what we can achieve due to terminal restrictions.

26a3609

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

No branches or pull requests

3 participants