gh-dash
gh-dash copied to clipboard
Support customizing sections
Is your feature request related to a problem? Please describe. My company does not use Github Issues, so I have no need for the issues section. I'd love to hide it!
Describe the solution you'd like A config option to specify which sections should be shown.
Describe alternatives you've considered Just ignoring the issues section. :) But if https://github.com/dlvhdr/gh-dash/issues/141 is ever supported (and I really hope it is!) then it would be more important, imo, to be able to customize which sections are shown because then there would be three.
Thanks for the awesome project!
I like this idea :) Shouldn't be too hard to add.. Do you want to maybe contribute it?
I'd be happy to, but I'm not sure I'll have time. 😞 If I find myself with the bandwidth, I'll comment here and ask you to assign this to me 👍🏻
Glad to hear it wouldn't be too difficult. I've never written any go before, so I'll have a bit of a learning curve. Could you give me an overview of how it might be implemented? That'll definitely give me a head start :D
No problem, only if you have time. You'd have to learn the basics of go and bubbletea which could be a cool learning opportunity 😎
I started poking around the code and I had a couple of thoughts I wanted to run by you before doing anything.
It's very tempting to want to make a new top-level config option called sections
and nest the prSections
and issuesSections
options underneath that. That would also help pave the way for a notifications section, should there ever be one.
However, that's a huge change and wouldn't be backward compatible, so I'm guessing that's not really tenable.
An alternative could be adding a boolean flag to the SectionConfig
type (include
or something) that defaults to true. So if you want to remove a section, you simply set include
to false. That's probably the way to go. What do you think?
Also, I'm noticing a number of if/elses that assume there's only ever two possible sections - PRs or Issues. Here's an example: https://github.com/dlvhdr/gh-dash/blob/d25d8101d5717a4e10ae83c2d33ae8d1fb7a3a08/ui/ui.go#L295-L301
If I'm updating that code anyway, what do you think about me changing those ifs to switches to more easily support new sections?
Thanks for your guidance!
An alternative could be adding a boolean flag to the SectionConfig type (include or something) that defaults to true.
Yeah that sounds like a good idea.
I'm using starship (a command prompt) that does something similar.
They use the disable = true
toml syntax to remove sections.
I agree that doing a backward incompatible change is less preferable.
If I'm updating that code anyway, what do you think about me changing those ifs to switches to more easily support new sections?
Sure that sounds great.
Should be solved by #145
Should be solved by #145
Did you mean another issue? I think this is already solved as well but maybe you meant #187 ?