Colors and buttons, oh my #1831
Replies: 4 comments 9 replies
-
I haven't announced it broadly yet because I'm not entirely committed to the |
Beta Was this translation helpful? Give feedback.
-
Currently we have:
I guess for this purpose we would make a new function that gets the marked-up version. We maybe could rename This would make it possible to add non-computational markup via a special Column type (or a hacked-up plugin), and any markup in the value itself would be included in the value for computation and saving properly, but then that markup would also affect the cell display, which is may not be desirable. This would also mean that the fmtstr itself couldn't introduce "invisible" markup, though why you'd want that is not immediately clear to me. But is this actually that useful? I've debated back-and-forth about whether the cell display should parse this internal markup or not, and/or how people might use it for the "conditional formatting" everyone loves so much. The first use case we have is to show positive numbers in green and negative numbers in red, and of course have that not affect any computation or saving, but also be applicable to existing columns. There is the This is a pretty major internal architectural change, btw. I'm tempted to just always display cell values literally (without parsing markup) until we have a solid solution to this, in large part because I don't see any use for non-conditional formatting within the value itself. |
Beta Was this translation helpful? Give feedback.
-
If I have a formatter which inserts these codes (like below), should the colors be shown when the formatter is applied?
Appreciate it's early days with the colorising, but I have a use case to highlight certain sections of a cell and thought I'd try it, but it doesn't seem to work for me |
Beta Was this translation helpful? Give feedback.
-
How would the It sounds like it will still be possible to use this markup, but there will be an extra step to turn it on. Is that what you are thinking? I would like to see a way for this new feature to still exist in some form. |
Beta Was this translation helpful? Give feedback.
-
@saulpw you are a sly one. You taught VisiData how to handle buttons and how to do per character colors. 🤯 I wasn’t expecting that…
This works in cell values, column names, and the sidebar. I haven’t checked what it can do in the status bar.
For anyone else who missed this you can now use tags for coloring values and for making buttons like this one:
[:red]tomatoes[:][:green]frog[:][onclick long-command input]button[:]
Commits are only on the
develop
branch:Beta Was this translation helpful? Give feedback.
All reactions