Closed gabe565 closed 2 years ago
Pushed some minor changes in https://github.com/lrstanley/bubblezone/commit/e408d1dc3890b323ffead8233d3d6075aad3813d to improve that experience. Unfortunately, the list bubble isn't very extensible, and has a few odd quirks that make it difficult to customize. It uses indexes to change selected items, rather than relying on some ID, which means extra logic has to be taken into consideration for what items are visible, vs which aren't. Additionally, it looks as though when filtering, and it showing matching results, those results aren't propagated to item.VisibleRows()
. This means that using SetItem()
doesn't seem to do anything, because it thinks there are no visible rows.
I've fixed the example so it doesn't break, though it looks like the underlying issue is with bubbles itself. It looks like filtered results aren't 1:1 on top of the normal title boxes, so characters are left over from the previous view.
🌧 Describe the problem
Really impressed with this project, but am coming across an issue with list filtering. When filtering a list with bubblezone, parts of the identifier escape sequences are output in item titles.
⛅ Expected behavior
I would expect list characters to be stripped during filtering.
🔄 Minimal reproduction
list-default
example./ra
).💠 Version: bubblezone
3cb8c52f6a8f54cf189c461191b1ff5d97431148
🖥 Version: Operating system
macos
⚙ Additional context
Screenshot
Other
Would the code that adds the underline be stripping out the escape sequences? It seems like the underline is being added in the wrong place, causing a break in the escape sequences which results in them not being stripped from output.
Examples with escape sequences
Regular title with bubblezone:
[38;5;213m│[0m [38;5;207m[1001ZRaspberry Pi’s[1001Z[0m
Title during filter with bubblezone:[38;5;232m[4;38;5;232;4m[0m[4;38;5;232;4m[[0m[38;5;232m1001ZRaspberry Pi’s[1001Z[0m[0m
Title during filter without bubblezone:[38;5;232m[4;38;5;232;4mR[0m[38;5;232maspberry Pi’s[0m[0m
Thank you!
🤝 Requirements