httpref
httpref copied to clipboard
Better reference formatting
Is your feature request related to a problem? Please describe.
Formatting of the output in this tool is rather cumbersome. It would be great if we could use a modern CLI formatting library to do something better, perhaps using something like this: https://github.com/charmbracelet/lipgloss
Describe the solution you'd like Better control over the look and feel of the output. Perhaps some additional configuration to customise it for user needs.
@dnnrly could you assign me? I will.tinker with it in the coming days and see if I can add some knobs like:
- format options (json/yaml)
- Golang template printing (similar to docker ps --format)
I will also fig deeper into lipgloss to see if it fits the bill
I think I understand what you mean by reference formatting (without looking at lipgloss too much)
I think I can whip up a PR and some pictures and I'll ping you here
To be clear, will start the effort after being assigned :/
I don't typically assign issues as I've had problems with people not completing them before. But I've had some good quality PRs from you before so happy to.
❤️
created a PR to fix the make test
, can extend it to be across the whole binaries used
https://github.com/dnnrly/httpref/pull/37
will take inspiration from https://github.com/aarol/goclean/blob/master/view.go, unless you have a better way of formatting
will take inspiration from https://github.com/aarol/goclean/blob/master/view.go, unless you have a better way of formatting
Yes, this is exactly the sort of thing I was thinking.
so I spoke to a friend who is a UI/UX expert, but I might create the base for him before he shows up and cleans it up color/UX wise.
wanted to let you know I didn't forget it and found some minutes to work on it
Nah, you're good. You've already done loads. Getting a designer involved is good. We need to focus on make it as easy and useful as possible.
yeah, but if I get him on it it'll look better and I will learn some design elements (which is always a good thing)
@dnnrly , this is the coloring I got to so far.
now each element can be updated individually.
also added a global state to allow for the width
to be updated on the fly (using dates and not bool as I heard a talk about it a while ago (can be moved back to bool if you want)