Skip to content

Add dark mode support#84

Merged
gfwilliams merged 6 commits intoespruino:masterfrom
RKBoss6:darkmode
Jan 8, 2026
Merged

Add dark mode support#84
gfwilliams merged 6 commits intoespruino:masterfrom
RKBoss6:darkmode

Conversation

@RKBoss6
Copy link
Copy Markdown
Contributor

@RKBoss6 RKBoss6 commented Dec 22, 2025

In conjunction with #4103, this helps add dark mode to the app loader. Adding dark mode helps significantly with eye strain, and blending into the device's UI. Check it out on my personal app loader! and let me know of any suggestions/comments.

Specifically, this PR handles ensuring the right theme is displayed, and theming of app html customizer iframes.

Screenshots:

Screenshot 2025-12-22 at 1 54 05 PM
Screenshot 2025-12-22 at 1 54 14 PM Screenshot 2025-12-22 at 1 54 22 PM

Added theme setting functionality and applied theme changes based on user preference and system settings.
Copilot AI review requested due to automatic review settings December 22, 2025 19:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds dark mode support to the app loader with three theme options: light, dark, and device (follows system preference). The implementation handles theme persistence in settings, dynamic theme application, and extends dark mode styling to app customizer iframes.

Key Changes:

  • Added theme setting with three modes: light, dark, and device
  • Implemented theme application logic that respects user preferences and system settings
  • Applied dark mode styling to app customizer iframes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated
Comment thread js/index.js Outdated

const selectTheme = document.getElementById("settings-theme");
// Update theme selector
selectTheme.value = SETTINGS.theme;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you surround this in if (selectTheme)? Then it won't break things like EspruinoApps that don't have a theme selector box

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, just fixed it!

@gfwilliams
Copy link
Copy Markdown
Member

Thanks! This looks good - but please could you fix the lint errors that come up on https://github.com/espruino/EspruinoAppLoaderCore/pull/84/files and remove the .DS_Store file you added?

@gfwilliams
Copy link
Copy Markdown
Member

Thanks!

@gfwilliams gfwilliams merged commit b0ea92c into espruino:master Jan 8, 2026
1 check passed
@bobrippling
Copy link
Copy Markdown
Contributor

I think this has altered interface.htmls, looks like it's been spotted here though, assuming it's the same thing

image

@gfwilliams
Copy link
Copy Markdown
Member

I shouldn't really have merged this before, but I didn't really look and realise that espruino/BangleApps#4103 made the interface.html barely usable in some cases (like in Recorder).

@RKBoss6 do you have any plans to add tweaks to espruino/BangleApps#4103 soon to make the interface.html look better, or shall I back this change out of the app loader core until it's sorted? It seems you may have moved on to some other things like the calorie counting?

@RKBoss6
Copy link
Copy Markdown
Contributor Author

RKBoss6 commented Jan 14, 2026

Yeah, I'm quite busy at the moment, so it may be better for the time being to revert the changes until I can get tweaks made.... Sorry!

@gfwilliams
Copy link
Copy Markdown
Member

Ok - just done! Annoyingly I don't see a way to re-open this, but it's referenced from espruino/BangleApps#4103 so we can re-add it from there

@RKBoss6
Copy link
Copy Markdown
Contributor Author

RKBoss6 commented Jan 14, 2026

Thanks! Sorry about the confusion, I'll try to get something in to fix it soon.

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

Successfully merging this pull request may close these issues.

4 participants