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

fix: Fixup preview rendering and logic of preview key binding being shown in shortcut list #387

Merged

Conversation

cartercanedy
Copy link
Contributor

@cartercanedy cartercanedy commented Sep 15, 2024

Fixup rendering of floating text and logc of preview key binding being shown in shortcut list

Type of Change

  • New feature
  • Bug fix
  • Documentation Update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

Any floating content that gets rendered has the possibility of rendering any text from the underlying widget. Prior to drawing the float content, the area that the float content is rendered to should be cleared prior to drawing the float content.

Impact

Having extraneous text present within the preview area might confuse users if the text that is presented from the underlying widget looks like valid bash. This removes the possibility for confusion.

Also, the key binding for showing the preview isn't rendered if the list widget is at the top-level dir of a category, but is properly shown in subdirs. The previewing capability is pretty nifty and should be properly displayed as a key binding when valid.

Issue related to PR

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

@cartercanedy cartercanedy changed the title Fixup preview rendering and logic of preview key binding being shown in shortcut list fix: Fixup preview rendering and logic of preview key binding being shown in shortcut list Sep 15, 2024
Copy link
Contributor

@nnyyxxxx nnyyxxxx left a comment

Choose a reason for hiding this comment

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

Thanks

@ChrisTitusTech ChrisTitusTech added the bug Something isn't working label Sep 19, 2024
@jeevithakannan2
Copy link
Contributor

jeevithakannan2 commented Sep 19, 2024

Please remove these lines from the code

https://github.com/ChrisTitusTech/linutil/blob/main/tui%2Fsrc%2Ffloating_text.rs#L105-L108

Your implementation is better and these lines are not necessary if this is merged

@jeevithakannan2
Copy link
Contributor

@ChrisTitusTech please implement the above requested changes before merging

@ChrisTitusTech ChrisTitusTech merged commit 1ea3267 into ChrisTitusTech:main Sep 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants