dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
7.05k stars 206 forks source link

feat: make column titles configurable #379

Closed alexkalderimis closed 4 months ago

alexkalderimis commented 4 months ago

Prior to this change, column titles were hard-coded.

This change allows column titles to be defined in configuration.

Summary

The current behavior requires the use of a nerd-font, which the user may not have or want. This allows titles to be configured manually, which allows for natural language titles.

How did you test this change?

Manual testing, using the following config section:

prSections:
  - title: Mine
    filters: is:open author:@me
    layout:
      updatedAt:
        title: Age
      repo:
        title: Repo
      author:
        hidden: true
      lines:
        title: Lines
      ci:
        title: Checks
      reviewStatus:
        hidden: true
      state:
        hidden: true

Images/Videos

Screenshot 2024-05-29 at 4 30 03 PM
alexkalderimis commented 4 months ago

Thanks for your reply @dlvhdr! I can certainly look into adding a more general useNerdFonts configuration setting - it is definitely a good idea.

However, I think that customizable column names are both valuable in their own right (for internationalization if nothing else) and the foundation for building more general solutions on.

Personally, I'm already using custom names, and I prefer it

alexkalderimis commented 4 months ago

Oh, and actually, I am already using Checks for the CI column and with a non-nerd font it does indeed just display coloured boxes - they are actually fine, since the colours contain all the information, so I didn't even notice I was missing anything at first.

For accessibility however, we will need to support custom icon sets of course, so that colourblindness is not an issue.

dlvhdr commented 4 months ago

We could replace the icons with text like PASS/FAIL

alexkalderimis commented 4 months ago

@dlvhdr - I have created a separate PR (https://github.com/dlvhdr/gh-dash/pull/380) to introduce icon sets. It was clear that doing so is orthogonal to the ability to have custom column headers (something I'd still like of course!).

alexkalderimis commented 4 months ago

We could replace the icons with text like PASS/FAIL

I believe this is best addressed as part of #380 - I would like to keep this PR from growing if possible and to make it limited to the functionality of customizing column headers

dlvhdr commented 4 months ago

Hmm I can see some downsides to this approach we can flesh out.

WDYT?

alexkalderimis commented 4 months ago

Thanks for your reply @dlvhdr

Hmm I can see some downsides to this approach we can flesh out.

* GitHub themselves don't support localization

I don't entirely understand the point - this is not a GitHub product, and if I understand it the expected user is someone who wants more control over their interface. I don't think you need to provide translations, but allowing the user to provide their preferred text seems only polite.

* Any config value we add is a contract with our users so any change is potentially a breaking change

This is true of all features, of course

* This would require a lot of configuration from the user and I'm not sure it's better than providing a set of defaults with a `useNerdFont` option.

I can see the argument - #380 aims to address that approach.

I personally don't have a problem with the level of configuration, but I am just one person.

WDYT?

I clearly think that this is a good idea - I implemented it for myself and considered that if I wanted it, then others might appreciate it.

I don't mind either way of course how you choose to proceed - it is easy to maintain my own fork/patches for this functionality, if you prefer to close this PR

dlvhdr commented 4 months ago

I think I would prefer to implement it with a single property...

alexkalderimis commented 4 months ago

That's ok with me - feel free to close this PR and I look forward to your input on #380

Il sab 1 giu 2024, 12:27 Dolev Hadar @.***> ha scritto:

I think I would prefer to implement it with a single property...

— Reply to this email directly, view it on GitHub https://github.com/dlvhdr/gh-dash/pull/379#issuecomment-2143505199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKU3V3KVEOZ66QU55PI7DZFHY6ZAVCNFSM6AAAAABIPUTGYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGUYDKMJZHE . You are receiving this because you were mentioned.Message ID: @.***>