refactor(tab_strip): improve readability#220
Merged
Tieske merged 15 commits intolunarmodules:mainfrom Mar 22, 2026
Merged
Conversation
Closed
Tieske
requested changes
Mar 14, 2026
Member
Tieske
left a comment
There was a problem hiding this comment.
Nice PR. Some comments though.
Tieske
requested changes
Mar 15, 2026
Member
Tieske
left a comment
There was a problem hiding this comment.
only had little time, so didn't fully review
Tieske
reviewed
Mar 15, 2026
Tieske
reviewed
Mar 15, 2026
Tieske
reviewed
Mar 15, 2026
Tieske
reviewed
Mar 15, 2026
Tieske
reviewed
Mar 15, 2026
Tieske
reviewed
Mar 15, 2026
Member
|
This PR has merge conflicts since I merged another refactor. But would love to see a rebase, since this one also has a lot of nice refactors. |
Tieske
requested changes
Mar 19, 2026
src/terminal/ui/panel/tab_strip.lua
Outdated
| end | ||
|
|
||
| build_cache(self) | ||
| self:_build_cache() |
Member
There was a problem hiding this comment.
here we are reintroducing a method, I'd prefer to stick to the local function.
Contributor
Author
There was a problem hiding this comment.
why in ur opinion do you think sticking to local functions in the two methods I merge is prefered?
sharadxsingh
approved these changes
Mar 19, 2026
Extract helper functions for item processing, option validation, viewport state management, and tab line rendering. Add _get_selected_index to eliminate repeated lookup loops. Combine defaults into default_config and move constants to module level.
Typing rules mistakes fix, functions are lua-ish style Remove some extractions that reduces the readability
Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
ellipsis_width is the dynamically determine variable
Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
Tieske
approved these changes
Mar 22, 2026
Member
Tieske
left a comment
There was a problem hiding this comment.
@MohamedAmr26 pushed some updates myself. This is now good to go. Thx!
Contributor
Author
|
Alright, Thanks for mentoring! |
Gitkbc
pushed a commit
to Gitkbc/terminal.lua
that referenced
this pull request
Apr 2, 2026
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.
Extract helper functions for item processing, option validation, viewport state management, and tab line rendering. Add _get_selected_index to eliminate repeated lookup loops. Combine defaults into default_config and move constants to module level.