From 53451df901d62613a0657ebd80903437590608db Mon Sep 17 00:00:00 2001 From: Igor Fedoronchuk Date: Fri, 2 Oct 2026 19:22:25 +0200 Subject: [PATCH] Release 3.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Major, not minor: #49 changed the default look for every project that does not set variables — anthracite header instead of blue, darker links and buttons, dropdown panels on the surface palette. README's Upgrading section lists the one-line override that restores each. Both artefacts checked with the theme switch in them: gem app/assets/javascripts/wigu/theme_toggle.js ships beside the stylesheet npm prepublishOnly + pack puts src/theme_toggle.js beside src/active_admin_theme.scss The npm install snippet in the README moves to ^3.0.0. Also drops the two references to ActiveAdmin 4. The gemspec pins activeadmin >= 3.0, < 4.0, so describing this theme against a version it does not support only invites the question of whether it does. --- README.md | 8 ++++---- app/assets/javascripts/wigu/theme_toggle.js | 6 +++--- lib/active_admin_theme/version.rb | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6b5f016..36ec413 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Or add manually to `package.json`: ``` "dependencies": { - "@activeadmin-plugins/active_admin_theme": "^2.0.0" + "@activeadmin-plugins/active_admin_theme": "^3.0.0" } ``` and execute: @@ -159,9 +159,9 @@ cannot show both. `auto` removes the attribute, so the media query decides and the page follows the operating system live; the other two pin the choice in `localStorage` under -`aa-theme`. ActiveAdmin 4's own toggle writes `light` or `dark` on the first -click and never writes `auto` back, so a user there cannot return to following -the system without clearing storage by hand — hence the third state. +`aa-theme`. The third state is there so that following the system stays +reachable: a two-state toggle writes a preference on the first click and has no +way back short of clearing storage by hand. The glyphs are inline SVG used as a CSS `mask`, so the gem still ships no image files, there is nothing for a host application's CSP to allow, and the icon diff --git a/app/assets/javascripts/wigu/theme_toggle.js b/app/assets/javascripts/wigu/theme_toggle.js index 9a7f45e..d96b516 100644 --- a/app/assets/javascripts/wigu/theme_toggle.js +++ b/app/assets/javascripts/wigu/theme_toggle.js @@ -10,9 +10,9 @@ // a project can restyle it, instead of in a script it would have to fork. // // Binds by delegation to anything carrying .dark-mode-toggle or #theme_toggle, -// the way ActiveAdmin 4 does, so the control can live anywhere and survive a -// re-render. If neither exists it appends its own entry to the utility -// navigation. No jQuery and no ujs, so it does not care how the admin is built. +// so the control can live anywhere and survive a re-render. If neither exists +// it inserts its own entry into the utility navigation. No jQuery and no ujs, +// so it does not care how the admin is built. (function () { "use strict"; diff --git a/lib/active_admin_theme/version.rb b/lib/active_admin_theme/version.rb index 82ef7bf..b26db68 100644 --- a/lib/active_admin_theme/version.rb +++ b/lib/active_admin_theme/version.rb @@ -1,3 +1,3 @@ module ActiveAdminTheme - VERSION = "2.0.0" + VERSION = "3.0.0" end diff --git a/package.json b/package.json index 3565393..55a0eb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@activeadmin-plugins/active_admin_theme", - "version": "2.0.0", + "version": "3.0.0", "description": "Flat design for ActiveAdmin", "main": "src/active_admin_theme.scss", "author": "Igor Fedoronchuk ",