Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 #21

Open
5 of 10 tasks
bash opened this issue Sep 3, 2024 · 0 comments
Open
5 of 10 tasks

1.0 #21

bash opened this issue Sep 3, 2024 · 0 comments
Milestone

Comments

@bash
Copy link
Owner

bash commented Sep 3, 2024

I think this crate is basically stable modulo minor improvements.

However before releasing 1.0 I'd like to re-review the API and maybe ask @janhohenheim if he has any input.
It might also make sense to wait for windows support to be released into the wild and for bat to ship terminal-colorsaurus. Maybe there's some feedback that we need to incorporate?

A couple of things that I already noticed:

  • ColorScheme has a default impl (is that a good idea?)
  • everyone has to pass QueryOptions::default (maybe I should change the default functions to take no params and have separate func_with(QueryOptions) overloads?)
  • Is #[non_exhaustive] really needed on ColorPalette -> keeping it for now
  • Currently every consumer has to do the is_terminal check themselves which means every function gets a big "caveats" section. Is this the best option?
    • Maybe moving the caveats section to the crate docs might be good.
  • is color scheme really the best name? See ColorScheme is a misnomer #18
  • Raise MSRV? (Check where bat and delta are packaged and check what rust version these distros have)
  • It'd be nice to add additional information to UnsupportedTerminal but for that I probably want a UnsupportedTerminalError with private fields for now so I don't have to commit to a repr.
  • Should ColorScheme have a Display impl? -> I don't think there's a single canonical representation for it, let's not add it.
  • Is it really necessary to query both bg and fg color for the color scheme? How bad is the perf impact on slow terminals?
  • I should also revise the crate docs a bit. Most notably I want to add a section "Should I try to detect the terminals theme?".
    In most cases the answer is "no".
    • Moving the crate comparison to a docs module might also make sense, the crate-level docs are currently very crowded.
@bash bash added this to the 1.0 milestone Sep 26, 2024
@bash bash mentioned this issue Sep 26, 2024
Draft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant