type-the-word icon indicating copy to clipboard operation
type-the-word copied to clipboard

Themes

Open JWCook opened this issue 1 year ago • 7 comments

Would you consider adding support for themes? Either built-in themes (with an easy way to submit more via a PR here) or user-defined color settings would be a welcome addition.

For example, monkeytype stores its built-in themes as just 4 color values stored in a JSON file, and also has a section in the settings menu to set user-defined colors.

JWCook avatar Jun 29 '24 05:06 JWCook

Hey @JWCook! I like this idea a lot. Especially creating a pattern so that other users can contribute.

I don't have a public roadmap right now, but I am working on a couple of other tasks. I'm migrating to App router, and after that I would like to:

Before those last three tasks though I will be reaching out to users to see what they would like most and I'll throw this one into the mix.

joshuawootonn avatar Jun 29 '24 20:06 joshuawootonn

Seems like most of your work is in python, but in the off chance you want to contribute I would be happy to help design a theme'ing setup like you described. Let me know!

joshuawootonn avatar Jun 29 '24 20:06 joshuawootonn

Sounds good! I occasionally do a little frontend work, but I may not have enough experience with this stack to be of much help.

I did look around a bit to see how others handle multiple themes with tailwind, though. There are several plugins out there that aim to make it easier, and two of the more actively maintained ones appear to be tw-colors and tailwindcss-themer.

From a quick look through this repo, it looks like the background and text colors currently come from builtin classes (bg-white, text-black, etc.) applied directly to each element, so I suppose the first step would be to move all that to tailwind theme config, then try out one of those plugins to support multiple themes. That's just one idea, though; there might be other ways to go about it, like CSS variables.

JWCook avatar Jun 29 '24 22:06 JWCook

I suppose the first step would be to move all that to tailwind theme config,

Definitely. I think this is the first step. Thankfully the themes I am using are so simple that it won't be to complicated. I really like how shadcn is doing this. So I would like to follow that convention of variables.

joshuawootonn avatar Jun 30 '24 01:06 joshuawootonn

Sounds good! I occasionally do a little frontend work, but I may not have enough experience with this stack to be of much help.

No worries. I'll get to it at some point.

I'll take a look at those two plugins too. I haven't seen those yet.

joshuawootonn avatar Jun 30 '24 02:06 joshuawootonn

@JWCook Hey I made the themes configurable. You can now toggle between light and dark mode.

CleanShot 2024-08-25 at 17 20 57@2x|300

I am thinking that next month I'll be able to implement the UI for a custom theme so that you can use custom colors. Stay tuned for that change :)

joshuawootonn avatar Aug 25 '24 21:08 joshuawootonn

Great, thanks for the update! Just tested it out and it looks good.

JWCook avatar Aug 25 '24 21:08 JWCook

Hey @JWCook you can now create your own themes in Type the Word. I did this across these PRs in case you are curious how it's implemented.

#12, #14, #15, #16, and #17

https://github.com/user-attachments/assets/f47bc195-1d49-4cbf-999d-39ed3464bc45

There are a bunch of videos in the changelog with details, but just wanted to keep you updated.

joshuawootonn avatar Dec 20 '24 13:12 joshuawootonn

Fantastic, thank you! I just tried it out, and this is a nice improvement.

In case anyone else wants a gruvbox-like theme:

Primary:   251,241,199
Secondary: 80,73,69
Success:   250,189,47
Error:     251,73,52

image

JWCook avatar Dec 31 '24 22:12 JWCook

Sick!

joshuawootonn avatar Jan 03 '25 03:01 joshuawootonn