Configurable FileExplorer footer#4
Open
keyvizsla wants to merge 2 commits into
Open
Conversation
f2c7be1 to
b2e7519
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
This PR adds functionality to customize the listed keybindings in the footer of the FileExplorer.
Why
While using ratatui-interact for a personal project, I realized that I needed to implement the keybinds for the FileExplorer myself, yet the footer would always display a default set of keybinds, which might not apply in my case, since I need to define my own keybinds anyway.
Therefore, I have added this FooterBuilder, where you can define what keybinds to list exactly, should you want to do so.
Does this break existing functionality?
This is not a breaking change. The FileExplorer per default uses the default FooterBuilder, which then outputs the exact same footer, as the "old"
build_footermethod.The FooterBuilder is somewhat rudimentary and really only lets you define custom keybinds, but in the future if someone desires that feature, one could also add custom styling configuration and such for the footer itself.