iron_admin 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +129 -1
  3. data/README.md +48 -1
  4. data/UPGRADING.md +495 -8
  5. data/app/assets/tailwind/iron_admin/engine.css +79 -4
  6. data/app/components/iron_admin/dashboards/activity_feed_component/item_component.html.haml +6 -9
  7. data/app/components/iron_admin/dashboards/activity_feed_component.html.haml +6 -5
  8. data/app/components/iron_admin/dashboards/activity_feed_component.rb +21 -24
  9. data/app/components/iron_admin/dashboards/chart_component.html.haml +3 -5
  10. data/app/components/iron_admin/dashboards/chart_component.rb +86 -24
  11. data/app/components/iron_admin/dashboards/concerns/themed_card.rb +39 -0
  12. data/app/components/iron_admin/dashboards/metric_card_component.html.haml +8 -7
  13. data/app/components/iron_admin/dashboards/metric_card_component.rb +2 -0
  14. data/app/components/iron_admin/dashboards/progress_component.html.haml +11 -7
  15. data/app/components/iron_admin/dashboards/progress_component.rb +11 -6
  16. data/app/components/iron_admin/dashboards/quick_links_component/link_component.html.haml +8 -9
  17. data/app/components/iron_admin/dashboards/quick_links_component.html.haml +6 -5
  18. data/app/components/iron_admin/dashboards/quick_links_component.rb +4 -12
  19. data/app/components/iron_admin/dashboards/recent_table_component.html.haml +15 -10
  20. data/app/components/iron_admin/dashboards/recent_table_component.rb +49 -0
  21. data/app/components/iron_admin/dashboards/stats_grid_component/stat_component.html.haml +13 -14
  22. data/app/components/iron_admin/dashboards/stats_grid_component.html.haml +1 -0
  23. data/app/components/iron_admin/dashboards/stats_grid_component.rb +9 -11
  24. data/app/components/iron_admin/filters/bar_component.html.haml +8 -6
  25. data/app/components/iron_admin/filters/bar_component.rb +56 -9
  26. data/app/components/iron_admin/filters/control_styles.rb +82 -0
  27. data/app/components/iron_admin/filters/date_range_component.html.haml +9 -4
  28. data/app/components/iron_admin/filters/date_range_component.rb +10 -6
  29. data/app/components/iron_admin/filters/search_component.html.haml +4 -4
  30. data/app/components/iron_admin/filters/search_component.rb +3 -5
  31. data/app/components/iron_admin/filters/select_filter_component.html.haml +1 -1
  32. data/app/components/iron_admin/filters/select_filter_component.rb +5 -16
  33. data/app/components/iron_admin/form/belongs_to_autocomplete_component.html.haml +9 -5
  34. data/app/components/iron_admin/form/belongs_to_autocomplete_component.rb +10 -8
  35. data/app/components/iron_admin/form/belongs_to_component.html.haml +2 -2
  36. data/app/components/iron_admin/form/belongs_to_component.rb +4 -18
  37. data/app/components/iron_admin/form/checkbox_component.rb +2 -3
  38. data/app/components/iron_admin/form/concerns/form_input_behavior.rb +1 -1
  39. data/app/components/iron_admin/form/control_classes.rb +108 -0
  40. data/app/components/iron_admin/form/date_picker_component.rb +3 -7
  41. data/app/components/iron_admin/form/field_wrapper_component.html.haml +3 -3
  42. data/app/components/iron_admin/form/field_wrapper_component.rb +3 -3
  43. data/app/components/iron_admin/form/nested_form_component.html.haml +4 -5
  44. data/app/components/iron_admin/form/nested_form_component.rb +12 -2
  45. data/app/components/iron_admin/form/select_component.html.haml +1 -1
  46. data/app/components/iron_admin/form/select_component.rb +2 -16
  47. data/app/components/iron_admin/form/text_input_component.rb +1 -5
  48. data/app/components/iron_admin/form/textarea_component.rb +1 -5
  49. data/app/components/iron_admin/layout/flash_component.html.haml +1 -1
  50. data/app/components/iron_admin/layout/flash_component.rb +4 -3
  51. data/app/components/iron_admin/layout/navbar_component.html.haml +15 -9
  52. data/app/components/iron_admin/layout/navbar_component.rb +29 -1
  53. data/app/components/iron_admin/layout/shell_component.html.haml +4 -4
  54. data/app/components/iron_admin/layout/shell_component.rb +16 -3
  55. data/app/components/iron_admin/layout/sidebar_component.html.haml +21 -25
  56. data/app/components/iron_admin/layout/sidebar_component.rb +76 -1
  57. data/app/components/iron_admin/layout/theme_switcher_component.html.haml +15 -0
  58. data/app/components/iron_admin/layout/theme_switcher_component.rb +74 -0
  59. data/app/components/iron_admin/resources/actions_component.html.haml +15 -8
  60. data/app/components/iron_admin/resources/actions_component.rb +34 -2
  61. data/app/components/iron_admin/resources/breadcrumb_component.html.haml +3 -3
  62. data/app/components/iron_admin/resources/breadcrumb_component.rb +8 -7
  63. data/app/components/iron_admin/resources/bulk_actions_component.html.haml +9 -8
  64. data/app/components/iron_admin/resources/bulk_actions_component.rb +47 -4
  65. data/app/components/iron_admin/resources/data_table_component.html.haml +15 -15
  66. data/app/components/iron_admin/resources/data_table_component.rb +34 -3
  67. data/app/components/iron_admin/resources/related_list_component.html.haml +7 -7
  68. data/app/components/iron_admin/resources/related_list_component.rb +26 -2
  69. data/app/components/iron_admin/resources/show_field_component.html.haml +3 -3
  70. data/app/components/iron_admin/resources/show_field_component.rb +10 -4
  71. data/app/components/iron_admin/resources/styles.rb +136 -0
  72. data/app/components/iron_admin/ui/alert_component.html.haml +2 -2
  73. data/app/components/iron_admin/ui/alert_component.rb +27 -31
  74. data/app/components/iron_admin/ui/badge_component.rb +40 -20
  75. data/app/components/iron_admin/ui/button_component.rb +37 -11
  76. data/app/components/iron_admin/ui/card_component.rb +3 -3
  77. data/app/components/iron_admin/ui/dropdown_component.html.haml +1 -1
  78. data/app/components/iron_admin/ui/dropdown_component.rb +34 -13
  79. data/app/components/iron_admin/ui/empty_state_component.html.haml +4 -5
  80. data/app/components/iron_admin/ui/empty_state_component.rb +2 -2
  81. data/app/components/iron_admin/ui/modal_component.html.haml +5 -5
  82. data/app/components/iron_admin/ui/modal_component.rb +6 -4
  83. data/app/components/iron_admin/ui/pagination_component.html.haml +14 -14
  84. data/app/components/iron_admin/ui/pagination_component.rb +26 -9
  85. data/app/components/iron_admin/ui/scopes_component.html.haml +2 -2
  86. data/app/components/iron_admin/ui/scopes_component.rb +44 -11
  87. data/app/components/iron_admin/ui/tooltip_component.rb +11 -4
  88. data/app/controllers/iron_admin/application_controller.rb +58 -4
  89. data/app/controllers/iron_admin/audit_controller.rb +30 -6
  90. data/app/controllers/iron_admin/concerns/action_executable.rb +37 -0
  91. data/app/controllers/iron_admin/concerns/assignable_references.rb +149 -0
  92. data/app/controllers/iron_admin/concerns/authorizable.rb +11 -0
  93. data/app/controllers/iron_admin/concerns/blank_password_filterable.rb +21 -0
  94. data/app/controllers/iron_admin/concerns/event_emittable.rb +47 -7
  95. data/app/controllers/iron_admin/concerns/filterable.rb +34 -9
  96. data/app/controllers/iron_admin/concerns/nested_permittable.rb +5 -3
  97. data/app/controllers/iron_admin/concerns/nested_tenant_check.rb +159 -0
  98. data/app/controllers/iron_admin/concerns/polymorphic_references.rb +131 -0
  99. data/app/controllers/iron_admin/concerns/scopeable.rb +54 -7
  100. data/app/controllers/iron_admin/concerns/searchable.rb +3 -3
  101. data/app/controllers/iron_admin/concerns/tenant_assignable.rb +118 -0
  102. data/app/controllers/iron_admin/concerns/tenant_containment.rb +146 -0
  103. data/app/controllers/iron_admin/exports_controller.rb +2 -2
  104. data/app/controllers/iron_admin/imports_controller.rb +1 -1
  105. data/app/controllers/iron_admin/resources_controller.rb +48 -41
  106. data/app/controllers/iron_admin/search_controller.rb +1 -2
  107. data/app/controllers/iron_admin/themes_controller.rb +50 -0
  108. data/app/controllers/iron_admin/tools_controller.rb +58 -5
  109. data/app/helpers/iron_admin/action_form_helper.rb +19 -0
  110. data/app/helpers/iron_admin/application_helper.rb +93 -16
  111. data/app/helpers/iron_admin/assignable_records_helper.rb +32 -0
  112. data/app/helpers/iron_admin/component_overrides_helper.rb +9 -4
  113. data/app/helpers/iron_admin/field_display_helper.rb +88 -43
  114. data/app/helpers/iron_admin/related_records_helper.rb +51 -0
  115. data/app/helpers/iron_admin/theme_helper.rb +56 -46
  116. data/app/javascript/iron_admin/controllers/cp_bulk_select_controller.js +12 -0
  117. data/app/javascript/iron_admin/controllers/cp_chart_controller.js +4 -0
  118. data/app/javascript/iron_admin/controllers/cp_disclosure_controller.js +19 -0
  119. data/app/javascript/iron_admin/controllers/cp_search_shortcut_controller.js +39 -0
  120. data/app/javascript/iron_admin/index.js +4 -0
  121. data/app/views/iron_admin/audit/index.html.haml +78 -81
  122. data/app/views/iron_admin/dashboard/index.html.haml +10 -9
  123. data/app/views/iron_admin/form/_action_field.html.haml +50 -0
  124. data/app/views/iron_admin/form/_nested_row.html.haml +18 -13
  125. data/app/views/iron_admin/imports/new.html.haml +14 -13
  126. data/app/views/iron_admin/imports/preview.html.haml +24 -21
  127. data/app/views/iron_admin/resources/_form.html.haml +70 -68
  128. data/app/views/iron_admin/resources/action_form.html.haml +16 -59
  129. data/app/views/iron_admin/resources/bulk_action_form.html.haml +20 -58
  130. data/app/views/iron_admin/resources/edit.html.haml +3 -3
  131. data/app/views/iron_admin/resources/index.html.haml +87 -74
  132. data/app/views/iron_admin/resources/new.html.haml +2 -2
  133. data/app/views/iron_admin/resources/show.html.haml +53 -41
  134. data/app/views/iron_admin/search/index.html.haml +17 -9
  135. data/app/views/iron_admin/shared/_pagination.html.haml +13 -10
  136. data/app/views/iron_admin/shared/error.html.haml +16 -12
  137. data/app/views/iron_admin/tools/action_form.html.haml +9 -55
  138. data/app/views/iron_admin/tools/show.html.haml +4 -5
  139. data/app/views/layouts/iron_admin/_document_head.html.haml +24 -0
  140. data/app/views/layouts/iron_admin/application.html.haml +4 -17
  141. data/app/views/layouts/iron_admin/minimal.html.haml +7 -0
  142. data/config/importmap.rb +2 -0
  143. data/config/locales/en.yml +23 -0
  144. data/config/routes.rb +1 -0
  145. data/docs/FAQ.md +87 -37
  146. data/docs/README.md +8 -2
  147. data/docs/components/README.md +6 -2
  148. data/docs/components/dashboard-components.md +24 -35
  149. data/docs/components/filter-components.md +44 -92
  150. data/docs/components/form-components.md +16 -32
  151. data/docs/components/resource-components.md +46 -27
  152. data/docs/components/ui-components.md +44 -26
  153. data/docs/getting-started/installation.md +5 -1
  154. data/docs/getting-started/quick-start.md +36 -23
  155. data/docs/guides/authentication.md +182 -42
  156. data/docs/guides/components.md +97 -15
  157. data/docs/guides/custom-adapters.md +24 -4
  158. data/docs/guides/dashboard.md +68 -44
  159. data/docs/guides/export.md +24 -8
  160. data/docs/guides/extending.md +206 -51
  161. data/docs/guides/fields.md +229 -70
  162. data/docs/guides/imports.md +33 -18
  163. data/docs/guides/resources.md +333 -111
  164. data/docs/guides/theming.md +930 -58
  165. data/docs/guides/troubleshooting.md +7 -3
  166. data/docs/plugin-system-design.md +8 -7
  167. data/docs/reference/configuration.md +51 -16
  168. data/docs/reference/routes.md +1 -0
  169. data/docs/reference/theme-properties.md +101 -38
  170. data/lib/generators/iron_admin/install/templates/initializer.rb.tt +7 -2
  171. data/lib/generators/iron_admin/install_audit/templates/create_iron_admin_audit_entries.rb.tt +2 -0
  172. data/lib/iron_admin/action_field.rb +11 -0
  173. data/lib/iron_admin/adapters/active_record.rb +95 -0
  174. data/lib/iron_admin/adapters/base.rb +107 -0
  175. data/lib/iron_admin/adapters/http/query.rb +21 -0
  176. data/lib/iron_admin/adapters/http.rb +84 -4
  177. data/lib/iron_admin/adapters/mongoid.rb +96 -2
  178. data/lib/iron_admin/audit_log.rb +64 -6
  179. data/lib/iron_admin/authentication_warning.rb +31 -0
  180. data/lib/iron_admin/concerns/filter_definable.rb +15 -1
  181. data/lib/iron_admin/concerns/nestable.rb +25 -0
  182. data/lib/iron_admin/concerns/scope_countable.rb +56 -0
  183. data/lib/iron_admin/concerns/soft_deletable.rb +28 -9
  184. data/lib/iron_admin/configuration/components.rb +14 -3
  185. data/lib/iron_admin/configuration/theme/neutral_defaults.rb +179 -0
  186. data/lib/iron_admin/configuration/theme.rb +292 -87
  187. data/lib/iron_admin/configuration.rb +340 -45
  188. data/lib/iron_admin/dashboard.rb +22 -38
  189. data/lib/iron_admin/engine.rb +16 -2
  190. data/lib/iron_admin/errors.rb +3 -0
  191. data/lib/iron_admin/field.rb +78 -17
  192. data/lib/iron_admin/field_inferrer.rb +61 -3
  193. data/lib/iron_admin/field_override_warning.rb +67 -0
  194. data/lib/iron_admin/import/import_preview.rb +56 -7
  195. data/lib/iron_admin/import/importer.rb +91 -14
  196. data/lib/iron_admin/import/tenant_precheck.rb +67 -0
  197. data/lib/iron_admin/plugin/registration.rb +64 -0
  198. data/lib/iron_admin/plugin_registry.rb +3 -2
  199. data/lib/iron_admin/policy.rb +22 -12
  200. data/lib/iron_admin/policy_coverage_warning.rb +46 -0
  201. data/lib/iron_admin/request_context.rb +18 -0
  202. data/lib/iron_admin/resource.rb +218 -77
  203. data/lib/iron_admin/resource_registry.rb +86 -13
  204. data/lib/iron_admin/scope_counts.rb +73 -0
  205. data/lib/iron_admin/tenant_scope.rb +30 -0
  206. data/lib/iron_admin/tool.rb +61 -12
  207. data/lib/iron_admin/tool_context.rb +10 -6
  208. data/lib/iron_admin/version.rb +1 -1
  209. data/lib/iron_admin.rb +29 -2
  210. metadata +37 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa9e374e5479d44e3b64bccfbba4361e5a8b96da3d1b980674e0e04bb03221d2
4
- data.tar.gz: 659a202fe929ef1873601ec1d2e353172c446bcb5a516cc85a24c80164fa3498
3
+ metadata.gz: b1cfa784a8a71213a3d91ffacda372dbda71e72c293384f474fc0a780dbbd34f
4
+ data.tar.gz: 3bae2505c4e44648558c41b116d7c235710c84a2202baafad66ba2e775c505f0
5
5
  SHA512:
6
- metadata.gz: 49404267cc1f5ce889cac6656f323dcefa2e4f2c4dabd3fd9dab15d49bd133f4aeea9476ba32464707e23e525abda1cb006b819b6619ac02638eaaff2ea07d8c
7
- data.tar.gz: c6f21ab564c7839af533c9a55489a1cf30234e91f453a900811fda936e5dd4e3c68bf2074dd6abc2f89c8972eb6450445ff67101ccebf8309386bb726a3a6f00
6
+ metadata.gz: 7d09795d92315afb50e502132fb676a3abea2453e711c070d243294b0d96a3989d0f0325c864f0ce7eba1d860f82cc4c2d9bcc9b56f9da0b37cbfeecccc9ccb8
7
+ data.tar.gz: 7dca2399ba131e161934ffcfe1289557b540ccdce5d1620a4a9f5825d912572968bb1a0b4e0038811c7a8739724e808e5d70deef19dde8917da62891301d4430
data/CHANGELOG.md CHANGED
@@ -7,6 +7,133 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.0] - 2026-11-16
11
+
12
+ ### Added
13
+
14
+ - **`config.default_policy`** — What a resource without a `policy` block allows. `:allow`, the default, keeps today's behavior: every user the `authenticate` block admits can run every CRUD, custom and bulk action. `:deny` denies them all, so the index, show, forms, exports, imports, search results, the sidebar link and custom and bulk actions of such a resource answer `403` or disappear, and each resource needs a policy that allows what its users may do. A String works too (`"deny"`); any other value raises `ArgumentError`. A resource's own policy, and `deny_actions`, still apply. `Resource.custom_action_allowed?(name, user)` checks a custom or bulk action the way the controller does. In development, IronAdmin logs at boot the resources that have no policy while the setting is `:allow` (`IronAdmin::PolicyCoverageWarning`), again only when that list changes. The default becomes `:deny` in 1.0. ([#136](https://github.com/rubylab-app/iron_admin/issues/136))
15
+ - **Themes from plugins** — `admin.theme(name, label: ..., &block)` on the experimental plugin API (`IronAdmin::Plugin::Registration`) registers a theme that starts from the pristine Neutral values, as `config.register_theme` does. Each theme name has an owner: the plugin's `plugin_name` (a logical identity, not a proof that two implementations are the same), or `:app` for `config.register_theme` and for Neutral. A free name is stored, with its owner, only after the block returns; a block that raises leaves neither. Activating the same plugin again (every `to_prepare`) does nothing, so an adjustment the app made to the theme object stays until the process restarts. A name owned by another plugin or by the app raises `PluginError` before anything is replaced; the message names the theme and both owners and says to rename one theme or remove one registration. `config.register_theme` still replaces a theme the app owns. A Symbol, a String and any other case are the same name. A theme gem is named `iron_admin-theme-<name>` (`iron_admin-theme-high_contrast` loads `iron_admin/theme/high_contrast`); the namespace `IronAdmin::Theme` is reserved for these gems. See the [theming guide](docs/guides/theming.md#themes-from-plugins).
16
+ - **Scope counts** — An index can show how many records each scope tab would list (`Active (12)`). Off by default (`config.scope_counts = false`). A resource overrides that with `scope_counts true` or `scope_counts false`, and only an exact `count: false` opts a scope out (any other value, including nil, stores no `:count` key). The count is the index for that tab: the tenant scope, the current filters, that tab's scope and the current search, without the selected scope and without the page. It keeps the index preloading, the same `includes` as the listing, and it does not sort. A scope body must return a relation: a nil or false body draws no number. Zero is shown. An unknown count is omitted. `Adapters::Base#exact_count` returns nil, without logging, when `count` is not implemented. Tab counts call `exact_count`, which on ActiveRecord matches the index total (rows, including a grouped relation) and on HTTP is `meta.total` or `nil` when the response has none (a missing total is not zero; `count` still returns the page length, which pagination uses). A count that raises is logged and omitted, so the other tabs still render. On PostgreSQL a failing count inside an open transaction, including a transactional test, aborts the transaction, and a later query on the page raises `PG::InFailedSqlTransaction`. A records-frame pagination request does not count. With the feature off the index runs no extra query; with it on, one count query per counted scope. The index assigns the counts before rendering. `Ui::ScopesComponent` takes `counts:` (default `{}`) so a template override can read `counts` and `scope_label`. See the [resources guide](docs/guides/resources.md#scopes).
17
+ - **`config.strict_tool_actions`** — When `true` (default `false`), no tool dispatches an action that was not declared with `tool_action`: the legacy bare-method fallback is off and those names return 404. Declared actions are unchanged.
18
+ - **Named themes** — `config.register_theme(:midnight, label: "Midnight") { |t| ... }` registers a theme that starts from the pristine Neutral values (whatever `config.theme` changed and whatever the call order), yields it and returns it. Registering a name the app already registered replaces that theme; a name a plugin owns raises `IronAdmin::PluginError`; a Symbol, a String and any case are the same name. A blank name raises `ArgumentError`. The built-in theme is registered as `:neutral`. `config.default_theme = :midnight` names the theme used when a request resolves none (default `:neutral`), and `config.theme` keeps configuring that default theme. `config.themes` returns the registered themes, default first; `config.find_theme(name)`, `config.theme_for(name)` and `config.resolve_theme(request)` look them up. A theme has a `name`, a `label`, `dark?` and `scheme_class`, and a copy (`dup`) no longer shares its Arrays and Hashes (`chart_colors`, the palettes) with the original. See the [theming guide](docs/guides/theming.md).
19
+ - **A theme per request** — `config.theme_resolver { |request| ... }` returns the name of the theme a request uses; the default resolver reads the `iron_admin_theme` cookie (`Configuration::THEME_COOKIE`). An unknown, blank or `nil` name gives the default theme, and a resolver that raises logs a warning and gives the default theme. `IronAdmin::ApplicationController` resolves the theme before authentication, so error pages and login redirects use it too, and stores it in `IronAdmin::RequestContext.theme` (a new `ActiveSupport::CurrentAttributes`). `IronAdmin.current_theme` returns it, or the default theme outside a request; every template, helper and component of the engine reads it, and so does `ThemeHelper#t`.
20
+ - **Theme switcher** — With two or more themes registered, the navbar shows a swatch button that opens a menu of the themes (`IronAdmin::Layout::ThemeSwitcherComponent`, a `<details>` disclosure: each theme is a submit button with `aria-pressed`, and the new `cp-disclosure` Stimulus controller closes it on Escape, returning the focus to the button, and on outside clicks). It posts to the new `POST /admin/theme` route (`themes#update`, `iron_admin.theme_path`), which is authenticated and CSRF protected, stores a registered theme's name in the `iron_admin_theme` cookie (one year, `HttpOnly`, `SameSite=Lax`, `Secure` on HTTPS), flashes `iron_admin.theme_switcher.unknown` for any other name, and redirects with `303` to `return_to` when it is a path on the same site, else to the admin root. The switcher sends the current path as `return_to`, except on a page that answers a POST (an import preview, a form shown again with errors), whose path may have no GET route: there it sends the path of the same-site page the browser came from, or no `return_to`. The new `theme_switcher` component slot (`themes`, `current_theme`, `current_user`) replaces the switcher.
21
+ - **⌘K focuses the search box** — The new `cp-search-shortcut` Stimulus controller focuses and selects the navbar search box on ⌘K on Apple platforms and Ctrl+K elsewhere, from anywhere on the page, except while a modal dialog is open, while the sidebar drawer covers the search box, or when the focused field already used the shortcut (in a rich text field, Trix opens its link dialog on it). It sets the input's `aria-keyshortcuts`, and fills a `<kbd>` hint ("⌘K" or "Ctrl K", styled by the theme's `kbd`) that stays hidden without JavaScript and below the `sm` breakpoint.
22
+ - **58 theme properties** — `font_stylesheet_url`, `heading_font`, `page_title`, `card_title`, `label_transform`, `field_label_transform` (the case of form labels and of the field names on show pages), `error_text` and `success_text` (type); `border_width`, `control_radius`, `checkbox_radius`, `control_shadow`, `popover_shadow`, `color_scheme` and `swatch` (shape and scheme; `swatch` holds the switcher swatch's shape too, `rounded-full` in Neutral); `popover_bg`, the background of dropdown menus, modals, the filter panel, belongs-to autocomplete results and the theme switcher panel, which follows `card_bg` while it is empty (`Theme#popover_background` reads it); `checkbox_border`, `input_error`, `placeholder_text`, `disabled_text`, and `rich_text_editor` and `rich_text_toolbar` (forms: the Trix editor box, and the box around its toolbar, whose parts a theme styles with descendant variants and `!`, because Trix's stylesheet is not in a cascade layer; Neutral outlines the editor like its inputs and gives the toolbar groups its borders and radii, and empty values keep Trix's look; engine.css hands Trix's border and radius to `rich_text_editor` and inverts the toolbar icons under `scheme-dark`); `sidebar_border`, `navbar_border_width` (side and width of the navbar's bottom border, which the template hard-coded as `border-b`), `navbar_text`, `kbd` and `skip_link` (chrome); `table_header_text`, `table_cell_padding`, `table_frame`, `table_sticky_shadow`, `table_sticky_row_hover` (the sticky actions cell while its row is hovered; index rows are a `group/row`) and `table_head_border` (the line under a table's header row, `table_border` while it is empty; `Theme#table_head_divider` reads it) (tables); `surface_muted`, `item_hover`, `item_active`, `icon_muted` and `overlay_bg` (surfaces); `alert_palette`, `alert_shadow`, `badge_palette`, `badge_dot_palette`, `badge_shape`, `chip`, `danger_item`, `tooltip`, `code_block`, `code_font` (the font family of code, JSON, key/value, markdown and hex color inputs, code blocks and audit change details, which templates hard-coded as `font-mono`), `progress_track` and `pagination_active` (feedback); `metric_label`, `metric_value` and `metric_icon` (dashboard); and `chart_grid_color`, `chart_text_color`, `chart_point_style` (the legend markers, `circle` in Neutral), `chart_slice_border_color` (one outline color for pie, doughnut and polar area slices) and `chart_border_width` (the outline width of slices and bars and the width of lines) (charts). The theming guide lists every property with its Neutral value.
23
+ - **Color scheme** — A theme's `color_scheme` (`"light"` or `"dark"`) puts `scheme-light` or `scheme-dark` on `<html>` and a matching `<meta name="color-scheme">` in the layout, so browsers draw scrollbars and native controls to match, and the select chevron is lighter under `scheme-dark`.
24
+ - **Theme fonts** — When a theme's `font_stylesheet_url` is set, the layout links it, with preconnect tags for `fonts.googleapis.com` and `fonts.gstatic.com` when it is on Google Fonts. Charts draw their text in the font of their card, and redraw once a web font has loaded.
25
+ - **Charts in the theme's colors** — `ChartComponent` takes grid, axis, tick, point label and legend colors from the theme's `chart_grid_color` and `chart_text_color`, so dark themes get readable charts. A chart's own `colors:` still wins over the theme's palette.
26
+ - **Theme class recipes** — `IronAdmin::Form::ControlClasses` builds 36px buttons (`button(theme, :primary)`), inputs, selects, textareas, file inputs, checkboxes and radio buttons from a theme, and `IronAdmin::Resources::Styles` and `IronAdmin::Filters::ControlStyles` build the panels, tables and filter controls. `ThemeHelper` gains `cp_radio_class` and `cp_google_fonts?`, `cp_input_class`, `cp_select_class`, `cp_textarea_class` and `cp_file_input_class` take `error: true`, and `cp_input_class` takes `padding:` for an input with an icon.
27
+ - **Hard-coded color guard** — `spec/iron_admin/theme_hardcoded_colors_spec.rb` fails when a file in `app/` writes a Tailwind color utility (any palette of Tailwind v4.3, including `mauve`, `olive`, `mist` and `taupe`, and `text-shadow-*` colors), an arbitrary color value (`bg-[#fafafa]`, `bg-[red]`), an arbitrary property that sets a color (`[color:#fff]`), or a color in an inline style, an SVG attribute or a JavaScript style assignment, so every color comes from the theme. `spec/iron_admin/engine_theme_reads_spec.rb` fails when `app/` or `lib/` reads `IronAdmin.configuration.theme` or its alias `theme_config` instead of `IronAdmin.current_theme`.
28
+ - **Translation keys** — `iron_admin.theme_switcher.button_label`, `iron_admin.theme_switcher.menu_label`, `iron_admin.theme_switcher.unknown` and `iron_admin.fields.tags_remove`. The engine import map pins `iron_admin/controllers/cp_disclosure_controller` and `iron_admin/controllers/cp_search_shortcut_controller`, and `iron_admin/index.js` registers both.
29
+ - **Sort for filter bar overrides** — The `filter_bar` component slot also passes `current_sort:` and `current_direction:` (each nil when the request has no `sort` or `direction` param, even though the index is then ordered by `config.default_sort` and `config.default_sort_direction`), so a custom filter bar can keep the sort as `sort` and `direction` hidden fields. Overrides whose `initialize` does not declare them keep working. `Filters::BarComponent` takes the same two keywords: it keeps them as hidden fields, and its Clear link now keeps the scope, search and sort instead of going back to the bare index URL.
30
+ - **Callable filter options** — A `:select` filter's `options:` can be a callable that takes no arguments, such as `filter :category_id, type: :select, options: -> { Category.order(:name).pluck(:name, :id) }`. IronAdmin calls it each time the index renders, so the choices can come from the database without querying when the resource loads. Static arrays work as before. A `filter_bar` override can build any select filter's choices with `helpers.filter_options_for(resource_class, filter)`.
31
+ - **Current page in the sidebar** — The sidebar link for the current page now has `aria-current="page"` and the new `sidebar_link_active` theme classes (in Neutral, a white pill with a thin ring and an indigo bar on its left edge) instead of `sidebar_link` and `sidebar_link_hover`. A resource's link is current on every page of that resource (index, show, new, edit, imports and action forms), a tool's link on the tool's pages, the Dashboard link on the dashboard only, and a custom menu item's link when the request path is the item's path. Before, no link showed where you were.
32
+ - **`flash` component slot** — `config.components.flash` (or a plugin's `admin.component :flash`) replaces `IronAdmin::Layout::FlashComponent`, which the built-in shell renders above the page content. The component receives `flash:` (the request's flash) and `current_user:`, and is validated like the other slots. It is global only: `component :flash` in a resource raises `ArgumentError`. A custom shell can render the slot with `helpers.iron_admin_component(:flash, flash: helpers.flash, current_user: @current_user)`.
33
+ - **`config.favicon`** — Set it to a path, URL or asset name (for example `config.favicon = "/icon.svg"`) and every admin page links it with `<link rel="icon">`. The default, `nil`, keeps today's markup, which links no icon, so browsers keep requesting `/favicon.ico`.
34
+ - **Audit log user labels** — `config.audit_user_labels { |identifiers| ... }` lets the audit log page show a label for each user instead of the stored identifier (the user id, with database storage). The block is called once per page with the distinct identifiers on it, so one query labels them all, and returns a hash of labels keyed by identifier, for example `User.where(id: identifiers).pluck(:id, :email).to_h`. With memory storage, a label replaces the user's email or name. A user the hash does not label, such as a deleted user, keeps the default (the identifier with database storage, the email or name with memory storage), and if the block raises, the error is logged and the page shows those defaults. Without the block, the page is unchanged.
35
+ - **Scroll fade on sideways-scrolling frames** — Phones hide scrollbars, so a table or a row of scope tabs wider than its frame showed no sign of the columns past the edge. The engine stylesheet's new `cp-scroll-fade` class fades a frame out at each edge it can still scroll toward, driven by a CSS scroll timeline: a frame that fits shows no fade, and so do browsers without scroll timelines. It is a mask, so it suits any theme, and it lifts while the frame or a control in it has the keyboard focus, whose outline a mask would hide. The dashboard's recent tables, the audit log, the import preview, the show page's related lists, `ScopesComponent` and the index page's scope tabs use it. `Resources::Styles.table_panel` and `Resources::Styles::SCROLL_FRAME` build a table panel whose border stays outside the masked box.
36
+ - **Empty values on show pages** — An empty field (nil, a blank string, no attachment) showed an empty row that read as a value that did not load. Show pages, and `ShowFieldComponent`, now show a muted dash with "Not set" for screen readers (`FieldDisplayHelper#display_show_field_value`, which `ApplicationHelper` includes; translation key `iron_admin.fields.empty_value`). A false boolean keeps its icon.
37
+ - **From and To beside a date range filter** — The two date inputs of a `:date_range` filter looked the same; each now has a "From" or "To" marker beside it (`Filters::ControlStyles.range_marker`), in the index page's filter panel and in `Filters::DateRangeComponent`. Screen readers keep the inputs' names ("Created at from").
38
+
39
+ ### Changed
40
+
41
+ - **Visual change: the default look is Neutral** — The built-in theme is now Neutral, a minimal light look: a `zinc-50` page and sidebar, white navbar, cards and tables, 1px `zinc-200` borders on cards and panels, input outlines at 3:1 contrast (`zinc-500` at 80%, and `red-500` on an error), `rounded-lg` cards and `rounded-md` controls, `shadow-xs`, the Inter typeface, a black primary button, indigo as the accent, muted chart colors (indigo, teal, fuchsia, amber, sky and rose), each with 3:1 contrast or more on white and ordered so that neighboring slices stay apart, also with a color vision deficiency, and white gaps between pie and doughnut slices (`chart_slice_border_color`), compact tables with sentence-case headers and tabular digits, tinted badges with a dot, 36px buttons and inputs, and a 56px navbar. Every page uses `px-4 sm:px-6 lg:px-8 py-6` padding (the dashboard, error, new and edit pages used `p-4 sm:p-6 lg:p-8`), new and edit pages are titled with `page_title` like the others, and flash messages start at `pt-6`. Theme values an app already sets are kept; the properties it does not set take the Neutral values, so check apps that customized part of a group (a dark `sidebar_bg` now gets Neutral's dark sidebar text). UPGRADING.md explains what changes, how to set whole groups, and how to restore the 0.7 look.
42
+ - **Typography, border width, radius and shadows come from the theme** — Templates no longer hard-code them: page titles use `page_title` and `heading_font` (they used `text-2xl` with `heading_weight`, which now styles only the sidebar brand and `cp_heading`), card titles `card_title`, buttons, inputs and dropdown items `control_radius` (they used `border_radius`, which keeps cards, panels, alerts, dropdowns and modals), borders `border_width`, table cells `table_cell_padding`, `table_header_text` and `label_transform`, input and button shadows `control_shadow`, and floating surfaces `popover_shadow`. Every color that templates hard-coded (placeholders, errors, icons, secondary surfaces, alerts, badges, chips, tooltips, code blocks, overlays) comes from a theme property too.
43
+ - **`focus_ring` draws the keyboard focus** — `focus_ring`, which no template used before, is now the `focus-visible:` outline of secondary, danger and ghost buttons, sidebar links, scope tabs, pagination, dropdown and switcher items and list rows. `btn_primary` carries the primary button's own outline, so `ButtonComponent` no longer adds `focus:ring-2 focus:ring-offset-1` to every variant (`ButtonComponent::OWN_FOCUS_VARIANTS`). Ghost buttons get no `control_shadow` (`ButtonComponent::FLAT_VARIANTS`).
44
+ - **`cp_` helpers return complete controls** — `cp_btn_primary`, `cp_btn_secondary`, `cp_btn_danger`, `cp_btn_ghost`, `cp_input_class`, `cp_select_class`, `cp_textarea_class`, `cp_checkbox_class` and `cp_file_input_class` return the 36px `Form::ControlClasses` recipes, `cp_btn_primary_lg` is the same as `cp_btn_primary`, `cp_card` includes the border (`border_width` and `card_border`), `cp_badge_count` uses `badge_shape`, `cp_navbar_search_class` is the 36px search box the built-in navbar renders (with `control_shadow`), and `cp_heading` uses `heading_font` when the theme sets one. Views that add their own padding or radius to these helpers should drop it.
45
+ - **Badges** — `BadgeComponent` takes its classes from the theme's `badge_palette`, `badge_dot_palette` (a 6px dot before the text) and `badge_shape`, and `:badge` fields and the audit log's action column render it. `BadgeComponent::COLORS` holds the Neutral palette, the default badge size is `px-2 py-0.5 text-xs` (it was `px-2.5 py-0.5 text-sm`), and `Configuration::BADGE_COLOR_CLASSES` keeps the 0.7 classes but IronAdmin no longer reads it. A `config.badge_colors` entry that maps a color name to classes still wins over the palette, in every theme, and that badge has no dot.
46
+ - **Alerts** — `AlertComponent` takes its colors from the theme's `alert_palette` (falling back to its `:info` entry), and `AlertComponent::TYPES` holds only the icon of each type: code that read `TYPES[type][:bg]`, `[:border]` or `[:text]` gets `nil`.
47
+ - **Component details** — `ButtonComponent` sizes are `h-8`, `h-9` and `h-10` high. `DropdownComponent` maps `width:` to a literal class from `DropdownComponent::WIDTHS` (any other width falls back to `w-48`), and its destructive items use `danger_item`. Pagination links are ghost controls, the current page uses `pagination_active`. The activity feed tints its icons from `badge_palette`, which adds `:indigo`, `:purple`, `:pink`, `:orange` and `:teal` to the colors an item's `icon_color` accepts. A false boolean shows a muted x icon instead of a red one. Bar charts fill every bar with the theme's first chart color, since their bars are one series (a chart's own `colors:` still colors them one by one). Pie, doughnut and polar area slices are outlined in the theme's `chart_slice_border_color` (Neutral's is white, the color of its cards), or in their own colors when it is `nil`, instead of the line color. A last chart left alone in its row of the dashboard's two-column chart grid spans both columns. Cartesian charts draw grid lines on the value axis only, and legends mark entries with dots. The navbar search placeholder reads "Search…", and the navbar hides the current user's name below the `sm` breakpoint and truncates it at 256px (`max-w-64`) from there, so a long name cannot squeeze the search box. `ButtonComponent` buttons show the pointer cursor (Tailwind v4's preflight gives buttons the default cursor). The bulk action bars (the index page's and `BulkActionsComponent`) wrap their buttons on narrow screens, and `ScopesComponent` scrolls its tabs sideways, like the index page's tabs, instead of overflowing the page. `:progress_bar` fields round their track and bar with `control_radius`, like the dashboard's `ProgressComponent` (they were `rounded-full`). The dashboard's quick links and activity feed rows highlight with `table_row_hover` instead of `item_hover`, so their muted text keeps AA contrast on hover.
48
+ - **Development dependency updates** (#119, #120, #121) — `rspec-rails` is now `~> 8.0` (was `~> 7.0`) and `simplecov` is `~> 1.3` (was `~> 0.22`). `spec/spec_helper.rb` uses the SimpleCov 1.x configuration (`skip`, `group`, `coverage :line`) with the same filters and thresholds, so it no longer prints deprecation warnings. The development lockfile moves to Rails 8.1.4, view_component 4.17.0, haml-rails 3.1.0, faraday 2.15.0, RuboCop 1.92.0, rubocop-rails 2.38.0, rubocop-rspec 3.10.2, sqlite3 2.10.2, webmock 3.34.0 and yard 0.9.45, and to patched releases of every locked gem `bundle-audit` flagged (including action_text-trix, crass, mail, net-imap and websocket-driver). Runtime dependency requirements are unchanged.
49
+ - **Resource and tool names are read with `params.expect`** — The resources, exports, imports and tools controllers read `:resource_name` and `:tool_name` with `params.expect`. A name that matches nothing still returns `404`. A blank name, such as `/admin/%20`, now returns a bare `400 Bad Request` instead of the not found page.
50
+ - **Request specs parse HTML with `response.parsed_body`** instead of calling Nokogiri on `response.body`, as the new RuboCop Rails cops require.
51
+ - **Resource registration** — Before 0.8, the last class registered under a name replaced the previous one. The first class now keeps the name. A class whose `name` matches the stored class is a reload: it replaces that entry and is not logged as a collision. Two different classes that share a name keep the first, and `finalize!` logs the collision once. The log shows `def self.resource_name = "a_unique_name"`.
52
+ - **CI** — The host-app gate installs the packaged gem in a freshly generated Rails host and fails the build when that host cannot authenticate, render the documented Rails 8 recipe, or serve the packaged assets and translations. The release workflow runs it with the rest of CI before publishing. The job keeps the workflow's `contents: read` permission, which is all checkout and the bundle cache need, so a release call that grants only `contents: read` can start it.
53
+
54
+ ### Deprecated
55
+
56
+ - **Legacy bare-method tool dispatch** — A tool that declares no `tool_action`, and inherits none, still runs its own public methods on `POST /admin/tools/:tool/:action`, and warns once per tool class and method through `IronAdmin.deprecator` (an `ActiveSupport::Deprecation` registered as `:iron_admin`). The warning names the tool and the method and tells you to declare all of a tool's actions at once with `tool_action`: declaring one action makes the tool dispatch only declared actions, so its other public methods return 404 with no warning. Dispatching undeclared methods is removed in 1.0. `config.active_support.deprecation` in the Rails environment files applies to every deprecator on `Rails.application.deprecators`, including `:iron_admin`. Assigning it inside `IronAdmin.configure` raises `NoMethodError`, because that `config` is IronAdmin's configuration. To change only IronAdmin's warnings, set `Rails.application.deprecators[:iron_admin].behavior = :log` or `.silenced = true` in `config/initializers/iron_admin.rb`. Set `config.strict_tool_actions = true` inside `IronAdmin.configure` to turn the fallback off now.
57
+
58
+ ### Fixed
59
+
60
+ - **Soft-delete tabs no longer raise on HTTP and Mongoid resources** — The `with_deleted` and `only_deleted` tabs called `unscope(where:)`, which only Active Record relations have, so selecting one on an HTTP or Mongoid resource with `deleted_at` raised `NoMethodError`. The tab bodies now go through the adapter (`unscope_column` and the new `Adapters::Base#only_soft_deleted`), and they are registered only when the new `Adapters::Base#supports_soft_delete_tabs?` is true: on Active Record and Mongoid. An HTTP resource with `deleted_at` keeps the `:restore` action and shows no soft-delete tabs (a URL that still names one lists the default tab). ([#135](https://github.com/rubylab-app/iron_admin/issues/135))
61
+ - **A scope body that returns `nil` or `false` no longer breaks the index** — Selecting such a tab (`scope :mine, -> { where(user_id: Current.user.id) if Current.user }` with no current user) raised `NoMethodError`. The index now lists the records the tab starts from, as Active Record's `scope` treats a `nil` or `false` result as `all`. Scope counts are unchanged: that tab shows no number. ([#137](https://github.com/rubylab-app/iron_admin/issues/137))
62
+ - **Resources that override the model** — Affected: a resource whose model is not the one its class name implies. `UserResource` stays at `/admin/users`, a namespaced resource keeps its model's plural, and an override of that same model keeps the plural too, including a custom `model_name`. For the others, `resource_name` and the links, redirects, `live_stream_name`, live row ids and export filename built from it come from the full class path under `IronAdmin::Resources`. 0.7 took the registry key from the last segment of the class name when the name could not be read at load, so some served URLs move as well. A namespaced override such as `Shop::NoteResource` moves from `/admin/notes` to `/admin/shop_notes`. A resource that overrides `self.model` does not: on 0.7 `ExpiredLicenseResource` was served at `/admin/expired_licenses`, and only its links and redirects pointed at `/admin/licenses`; both are `/admin/expired_licenses` now, and `LicenseResource` stays at `/admin/licenses`. A namespaced HTTP resource moves from the last segment to the adapter plural (`Shop::ProductResource` from `/admin/products` to `/admin/shop_products`); a non-namespaced HTTP resource stays (`ProductResource` at `/admin/products`). A custom `def self.resource_name` becomes the served URL (`NoteResource` with `def self.resource_name = "archived_notes"` moves from `/admin/notes` to `/admin/archived_notes`). `finalize!` re-keys the registry after the class body has run.
63
+ - **Bulk actions the policy denies** — The index offers only the bulk actions the policy permits (`@permitted_bulk_actions`). When it permits none, the page has no bulk bar and no checkbox column, and the `table` slot passes `bulk_actions:` empty so a custom table can hide its checkboxes. A policy `if:` that raises while the index builds that list is logged and that action is hidden, so the page still renders. Posting the action still runs the condition. Posting a denied bulk action still returns 403. `BulkActionsComponent#render?` treats a nil action list as empty.
64
+ - **Anonymous `register`** — `register` computes the registry key before remembering the class. An anonymous class that has no key raises from `register` and is left out, so a later `finalize!` still runs.
65
+ - **Bulk form CSRF token** — The index bulk form embeds the global authenticity token, so it validates on each bulk action route when `per_form_csrf_tokens` is on. A token minted for the form's `action="#"` was bound to the index path and did not.
66
+ - **Rescued errors log their backtrace** — `log_iron_admin_error` logs the first lines of the backtrace after `Rails.backtrace_cleaner`, along with the class and the message.
67
+ - **Protected tool methods return 404** — A POST to a tool action that names a protected method now returns 404. It used to pass the legacy check and raise `NoMethodError` from `public_send` (a 500).
68
+ - **Action forms were never shown** — Since 0.6.0, the show page, `ActionsComponent`, the index bulk bar and `BulkActionsComponent` posted every action directly, so an action or bulk action declared with `form_fields:` ran without its form: a required note was skipped and a date was never asked for. An action with form fields is now a link to its form, styled like the action buttons, and the bulk bar takes the selected ids to the bulk action's form with a GET (keeping the CSRF token out of its URL). The member form names the record it applies to by model, id and label ("Applies to Article #16 (Slow news).", `iron_admin.resources.action_form.record` and `record_with_label`), so a form opened in another tab or from the history says what it will change, and the bulk form says how many records it applies to and carries the ids and the index's scope, search, filters, sort and page. With `confirm: true`, the form asks for the confirmation on submit instead of before it opens, and Cancel goes back to the record or the index with a whole-page visit (`data-turbo-frame="_top"`, since the form sits in a Turbo frame those pages do not have) instead of the browser history. The form pages check the policy, the action's `condition`, the tenant scope and the selection as the actions do (a bulk form with no ids, a tampered id or a record out of reach goes back to the index with the bulk action's alert). An action no longer runs when a `required: true` field is blank, whether its form or a direct POST sent it: the form comes back as 422 with the submitted values and "can't be blank" under the field, in the theme's error style (`ActionField#missing?`). A required `:boolean` must be checked: its checkbox has `required` (in tool action forms too, which render the same field partial), and an unchecked box, `"0"`, `"false"` or `"off"` counts as blank. Member actions without form fields keep their direct POST and confirmation, and bulk actions without form fields keep their direct POST.
69
+ - **Boolean action fields wrote their label twice** — A `:boolean` field of a resource, bulk or tool action form showed its label above the checkbox and again beside it. The text beside the checkbox is now the field's only label, a `<label for>` that carries the required mark, instead of a `<span>`.
70
+ - **Bulk actions ignored `confirm:`** — The index bulk bar and `BulkActionsComponent` ran a `bulk_action` declared with `confirm: true` as soon as its button was clicked, although the option's documentation promised a confirmation dialog. The button of such an action without form fields now asks first (`data-turbo-confirm`), with the action's `confirm_message`, now documented on `bulk_action`, or `iron_admin.resources.action.confirm` ("Are you sure?"). A bulk action with form fields asks on its form's submit instead, so the user is asked once.
71
+ - **Sticky actions column without its shadow** — `table_sticky_shadow` was set on the sticky header and body cells, but browsers do not paint a table cell's box-shadow when the table collapses its borders, as Tailwind's preflight makes every table do, so no theme's shadow ever showed and long titles looked cut off under the View links. A box laid over each sticky cell now casts it (`Resources::Styles.sticky_edge`); `Styles.sticky_header_cell` and `Styles.sticky_cell` no longer include the shadow.
72
+ - **Squeezed dashboard tables** — The recent records tables let every cell wrap, so on a phone their columns shrank to a word each (rows five lines high, titles cut at the card's edge) and at 1440px names and dates broke onto two lines. Every cell keeps one line now and the table scrolls sideways. The card is a size container (`@container`): in a card 64rem wide or more, association cells and the label column (`name`, `title` or `label`) wrap and long text is cut to one line with an ellipsis, so the other columns keep their line and the rows stay short (`RecentTableComponent::WRAPPING_TYPES`, `LABEL_FIELDS` and `TRUNCATED_TYPES`).
73
+ - **Audit log dates** — The timestamp column read `2026-10-28 01:17:54`, unlike the other dates of the admin. It is a `<time>` element in the datetime field format, "Oct 28, 2026 at 1:17 AM" (`FieldDisplayHelper::DATETIME_FORMAT`), with the exact UTC time in its `datetime` and `title` attributes.
74
+ - **Search results** — The results were plain text, so nothing showed they were links; each label is in the theme's `link` color now, like the related records of a show page. The heading quotes the query with a `<q>` element (the language's quotation marks) in `normal-case`, so a theme that sets page titles in capitals no longer changes what was typed.
75
+ - **Two Clear buttons** — The filter panel's Clear link was muted text, while the audit log's is a secondary button. It is a secondary button now too (`Filters::ControlStyles.clear_button`), in the index page's panel and in `Filters::BarComponent`.
76
+ - **Nested textareas cut a line in half** — A nested row's textarea was two rows high, and its bottom padding showed half of a third line. It grows with its text now (`field-sizing-content`, from `min-h-16` to `max-h-64`); browsers without `field-sizing` keep the two rows.
77
+ - **Blurred 16px icons** — The sidebar's and metric cards' icons are 24px outline heroicons drawn at 16px, which turns their 1.5 stroke into a 1px line that blurs on 1x screens and makes fine icons such as `cog-6-tooth` almost vanish. The 16px outline icons (sidebar, metric and stat cards, quick links, member action buttons) are drawn with a 1.75 stroke (`ApplicationHelper::SMALL_ICON_STROKE`).
78
+ - **Floating surfaces without a shadow** — Dropdown menus, modals and the filter panel built their shadow by appending `-lg` or `-xl` to `card_shadow`, so any `card_shadow` other than the bare `shadow` (for example `shadow-md`) produced a class Tailwind does not have, and they had no shadow. They now use `popover_shadow`.
79
+ - **Table row lines in the text color** — `DataTableComponent` and the dashboard lists set `card_border` on their `divide-y` parent, which sets no divider color, so Tailwind v4 drew the lines in the text color. They now use `table_border`.
80
+ - **Unstyled audit log badges** — The audit log built its action badge classes by interpolation (`bg-#{color}-100`), which Tailwind never generates, so the badges had no colors. They are `BadgeComponent`s now.
81
+ - **Custom badge colors on `:badge` fields** — An entry such as `config.badge_colors[:cyan] = "bg-cyan-100 text-cyan-800"` styled `BadgeComponent`, but `:badge` fields ignored it and showed gray. They render `BadgeComponent` now, so the entry applies.
82
+ - **Dropdown widths without CSS** — `DropdownComponent` built its width class by interpolation (`w-#{width}`), so only widths that some other file happened to write had CSS. Its widths are literal classes now.
83
+ - **Fractional sizes in the HAML shorthand** — HAML ends a shorthand class at the dot, so `.h-2.5` (the dashboard progress bar's track in 0.7) rendered the classes `h-2` and `5`. Fractional values are written in class attributes now, and the Tailwind classes spec fails on the shorthand.
84
+ - **Chart text in Helvetica** — A canvas does not inherit CSS fonts, so charts drew their ticks and legends in Chart.js's default font. They use the font of their card now.
85
+ - **Focus indicators in forced-colors mode** — The filter inputs and the navbar search used `outline-none`, which removes the outline that forced-colors mode shows instead of the focus ring. They use `outline-hidden`, like the other inputs.
86
+ - **Accessibility details** — The remove button of each tag in a `:tags` field has an accessible name ("Remove <tag>"), tooltips also show while their trigger has the keyboard focus, dashboard progress widgets have `role="progressbar"` with their values, chart canvases have an accessible name, and dashboard table header cells have `scope="col"`.
87
+ - **Rich text editor without a name, and toolbar buttons out of reach** — axe-core reported `aria-input-field-name`: a `<label for>` does not name a `<trix-editor>`, so screen readers announced the editor of a `:rich_text` field without its label. The label now has an id (`record_<field>_label`) and the editor points to it with `aria-labelledby`. On a narrow screen Trix scrolled its row of button groups sideways, and its buttons are not focusable, so the attach, undo and redo groups were cut off and keyboard users could not scroll to them (`scrollable-region-focusable`); the box around the toolbar has a `cp-rich-text-field` mark, and engine.css wraps the groups onto more rows there. The editor's text is `text-sm`, like the other inputs (it was 16px).
88
+ - **Import preview table out of keyboard reach** — On a narrow screen the preview table scrolls sideways inside its frame, and its rows hold nothing focusable, so keyboard users could not scroll to the columns past the edge (axe-core `scrollable-region-focusable`). The frame is now a focusable region (`tabindex="0"`, `role="region"`, named by the new `iron_admin.imports.preview.table_label`, "Rows to import") with the theme's `focus_ring`, so the arrow keys scroll it.
89
+ - **Import pages out of line with the others** — The upload page was centered at `max-w-3xl` and the preview at `max-w-5xl`, so the title jumped between the two steps and lined up with no other page. Both now use the `max-w-7xl` frame of every admin page, and the upload card keeps its `max-w-3xl` width at the start of the page. A valid preview row shows its status as a green badge, like the states on other pages, instead of muted text that looked disabled.
90
+ - **Audit log rows and Clear button** — On a narrow screen the table shrinks to its columns' minimum widths, so "2 fields changed" wrapped and every row was twice as tall as its text; the summary stays on one line now. The filter row's Clear link is a secondary button, like the forms' Cancel, instead of a ghost one that showed as bare text.
91
+ - **Show page labels beside the first line of their value** — The label of a show page row was centered on the row, so next to a long value (a rich text body) it sat far below the start of the text. `Resources::Styles::DETAIL_ROW` aligns it to the top (`sm:items-start` instead of `sm:items-center`).
92
+ - **Markdown and rich text styled by classes no app compiles** — Show pages wrapped `:markdown` and `:rich_text` values in `prose prose-sm max-w-none`, classes of the `@tailwindcss/typography` plugin that IronAdmin does not require, so they had no CSS, and rendered markdown lost its headings and lists to Tailwind's reset. They use Trix's content styles (`trix-content`), which the layout loads with Action Text.
93
+ - **Color picker without the control shadow** — The swatch of a `:color` field had no `control_shadow`, unlike the hex input beside it.
94
+ - **Rich text on index pages** — `:rich_text` fields rendered their whole HTML content in index and dashboard recent table cells. They now show plain text, truncated to 50 characters like long text fields, with the full text in the cell's `title`. Headings and paragraphs stay apart, script and style content is dropped, and an attachment shows as its caption or `[filename]`. Show pages still render the formatted content.
95
+ - **Foreign key select filters show labels** — A `:select` filter without `options` on the foreign key of a `belongs_to` association (`filter :category_id, type: :select`) listed the raw ids found in the column. It now offers the associated records that some row refers to, with the labels the form's belongs_to select uses (the association's `display:` option, else the record's name, title, email, label or slug) and the same `tenant_scope`, and each option's value is the key the foreign key stores (the association's `primary_key:`, else the associated record's primary key). Records no row refers to are left out; to choose the options yourself, give the filter `options:`. The filter keeps offering the column's distinct values, as before, when the resource has no `belongs_to` field for the column or that field is not visible to the current user, so it does not reveal the labels of an association the resource hides, and when the association is declared `autocomplete: true`, so it does not load the associated table on every index page (give the filter `options:` to label those choices).
96
+ - **Scope tabs keep the index state** — Clicking a scope tab on an index page keeps the search, the active filters and the sort, and starts back at the first page. Before, it kept only the search. `Ui::ScopesComponent` drops the `scope` and `page` of its `params:`, so passing it `iron_admin_index_state` does the same; before, a String `"scope"` key in `params:` could win over the tab's own scope.
97
+ - **`ActivityFeedComponent` items raised `NoMethodError`** — Rendering an `IronAdmin::Dashboards::ActivityFeedComponent` with any item failed with ``undefined method 'wrapper'``, because the item template called a local variable with a block. Items now render as a link when they have an `href` and as a plain row otherwise.
98
+ - **Heading levels skipped on the dashboard and on forms with nested records** — axe-core reported `heading-order` because these titles were `h3` right below the page's `h1`. They are now `h2` (the level alone does not change how they look): the titles of `ChartComponent`, `ProgressComponent`, `RecentTableComponent`, `ActivityFeedComponent` and `QuickLinksComponent`, and the section title of `NestedFormComponent`. Host CSS or tests that select these titles as `h3` need updating.
99
+ - **Default-theme text below WCAG AA contrast** — axe-core reported `color-contrast` on these default-theme texts:
100
+ - The record id next to the title on show and edit pages was `text-gray-400` on the `gray-50` page (2.5:1). It now uses the theme's `muted_text` (Neutral: `text-zinc-500` on the `zinc-50` page, 4.6:1).
101
+ - The column chips on the import and import preview pages used `muted_text` on their `bg-gray-100` chip (4.4:1 by default). They now use the theme's `chip` classes (Neutral: `text-zinc-700` on `bg-zinc-100`, above 9:1).
102
+ - The unavailable Previous/Next item of the index pagination (`text-gray-300` on white) was a plain `span`. It is now exposed as a disabled link (`role="link"`, `aria-disabled="true"`), so screen readers announce it as unavailable and, as an inactive control, it needs no minimum contrast. It looks the same.
103
+ - **Audit log entries without a user** — With database storage, an entry logged without a user showed an empty User cell. It now shows "Unknown", as with memory storage.
104
+ - **Import preview values** — The import preview formats each cell as the show page displays its field, instead of the raw cast value: "Yes" or "No" for a boolean (it showed `true` and `false`), the field's `format:` for a date or datetime, the symbol, delimiters and precision of a `:currency` field, the humanized value of a `:badge` or `:radio` field, and a mask for `:password` and `:hidden` fields. A blank cell stays blank. Only the text changes: the import saves the values from the file, as before. `IronAdmin::Import::ImportPreview` has a new `fields` member, the field of each mapped column.
105
+ - **Stats grid layout** — `IronAdmin::Dashboards::StatsGridComponent` now lays out its cards like the dashboard metric cards. The grid spaces its cards like the dashboard's other grids, and with `columns: 4` (the default) it keeps two columns until the `xl` breakpoint instead of switching to four at `lg`, where the sidebar leaves each card about 160px. In each card the label wraps beside the icon with a gap instead of touching it, and the value sits on its own row below them, so a long value such as `$123,456.78` no longer pushes the icon out of the card.
106
+ - **Documentation site pages without a layout** — Every page except the home page was published without the just-the-docs layout (no styles, no sidebar). `docs/site/_config.yml` now defaults every page to `layout: default`; files under `assets/`, such as the theme's stylesheets, still get no layout.
107
+
108
+ ### Security
109
+
110
+ - **The audit log can be kept per tenant** — `config.audit_tenant { |controller| ... }` returns the current tenant's key. The block runs in the controller, with the controller as its argument. Each change made in the admin stores the key, as a String, in the new `tenant_key` (database column and `AuditLog::Entry#tenant_key`, also in `Entry#to_h`), and the audit page, with the values its Resource and Action filters offer, lists only the entries of the current key. When the block returns `nil` the page lists nothing, and entries logged without a key never appear. `AuditLog.query(tenant_key: ...)` filters the same way; a given `nil` key matches nothing. `rails generate iron_admin:install_audit` adds the column and its index; an existing table needs a migration (UPGRADING.md), and without it a query by tenant raises the new `IronAdmin::ConfigurationError`. An event built by the host app without `tenant_key` is still logged, without a key. Before, `/admin/audit` listed every tenant's entries, with their changes, users and IP addresses, to every user the `authenticate` block admitted; without `audit_tenant` it still does. ([#138](https://github.com/rubylab-app/iron_admin/issues/138))
111
+ - **An import row that updates needs `:update`** — Imports were authorized once, with `:create`, so with `import_upsert_key` a user allowed only to create updated every matched record. Each row is now authorized for what it does: a row that matches an existing record needs `:update`, any other row `:create`. A denied row is reported as an error in the preview and counted as failed in the import (`iron_admin.imports.errors.not_permitted.create` and `.update`), and the other rows still import. Opening the import pages still needs `:create`. ([#145](https://github.com/rubylab-app/iron_admin/issues/145))
112
+ - **Tools have their own access check** — `tool_access ->(user) { ... }` (or a block) on a tool restricts the whole tool: when it returns `false` or `nil`, the tool page, every action (including actions declared without `condition:`), every action form and the legacy dispatch of undeclared methods answer `403` without running anything, and the sidebar hides the tool. Subclasses inherit it, and an action's `condition:` still applies on top of it. `Tool.accessible_by?(user)` answers the same question. A tool without `tool_access` follows `config.default_policy`: open while it is `:allow`, `403` when it is `:deny`. Before, any user the `authenticate` block admitted could open every tool and run every action declared without a condition. ([#140](https://github.com/rubylab-app/iron_admin/issues/140))
113
+ - **A fresh install denies every request** — `rails generate iron_admin:install` writes an `authenticate` block whose value is `false`, so the admin answers `403` until the block is replaced with the app's authentication; the comment above it links the authentication recipes. Before, the block body was a comment (value `nil`), so a fresh install answered every request. Initializers that already exist do not change. In production, IronAdmin logs a warning at boot when no `authenticate` block is configured, because the admin then answers every request unless a route constraint protects the mount. The host-app gate's smoke check now expects `403` for the generated initializer. ([#148](https://github.com/rubylab-app/iron_admin/issues/148))
114
+ - **`field :organization_id` configures the association field** — A `belongs_to` foreign key is inferred as a field named after the association, so `field :organization_id, readonly: ...` or `visible: false` was silently ignored and left a tenant column writable. An override under the foreign key name now applies to the association field; when both names are overridden, the association name wins. `Resource.unresolved_field_overrides` lists the `field` names that match no field, and in development and test `IronAdmin::FieldOverrideWarning` logs them at boot (again only when that list changes), with a hint for names ending in `_id`. ([#142](https://github.com/rubylab-app/iron_admin/issues/142))
115
+ - **Breaking: credential columns are hidden by default** — `encrypted_password`, `password_digest`, `reset_password_token`, `confirmation_token`, `unlock_token`, `remember_token`, `invitation_token`, `authentication_token`, `otp_secret`, `encrypted_otp_secret`, `encrypted_otp_secret_iv`, `encrypted_otp_secret_salt`, `otp_backup_codes` and any `*_password_digest` column are now inferred with `visible: false, readonly: true` (`FieldInferrer::CREDENTIAL_COLUMNS`, `CREDENTIAL_PATTERN`, `FieldInferrer.credential_column?`). They no longer appear on the index, show page, form, exports, search, sorting or filters, and the form never writes them. Before, a Devise or `has_secure_password` user resource showed, exported and searched every bcrypt hash and reset token, and let an admin overwrite a password hash with arbitrary text. `field :name, visible: true` shows one again (still read-only unless `readonly: false`). See UPGRADING.md. ([#139](https://github.com/rubylab-app/iron_admin/issues/139))
116
+ - **A hidden field stays hidden on every path** — A field the user cannot see (`visible: false`, a `visible:` proc that returns false for that user, or a `:password`/`:hidden` type) is no longer sortable (`?sort=` falls back to the default column), is dropped from the nested-attributes permit list, and is replaced by `[FILTERED]` in audit changes; search and the auto-inferred filters skip it too. For a `belongs_to` or polymorphic field this covers its columns as well (`Field#column_names`: the foreign key, or the type and id columns), so a hidden association cannot be sorted or audited through `organization_id`; a filter declared with `filter :organization_id` stays, as before. An override such as `field :x, label: "Y"` now keeps the field's inferred `visible` and `readonly` (`Field#merge`), instead of resetting them to visible and writable. New `Field#concealed_from?(user)` and `Field#always_concealed?`. ([#144](https://github.com/rubylab-app/iron_admin/issues/144))
117
+ - **Submitted references are checked against the tenant scope** — The selects offered only records inside `config.tenant_scope`, but the server never checked a posted value, so a hand-made request could attach a record to another tenant's parent, or move a user to another tenant. With a tenant scope configured, create and update now check every submitted `belongs_to` foreign key, polymorphic type and id, many-to-many `_ids` and nested `belongs_to` key against the same relation the selects use (`AssignableRecordsHelper#assignable_records`). A value outside it is not saved: the form comes back with `422` and the error "is not available" on the field (`iron_admin.resources.errors.not_assignable`; nested rows: `nested_not_assignable` on the record). Only submitted values are checked, never stored ones, and nothing extra runs without a tenant scope. New `Concerns::AssignableReferences`. ([#141](https://github.com/rubylab-app/iron_admin/issues/141))
118
+ - **Polymorphic, many-to-many and nested selects respect the tenant scope** — These selects listed every record of the associated model (`.all`), while the plain `belongs_to` select applied `config.tenant_scope`, so a user could see and pick other tenants' records. They now list the records of the new `AssignableRecordsHelper#assignable_records(model_class)`, the tenant-scoped relation, and the nested `belongs_to` select submits the association's own primary key (`association_value_key`) instead of assuming `id`. ([#146](https://github.com/rubylab-app/iron_admin/issues/146))
119
+ - **The show page respects the related resource's read policy and the tenant scope** — The `has_one`, many-to-many and `has_many` panels printed related records straight from the record. A panel now renders only when the user may read the related resource (an unregistered many-to-many model has no policy and still shows), and its records go through `config.tenant_scope`; a `has_one` record outside the scope is not shown. New `IronAdmin::RelatedRecordsHelper` (`related_panel_readable?`, `related_records`, `related_record`). The tenant block now also runs on these related models, so it must handle every model the admin queries, as it already had to for `belongs_to` selects and each resource's index (UPGRADING.md). ([#147](https://github.com/rubylab-app/iron_admin/issues/147))
120
+ - **Records created through the admin get the tenant** — `config.tenant_scope` filtered reads, but new records were built with `Model.new`, so a record created in the admin was saved without its tenant (or failed a presence validation the form could not fix) and its show page answered 404. New and created records, new nested rows, and import rows that create one, now get the tenant: the new `Adapters::Base#scope_attributes(scope)` returns the tenant scope's plain equality values that are attributes of the scope's model, and the new `Adapters::Base#build_in(scope, attrs)` assigns them after the submitted values, so a posted tenant column cannot point elsewhere. On update, and for import rows that update a record, the tenant columns are not writable. A tenant block whose conditions are not plain equalities (an `IN` list, a range, a join) assigns nothing, so every create and update now also checks, inside a transaction, that the saved record and its nested rows are still inside the tenant scope: a write that would leave it is rolled back and the form answers `422` (`iron_admin.resources.errors.outside_tenant`), and such an import row fails without being saved (`iron_admin.imports.errors.outside_tenant`). New `Adapters::Base#savepoint` (a nested transaction on Active Record). Adapters without transactions (Mongoid, HTTP; `Adapters::Base#supports_transactions?` is false) cannot undo a write, so they check before writing instead: `Adapters::Base#scope_match(scope, record)` answers `:inside`, `:outside` or `:unknown` for the record with its new values (`Adapters::Base#preview`; Mongoid matches the tenant selector in memory, HTTP compares plain equality conditions and now also stamps them through `scope_attributes`). Only `:inside` writes; `:unknown` (for example an `IN` list on an HTTP resource) is rejected with `422` (`iron_admin.resources.errors.tenant_unverifiable`) or fails the import row, and nothing is written. The form now shows the error of a rejected many-to-many selection. The tenant block is now applied through one helper, `IronAdmin::TenantScope.apply` (and `.configured?`). ([#134](https://github.com/rubylab-app/iron_admin/issues/134))
121
+ - **Breaking: an `authenticate` block whose value is `false` denies access** — When the block's value is exactly `false` and it has not already rendered or redirected, the request gets `403`. HTML gets the error page without the admin shell (no sidebar, navbar or link back into the admin); other formats get a bare `403`. Before, the value was ignored, so a block such as `config.authenticate { |controller| User.find_by(id: controller.session[:user_id])&.admin? || false }` let every request through. The `|| false` is required: a signed-out visitor makes `&.admin?` return `nil`, and `nil` still allows the request. `true` and any other value allow it too, including a commented-out block and a `redirect_to ... unless ...` block that does not redirect (both are `nil`). Do not use `return` in the block (`LocalJumpError` from an initializer); use `next false` to stop early. A block that already redirected or rendered keeps that response. See UPGRADING.md.
122
+ - **Mixed tools only dispatch declared actions** — A tool is affected when it, or any tool it inherits from, declares a `tool_action`. It no longer runs its other public methods from `POST /admin/tools/:tool/:action`. An undeclared name returns 404 and the method is not called, with no deprecation warning, so a public helper is not reachable without the action's `condition:`. A subclass of a base tool that declares shared actions is affected even when the subclass declares none of its own: its own public methods return 404, and the inherited declared action still runs. Declare the action with `tool_action`, using the same `condition:` as the tool's other actions (a declared action also appears as a button on the default tool page), or make the helper private.
123
+
124
+ ### Documentation
125
+
126
+ - **Haml examples compile** — The haml examples in the component library and the dashboard guide now compile and render (a Ruby call continues only after a trailing comma). The examples of components that do not exist are gone. `spec/iron_admin/shipped_haml_examples_spec.rb` compiles every shipped haml example.
127
+ - **YARD matches what the code does** — A select field takes `choices:`. `options:` is the filter key; on a field it raises `NoMethodError` (`map` for nil) on new and edit. The documented types are the ones `FieldInferrer` assigns and the form renders (`:text`, `:textarea`, `:number`, `:boolean`, `:date`, `:datetime`, `:time`, `:json`, `:url`, `:email`, `:select`, `:belongs_to`, `:polymorphic_belongs_to`, `:file`, `:files`, `:rich_text`, and the form-only types such as `:badge` and `:password`). `:string` and `:integer` are not types: the form renders a text input. `label:` does not change index, show or form labels (those pages humanize the name); import column matching uses it as an extra header candidate. `format:` is a strftime string for a date or datetime. A Proc is not called: a datetime raises `NoMethodError` and a `Date` raises `TypeError`. Other types ignore it. A resource's `menu label:` is ignored (the sidebar uses the pluralized model name); a tool's menu label is used. `fields:` on `has_many` and `has_one` feeds the nested form only. The `bulk_action` example uses `next false` (`return false` raises `LocalJumpError`). `on_action` receives one event (`user`, `action`, `resource` as the class name, `record_id`, `changes`, `ip_address`). `Dashboard.layout` stores a block that nothing reads. Chart examples no longer call `group_by_month` or `group_by_day` (groupdate is not a dependency). The block returns a Hash of label => value, and the examples `pluck` `created_at` from the last twelve months instead of loading every user, then sort the `YYYY-MM` keys so the months are chronological. Imports cast `type: :integer` with `Integer()` even though the form renders a text input for that type. A custom action's `event.action` is the String URL segment; a bulk action's is the Symbol passed to `bulk_action`. Compare them with `event.action.to_s`. `config.search_engine` is marked unused. The `Policy` class doc says a policy block requires an explicit allow for CRUD actions, while custom and bulk actions stay allowed unless the policy names them.
128
+ - **Examples sit in the namespace Zeitwerk loads** — Ruby examples in `README.md`, `docs/**/*.md` and `docs/site/**/*.md` that define a resource, dashboard or tool now nest it in `module IronAdmin` and `module Resources`, `Dashboards` or `Tools`. A path named in an example is `app/iron_admin/resources/<name>.rb` (or `dashboards` or `tools`). `spec/iron_admin/shipped_ruby_examples_spec.rb` lists `README.md`, `UPGRADING.md`, `docs/**/*.md`, `lib/**/*.rb` and `app/**/*.rb` with `git ls-files --cached --others --exclude-standard` and a glob pathspec, so `lib/iron_admin.rb` is included, untracked docs are checked and ignored files are not. A path that is not a file is skipped. When git is unavailable it globs and drops paths that match the root `.gitignore` (`File.fnmatch?` with `FNM_PATHNAME`; a trailing slash is a directory prefix). It parses each block with Prism, including a fragment Prism does not fully accept, and fails with the file and line of a class that inherits from `IronAdmin::Resource`, `Dashboard` or `Tool` outside `IronAdmin::Resources`, `Dashboards` or `Tools`. A relative name is resolved the way Ruby does (the nesting, then each outer prefix, then the name), including a relative path that contains `::`, and a class opened twice keeps the first superclass that is not nil. A class that inherits from a base defined in the same block counts as that base. A block in `UPGRADING.md` whose first line is `# Before (0.x):` is the old shape until the first `# After` line; the same marker in any other file is checked. An `@example` runs until the next tag whose `@` sits at the example's column, so an indented `@ivar` does not end it. Ruby fences are counted with a separate pattern, after blockquote and list prefixes are stripped. A compact `class IronAdmin::Resources::Foo` counts as namespaced.
129
+ - **Recipes that can be copied** — "Extending the Resource Class" shares behavior with a module. A subclass such as `ApplicationResource` is itself registered, and the sidebar then raises `uninitialized constant Application`. "Setting the Locale" scopes the request with `around_action` and `I18n.with_locale`, and uses `I18n.default_locale` unless `I18n.locale_available?`. It does not assign `I18n.locale`. The 404, the 400 and the authentication-denied page still render in the default locale. "Subclassing the Base Controller" sets the time zone with `around_action` and `Time.use_zone`. `ActiveSupport::TimeZone[nil]` raises `ArgumentError`, so the zone name is stringified first; a blank or unknown name uses `Time.zone_default`. It does not assign `Time.zone`. A custom field type's form input is the String `config.components.fields[:star_rating] = "MyApp::StarRatingComponent"`, constantized when the form renders. `display` clamps the stored value with `to_i.clamp(0, 5)` and `index_display` is registered once; neither references a reloadable constant. The form `max` is only client-side, so the model should `validates :rating, inclusion: { in: 1..5 }`. Multi-tenant examples set the host's `Current.organization` from an `around_action` on `IronAdmin::ApplicationController` and skip the scope when it is nil. The testing example refers to `IronAdmin::Resources::UserResource`.
130
+ - **Rails 8 authentication generator** — The quick starts in the README, `docs/getting-started/quick-start.md` and the documentation site point an app built with `bin/rails generate authentication` at the authentication guide. That generator does not store the user id in `session[:user_id]`, and IronAdmin controllers inherit from `ActionController::Base`, so the host's `Authentication` concern and `Current.user` are not available in the `authenticate` block.
131
+
132
+ - **Screenshots of the new look** — The README and the documentation site's home page show the Meridian Magazine dashboard in Neutral, and the README's Themes section and the top of the theming guide show the demo's dashboard in its four themes: Neutral, Midnight, Editorial and Brutalist (`docs/site/assets/images/themes.png`).
133
+ - **Theming guide** — `docs/guides/theming.md` documents the Neutral look, every theme property with its Neutral value and what it controls, `config.theme`, `register_theme` with a complete dark theme, `default_theme`, `theme_resolver` (per user and from a query parameter), the theme switcher and its cookie, `IronAdmin.current_theme`, fonts (privacy, Content Security Policy and how to turn the Google Fonts request off), color schemes and charts, badge and alert palettes, and the Tailwind rules for classes in host themes. `docs/reference/theme-properties.md` is now the theme API reference, the configuration reference, routes reference, components guide and README cover themes, UPGRADING.md has a 0.8.0 section with a snippet that restores the 0.7 look, and the fields guide lists the real default badge colors (it showed `completed` as blue and `draft` as yellow, and values IronAdmin does not map).
134
+ - **Live demo links** — The README, the docs index (`docs/README.md`) and the documentation site's home and Getting Started pages link to the live demo at https://demo.ironadmin.rubylab.app/ and to its source, the [Meridian Magazine](https://github.com/rubylab-app/meridian_magazine) Rails app, where you sign in by picking an admin, an editor or an author. The site's sidebar also links to the live demo. The README and the site's home page show a screenshot of the demo's dashboard, stored at `docs/site/assets/images/demo-dashboard.png` so the site publishes it and the gem does not package it. The home page also uses it as its social preview image (`og:image`), so a shared link to the documentation shows the screenshot.
135
+ - **0.7.0 release post** — The README and the documentation site's home page link to the post about what changed in 0.7.0 and how it was tested: [IronAdmin 0.7: The Whole Roadmap Shipped, Then I Tried to Break It](https://medium.com/@pedroperafncarrasco_83095/ironadmin-0-7-the-whole-roadmap-shipped-then-i-tried-to-break-it-6be683936023).
136
+
10
137
  ## [0.7.0] - 2026-10-26
11
138
 
12
139
  > **Upgrading from 0.6.0?** IronAdmin 0.7.0 requires **Ruby >= 3.3** and **Rails >= 8.0.4**, raises several dependency floors, and tightens authorization, so some requests that used to succeed now return `403` or `404`. Entries marked **Breaking** need attention, and UPGRADING.md lists every change that may need action, including the responsive layout markup changes (`p-8` padding, off-canvas sidebar, overlay classes). Read the [0.7.0 upgrade guide](https://github.com/rubylab-app/iron_admin/blob/main/UPGRADING.md) before upgrading.
@@ -497,7 +624,8 @@ First public release.
497
624
  - Policy instances now cached at Resource class level
498
625
  - Field visibility filtering applied consistently in index, show, forms, exports, and search
499
626
 
500
- [Unreleased]: https://github.com/rubylab-app/iron_admin/compare/v0.7.0...HEAD
627
+ [Unreleased]: https://github.com/rubylab-app/iron_admin/compare/v0.8.0...HEAD
628
+ [0.8.0]: https://github.com/rubylab-app/iron_admin/compare/v0.7.0...v0.8.0
501
629
  [0.7.0]: https://github.com/rubylab-app/iron_admin/compare/v0.6.0...v0.7.0
502
630
  [0.6.0]: https://github.com/rubylab-app/iron_admin/compare/v0.5.0...v0.6.0
503
631
  [0.5.0]: https://github.com/rubylab-app/iron_admin/compare/v0.4.0...v0.5.0
data/README.md CHANGED
@@ -6,12 +6,21 @@
6
6
 
7
7
  Convention-over-configuration admin panel engine for Ruby on Rails. Build beautiful admin interfaces with minimal code.
8
8
 
9
+ **[Live demo](https://demo.ironadmin.rubylab.app/)** · [Demo source](https://github.com/rubylab-app/meridian_magazine) · [Documentation](https://rubylab-app.github.io/iron_admin/) · [What's new in 0.7](https://medium.com/@pedroperafncarrasco_83095/ironadmin-0-7-the-whole-roadmap-shipped-then-i-tried-to-break-it-6be683936023)
10
+
11
+ [![The IronAdmin dashboard of the Meridian Magazine demo in the default Neutral theme: a light gray sidebar, white metric cards with thin borders, an indigo bar chart of articles published per month and a pie chart of articles by category](docs/site/assets/images/demo-dashboard.png)](https://demo.ironadmin.rubylab.app/)
12
+
13
+ The demo is Meridian Magazine, a Rails 8 app built with IronAdmin. Sign in as one of three
14
+ users (an admin, an editor or an author; no password needed) and see how resource policies
15
+ change what each role can do. Its [source](https://github.com/rubylab-app/meridian_magazine)
16
+ has the resources, dashboard, policies and theme behind it.
17
+
9
18
  ## Features
10
19
 
11
20
  - **Zero Configuration CRUD** - Auto-generates forms and tables from your database schema
12
21
  - **Resource DSL** - Customize fields, filters, scopes, and actions with a clean Ruby DSL
13
22
  - **Dashboard Builder** - Create metrics, charts, and recent records widgets
14
- - **Theme System** - Fully customizable Tailwind CSS classes for every UI element
23
+ - **Themes** - A minimal default look (Neutral), named themes such as a dark one, and a theme switcher in the navbar; every color, font, radius and shadow is a Tailwind class you can change
15
24
  - **Authorization** - Built-in policy system for fine-grained access control
16
25
  - **Search** - Global search across all resources
17
26
  - **Export** - CSV and JSON export out of the box
@@ -96,6 +105,11 @@ IronAdmin.configure do |config|
96
105
  end
97
106
  ```
98
107
 
108
+ An app built with `bin/rails generate authentication` does not store the user id in
109
+ `session[:user_id]`. IronAdmin controllers inherit from `ActionController::Base`, so
110
+ the host's `Authentication` concern and `Current.user` are not available in this block.
111
+ Use the [Rails 8 authentication generator example](docs/guides/authentication.md#with-the-rails-8-authentication-generator).
112
+
99
113
  ### 2. Generate Resources
100
114
 
101
115
  ```bash
@@ -159,6 +173,39 @@ end
159
173
 
160
174
  Visit `/admin` and your admin panel is ready!
161
175
 
176
+ ## Themes
177
+
178
+ [![The Meridian Magazine dashboard in four IronAdmin themes: Neutral, light with black buttons; Midnight, dark with a violet accent; Editorial, cream paper with black rules and serif headings; Brutalist, monospace with thick black borders, hard shadows and yellow accents](docs/site/assets/images/themes.png)](docs/guides/theming.md)
179
+
180
+ The four themes of the [Meridian Magazine demo](https://github.com/rubylab-app/meridian_magazine).
181
+ The [Theming Guide](docs/guides/theming.md) shows how to build your own.
182
+
183
+ The default look, **Neutral**, is a minimal light theme: zinc grays, white surfaces with 1px
184
+ borders, the Inter typeface, a black primary button and an indigo accent. Change any of its
185
+ properties, or register more themes. With two or more, the navbar shows a theme switcher that
186
+ remembers each person's choice in a cookie:
187
+
188
+ ```ruby
189
+ # config/initializers/iron_admin.rb
190
+ IronAdmin.configure do |config|
191
+ config.theme do |t| # the default theme
192
+ t.btn_primary = "bg-emerald-700 text-white hover:bg-emerald-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-emerald-600"
193
+ end
194
+
195
+ config.register_theme(:midnight, label: "Midnight") do |t|
196
+ t.color_scheme = "dark"
197
+ t.main_bg = "bg-zinc-950"
198
+ t.card_bg = "bg-zinc-900"
199
+ # ... every property is listed in the theming guide
200
+ end
201
+ end
202
+ ```
203
+
204
+ `config.theme_resolver` can pick the theme per user or per tenant, and your own components read
205
+ the request's theme with `IronAdmin.current_theme`. Neutral loads Inter from Google Fonts; set
206
+ `font_stylesheet_url` to `nil` to turn that request off. See the
207
+ [Theming Guide](docs/guides/theming.md), which includes a complete dark theme.
208
+
162
209
  ## Documentation
163
210
 
164
211
  Full documentation is available at https://rubylab-app.github.io/iron_admin/ and in the [docs](docs/) directory: