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

feat(list): add option to always allocate the "selection" column width #394

Merged
merged 2 commits into from
Aug 13, 2023

Conversation

hasezoey
Copy link
Contributor

Before this option was available, selecting a item in a list when nothing was selected previously made the row layout change (the same applies to unselecting) by adding the width of the "highlight symbol" in the front of the list, this option allows to configure this behavior.

re #375

TL;DR: the same as #375, but for widgets::List

implementing this for list was easier than Table because it already had basically everything in-place

Before this option was available, selecting a item in a list when nothing was selected
previously made the row layout change (the same applies to unselecting) by adding the width
of the "highlight symbol" in the front of the list, this option allows to configure this
behavior.
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #394 (20e988a) into main (f63ac72) will increase coverage by 0.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
+ Coverage   85.11%   85.31%   +0.19%     
==========================================
  Files          40       40              
  Lines        8736     8851     +115     
==========================================
+ Hits         7436     7551     +115     
  Misses       1300     1300              
Files Changed Coverage Δ
src/widgets/table.rs 92.15% <ø> (ø)
src/widgets/list.rs 98.28% <100.00%> (+0.25%) ⬆️

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

LGTM

src/widgets/list.rs Outdated Show resolved Hide resolved
@joshka joshka added this pull request to the merge queue Aug 13, 2023
Merged via the queue into ratatui-org:main with commit 4d70169 Aug 13, 2023
30 checks passed
@hasezoey hasezoey deleted the listAlwaysSelect branch August 13, 2023 10:01
@joshka joshka added this to the v0.23.0 milestone Aug 21, 2023
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.

None yet

3 participants