CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

feat // theme adjusting to appearance

Open adsalad opened this issue 3 years ago • 1 comments

Description

This theme allows the user to toggle a checkbox to sync dark/light themes with dark/light/auto MacOS system appearance.

Related Issue

  • #714

Checklist

  • [x] I read and understood the contributing guide as well as the code of conduct
  • [x] My changes generate no new warnings
  • [x] My code builds and runs on my machine
  • [x] I documented my code
  • [x] Review requested

Demo

https://streamable.com/myx0t5

Note

I wanted to initialize selectedDarkTheme and selectedLightTheme to lightThemes[0] and darkThemes[0] if the user has never selected a theme before (think first CodeEdit launch). However, my dark and light theme values were still somehow preserved even after running a clean build. I'd like to know if you have a similar experience to this.

adsalad avatar Sep 13 '22 03:09 adsalad

We should probably keep selectedDarkTheme and selectedLightTheme which should default to Xcode dark and light themes if they are not yet defined (first launch).

Also, theme adjustments should happen without having to close the editor window as you are showing in your video. (If you want to save that for another PR, please note this in the description).

austincondiff avatar Sep 13 '22 15:09 austincondiff

@adsalad To your note, have you delete the .codeedit folder in ~/? I believe that fix the issue.

matthijseikelenboom avatar Sep 17 '22 18:09 matthijseikelenboom

@adsalad Were you still going to change those variables to selectedDarkTheme and selectedLightTheme?

austincondiff avatar Sep 19 '22 18:09 austincondiff

@austincondiff Sorry for the lack of response.

  1. Regarding the selectedDarkTheme/selectedLightTheme, is there any way to initialize them to a default theme in their declaration?
  2. I can try and make theme adjustments work immediately, Ill comment back here if I think the feature is more complicated and should be split into another PR

adsalad avatar Sep 26 '22 16:09 adsalad

@adsalad: @matthijseikelenboom created #765 which piggybacks off of this PR (we weren't getting a response so we had to move forward).

austincondiff avatar Sep 26 '22 17:09 austincondiff

Closing in favor of #765. Thanks for getting us most of the way there @adsalad!

austincondiff avatar Sep 27 '22 16:09 austincondiff