Refactor: Create ScrollableTextView component
Multiple UI elements have a text area with a vertical scroll bar. This can be refactored into a reusable component to reduce code duplication and improve UI consistency.
Tasks:
- Create
ScrollableTextViewcomponent - Refactor
MsgPopupto use new component - Refactor
DetailsComponentto use new component
Looks like we could use ratatui's built in Scrollbar widget instead of our custom one. This could simplify scroll_vertical.rs and scroll_horizontal.rs and probably remove scrollbar.rs entirely. Would you like this done?
Here's a comparison of the current scrollbar:
And the ratatui built in (default look):
I havent looked into the impact of this but i am all for simplifying and using a upstream solution where we can if it does not degrade performance
I havent looked into the impact of this but i am all for simplifying and using a upstream solution where we can if it does not degrade performance
I think swapping the custom scrollbar with the ratatui one shouldn't be too difficult, I'll make a PR so we can test the changes
I've made a small PR to test the scrollbar. You can see the new scrollbar in e.g. tag description or the file list. Looks like a lot of scrollable components don't use VerticalScroll. https://github.com/extrawurst/gitui/pull/2393