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

Add minimal display mode #571

Merged
merged 1 commit into from
Nov 3, 2024
Merged

Add minimal display mode #571

merged 1 commit into from
Nov 3, 2024

Conversation

flipsi
Copy link
Contributor

@flipsi flipsi commented Oct 26, 2024

This adds a new display mode referred to as minimal.

It does exactly what it says on the tin - basically the current tab content is rendered full size (no miller columns like in default, no multipanes like in hsplit).

Screenshot_2024-10-26_22-59-44

This is similar to the multipane view in ranger when there is only one tab.

Disclaimer: I was personally missing this feature and built it by copy-pasting and cutting down existing code - not really knowing Rust. I hope I didn't miss anything important.

@@ -4,7 +4,7 @@ use ratatui::widgets::Widget;

use crate::types::option::display::DisplayMode;
use crate::types::state::AppState;
use crate::ui::views::{TuiFolderView, TuiHSplitView};
use crate::ui::views::{tui_minimal_view::TuiMinimalView, TuiFolderView, TuiHSplitView};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why I had to qualify this to make it compile, any help/explanation is appreciated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you add

pub use self::tui_minimal_view::*;

then it won't require you to do this. Up to you on if you add it though, I don't have a huge preference and will probably change it later anyways xd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint!

@flipsi flipsi mentioned this pull request Oct 26, 2024
Copy link
Owner

@kamiyaa kamiyaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@kamiyaa kamiyaa merged commit d5a25d3 into kamiyaa:main Nov 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants