feat: new tbl_col and tbl_cell in theme system for spotter table styling#2391
feat: new tbl_col and tbl_cell in theme system for spotter table styling#2391
tbl_col and tbl_cell in theme system for spotter table styling#2391Conversation
|
These fields names aren't clear to what they actually affect. Using your diagram:
|
|
The green "header" text on the left above each list of fields also doesn't seem themable? |
Didn't quite understand, could you draw a diagram? |
|
Yeah totally: Boxes in green (and yellow) are what I think are supposed to be cells of the spotter table. They are the boxes you can move up and down in with the arrow keys. The yellow box aroundn the yellow background, at the top, is the currently selected/hovered table cell. If I move the arrow keys up/down, the selected (yellow box) moves. I think all the green boxes - not hovered table cells - should be configured by Ideally, I would think of an even finer configuration. The red "cells" are what I would also think of as cells, but are not configurable. The green text above each set of red "cells" are also cells presumably, also not configurable. Something like this maybe, splitting this "table" and "cells" concept away from the spotter specifically. [spot]
border = { fg = "blue" }
title = { fg = "blue" }
[table]
# Red boxes (fields/keys of the table like 'created:' and 'mimetype:').
key_cell = { fg = "white" }
# Green boxes (values of the table like 'video/mp4' or '0:48').
value_cell = { fg = "blue" }
# Yellow box/text (current selected value of the table, the created date value in my diagram).
value_cell_selected = { fg = "yellow", reversed = true }
# Not on diagram, but green text above each set of red boxes (headers like 'video', 'base', and 'plugins').
header_cell = { fg = "green" } |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [sxyazi/yazi](https://github.com/sxyazi/yazi) | patch | `v25.2.11` -> `v25.2.26` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>sxyazi/yazi (sxyazi/yazi)</summary> ### [`v25.2.26`](https://github.com/sxyazi/yazi/releases/tag/v25.2.26) [Compare Source](sxyazi/yazi@v25.2.11...v25.2.26) #### Breaking Changes - `separator_open` and `separator_close` have been replaced with the new `sep_left` and `sep_right`. sxyazi/yazi#2313 - The `[completion]` component has been renamed to `[cmp]`. sxyazi/yazi#2399 #### Deprecated - `MANAGER`, `PREVIEW`, `PLUGIN`, and `THEME` have been deprecated in favor of the new `rt` and `th`. sxyazi/yazi#2389 - `ya.manager_emit()` has been deprecated in favor of the new `ya.mgr_emit()`. sxyazi/yazi#2397 #### Built-in Previewer Improvements - The JSON previewer will now respect the user's `wrap` setting to support automatic JSON line wrapping. sxyazi/yazi#2337, thanks [@​boydaihungst](https://github.com/boydaihungst) - The PDF previewer will now respect the user's `max_width` setting to address the issue of previewing content that is too small. sxyazi/yazi#2331 - The ImageMagick previewer will now respect the user's `image_alloc` setting to limit memory usage. sxyazi/yazi#2403 #### New Search Engine: [`rga`](https://github.com/phiresky/ripgrep-all) sxyazi/yazi#2383 (thanks [@​paperbenni](https://github.com/paperbenni)) has added a new [`ripgrep-all`](https://github.com/phiresky/ripgrep-all) search engine. It is a wrapper around `ripgrep` that supports additional file formats (such as PDF, docx, epub, etc.). You can use it with the `search --via=rga` command. #### Allow to Specify Layer for Keymap Commands With sxyazi/yazi#2399, you'll now be able to assign commands from different layers to a keybinding in `keymap.toml`. This opens up the possibility of interacting with any other component, such as accessing commands from the manager (`[manager]`) within the input component (`[input]`): ```toml [[input.prepend_keymap]] on = "<Esc>" run = [ "close", "mgr:escape --filter" ] desc = "Close input and cancel the filter" ``` When you press `Esc` in the input box to exit the filter view (triggered by the `f` key), the filter will be canceled as the input is closed. #### More Flexible Status Bar Customization sxyazi/yazi#2313 (thanks [@​PFiS1737](https://github.com/PFiS1737)) introduces `sep_left` and `sep_right` to replace the previous `separator_open` and `separator_close` settings, allowing different separators to be set for the left and right sides:  #### Support for Setting Spotter Table Styles sxyazi/yazi#2391 introduces two new settings, `tbl_col` and `tbl_cell`, in `theme.toml` to configure the styles for spotter table columns and cells, respectively. <img src="https://github.com/user-attachments/assets/f2167e58-96c3-4a66-a244-1150e3e80e43" height="400" /> #### What's Changed * feat!: allow different separators to be applied individually to the left and right sides of the status bar by @​PFiS1737 in sxyazi/yazi#2313 * fix: load mount points with the best effort even if the `/dev/disk/by-label` directory does not exist by @​sxyazi in sxyazi/yazi#2326 * feat: CSI-based Vim and Neovim built-in terminal detection for better accuracy by @​sxyazi in sxyazi/yazi#2327 * feat: respect the user's `max_width` setting for the built-in PDF preloader by @​sxyazi in sxyazi/yazi#2331 * feat: respect the user's `wrap` setting for the built-in JSON previewer by @​boydaihungst in sxyazi/yazi#2337 * refactor: consistent naming for enum variants by @​sxyazi in sxyazi/yazi#2339 * feat: new `external` and `removable` fields in the `fs.partitions()` API by @​sxyazi in sxyazi/yazi#2343 * feat: terminal response detection under async stdin by @​sxyazi in sxyazi/yazi#2347 * fix: incorrect kebab-case for the notify level enum by @​hankertrix in sxyazi/yazi#2349 * fix: add maximum preview limit under `/proc` virtual file system by @​sxyazi in sxyazi/yazi#2355 * feat: add a link to the debugging instructions in `yazi --debug` by @​sxyazi in sxyazi/yazi#2365 * fix: didn't reset previous `Cha` when loading directories in chunks by @​sxyazi in sxyazi/yazi#2366 * feat: make incompatible version message more clear by @​sxyazi in sxyazi/yazi#2377 * feat: bump `trash` and `libc` versions to support NetBSD by @​sxyazi in sxyazi/yazi#2388 * feat: new `rt` and `th` allow to access user configuration and theme scheme in sync/async plugins consistently by @​sxyazi in sxyazi/yazi#2389 * feat: new `tbl_col` and `tbl_cell` in theme system for spotter table styling by @​sxyazi in sxyazi/yazi#2391 * feat: add ripgrep-all support for search by @​paperbenni in sxyazi/yazi#2383 * feat: new `cf.args` to access startup arguments by @​sxyazi in sxyazi/yazi#2392 * refactor: rename `cf` to `rt` by @​sxyazi in sxyazi/yazi#2393 * feat: expose `mode` field in `Cha` by @​sxyazi in sxyazi/yazi#2394 * refactor: rename `rt.manager` to `rt.mgr`, and `th.manager` to `th.mgr` by @​sxyazi in sxyazi/yazi#2397 * feat!: allow to specify layer for keymap commands by @​sxyazi in sxyazi/yazi#2399 #### New Contributors * @​PFiS1737 made their first contribution in sxyazi/yazi#2313 * @​paperbenni made their first contribution in sxyazi/yazi#2383 **Full Changelog**: sxyazi/yazi@v25.2.11...v25.2.26 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODEuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
|
@sxyazi any thoughts on my suggestions above? |
|
Ratatui also lacks an API for styling "cells" as a group - you can only operate on one (and the only) cell, which is the intersection of the current row and column. If you want to style multiple "cells", you would need to treat them as a whole row or column, and the existing yazi/yazi-plugin/preset/plugins/file.lua Lines 22 to 28 in 3dc6d82 |


Follow up to #2389
An implementation of the feature request: #1986
Closes #1986