mrjackwills / oxker

A simple tui to view & control docker containers
MIT License
727 stars 24 forks source link

[NEW FEATURE] container name should be left-aligned #39

Closed aljazerzen closed 3 months ago

aljazerzen commented 4 months ago

I'd wish container name would be left aligned in the "Containers" table.

image

This happens regularly when using docker compose.

mrjackwills commented 4 months ago

Thanks, I saw the PR, but I suspect that as is the tests will be failing.

I think that maybe the left align should/could be a command line argument, maybe -l, --left. Also, do you think that the header (in the screenshot above - name and state) should also be left aligned?

aljazerzen commented 4 months ago

From when I was working in UI for a corporate/industrial monitoring platform, the rule was that:

I can add a command line argument, but I'm not sure there is a good case for text right alignment.

mrjackwills commented 4 months ago

Thank you, interesting rules.

As for left/right alignment, it was mainly because I, and I alone, thought it looked better right aligned. Still not 100% what the best thing for the headers are, especially as changing them from right to left aligned will mess up the white arrows used when sorting by each column - specially shifting the text, the arrows would need to become a suffix rather than the current prefix.

I'll have a play around with the PR, there is a new version to come out asap, with support for filtering containers & refactored tests, I am just waiting for Rust 1.80 to be released.