plutonium 0.69.0 → 0.70.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/skills/plutonium-resource/SKILL.md +13 -0
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +17 -0
  5. data/CLAUDE.md +11 -0
  6. data/SECURITY.md +1 -1
  7. data/app/assets/plutonium.css +2 -2
  8. data/app/assets/plutonium.png +0 -0
  9. data/config/locales/en/ui.yml +3 -0
  10. data/docs/blog/introducing-plutonium-dashboards.md +4 -4
  11. data/docs/blog/the-slowest-query-is-the-count.md +109 -0
  12. data/docs/guides/performance.md +14 -0
  13. data/docs/public/favicon-16x16.png +0 -0
  14. data/docs/public/favicon-32x32.png +0 -0
  15. data/docs/public/images/blog/i18n-es-admin.png +0 -0
  16. data/docs/public/images/blog/pagination-capped.png +0 -0
  17. data/docs/public/images/blog/pagination-countless.png +0 -0
  18. data/docs/public/images/components/avatar.png +0 -0
  19. data/docs/public/images/guides/custom-actions-bulk.png +0 -0
  20. data/docs/public/images/guides/dashboard-card-error.png +0 -0
  21. data/docs/public/images/guides/dashboard-loading.png +0 -0
  22. data/docs/public/images/guides/dashboard-overview.png +0 -0
  23. data/docs/public/images/guides/dashboard-sidebar.png +0 -0
  24. data/docs/public/images/guides/kanban-after-move.png +0 -0
  25. data/docs/public/images/guides/kanban-board-light.png +0 -0
  26. data/docs/public/images/guides/kanban-board.png +0 -0
  27. data/docs/public/images/guides/kanban-show-centered-modal.png +0 -0
  28. data/docs/public/images/guides/kanban-wip-toast.png +0 -0
  29. data/docs/public/images/guides/multi-tenancy-dashboard.png +0 -0
  30. data/docs/public/images/guides/multi-tenancy-welcome.png +0 -0
  31. data/docs/public/images/guides/nested-inputs.png +0 -0
  32. data/docs/public/images/guides/nested-resources-tab.png +0 -0
  33. data/docs/public/images/guides/search-filtering-index.png +0 -0
  34. data/docs/public/images/guides/search-filtering-panel.png +0 -0
  35. data/docs/public/images/guides/theming-after.png +0 -0
  36. data/docs/public/images/guides/theming-before.png +0 -0
  37. data/docs/public/images/guides/user-invites-landing.png +0 -0
  38. data/docs/public/images/guides/user-profile-edit.png +0 -0
  39. data/docs/public/images/guides/user-profile-show.png +0 -0
  40. data/docs/public/images/guides/wizards-chooser.png +0 -0
  41. data/docs/public/images/guides/wizards-completed.png +0 -0
  42. data/docs/public/images/guides/wizards-index-action.png +0 -0
  43. data/docs/public/images/guides/wizards-repeater.png +0 -0
  44. data/docs/public/images/guides/wizards-review.png +0 -0
  45. data/docs/public/images/guides/wizards-step.png +0 -0
  46. data/docs/public/images/home/tour-actions.png +0 -0
  47. data/docs/public/images/home/tour-async.png +0 -0
  48. data/docs/public/images/home/tour-kanban.png +0 -0
  49. data/docs/public/images/home/tour-tenancy.png +0 -0
  50. data/docs/public/images/home/tour-wizard.png +0 -0
  51. data/docs/public/images/home-index.png +0 -0
  52. data/docs/public/images/home-new.png +0 -0
  53. data/docs/public/images/home-show.png +0 -0
  54. data/docs/public/images/reference/async-progress-page.png +0 -0
  55. data/docs/public/images/reference/async-running-banner.png +0 -0
  56. data/docs/public/images/reference/structured-inputs-removed.png +0 -0
  57. data/docs/public/images/reference/structured-inputs.png +0 -0
  58. data/docs/public/images/tutorial/02-empty-index.png +0 -0
  59. data/docs/public/images/tutorial/02-index-with-posts.png +0 -0
  60. data/docs/public/images/tutorial/02-new-form-modal.png +0 -0
  61. data/docs/public/images/tutorial/02-new-form.png +0 -0
  62. data/docs/public/images/tutorial/03-create-account.png +0 -0
  63. data/docs/public/images/tutorial/03-login.png +0 -0
  64. data/docs/public/images/tutorial/04-admin-index.png +0 -0
  65. data/docs/public/images/tutorial/05-actions-menu.png +0 -0
  66. data/docs/public/images/tutorial/05-row-actions.png +0 -0
  67. data/docs/public/images/tutorial/06-comments-tab.png +0 -0
  68. data/docs/public/images/tutorial/06-post-with-comments.png +0 -0
  69. data/docs/public/images/tutorial/07-author-dashboard.png +0 -0
  70. data/docs/public/images/tutorial/07-author-portal.png +0 -0
  71. data/docs/public/images/tutorial/08-customized-index.png +0 -0
  72. data/docs/public/og-image.png +0 -0
  73. data/docs/public/plutonium.png +0 -0
  74. data/docs/public/tutorial/plutonium-association-panel.png +0 -0
  75. data/docs/public/tutorial/plutonium-dashboard.png +0 -0
  76. data/docs/public/tutorial/plutonium-login-page.png +0 -0
  77. data/docs/public/tutorial/plutonium-nested-form.png +0 -0
  78. data/docs/public/tutorial/plutonium-posts-dashboard-customized.png +0 -0
  79. data/docs/public/tutorial/plutonium-posts-dashboard.png +0 -0
  80. data/docs/public/tutorial/plutonium-posts-detail-customized.png +0 -0
  81. data/docs/public/tutorial/plutonium-posts-detail.png +0 -0
  82. data/docs/public/tutorial/plutonium-publish-post.png +0 -0
  83. data/docs/reference/configuration.md +1 -0
  84. data/docs/reference/i18n.md +1 -1
  85. data/docs/reference/resource/definition.md +35 -0
  86. data/docs/reference/ui/layouts.md +13 -0
  87. data/gemfiles/rails_7.gemfile.lock +3 -3
  88. data/gemfiles/rails_8.0.gemfile.lock +1 -1
  89. data/gemfiles/rails_8.1.gemfile.lock +1 -1
  90. data/lib/plutonium/configuration.rb +17 -0
  91. data/lib/plutonium/definition/base.rb +22 -0
  92. data/lib/plutonium/pagination.rb +35 -0
  93. data/lib/plutonium/resource/controllers/crud_actions/index_action.rb +27 -1
  94. data/lib/plutonium/ui/grid/card.rb +11 -2
  95. data/lib/plutonium/ui/grid/resource.rb +2 -2
  96. data/lib/plutonium/ui/layout/icon_rail.rb +42 -4
  97. data/lib/plutonium/ui/table/components/filter_pills.rb +8 -2
  98. data/lib/plutonium/ui/table/components/pagy_info.rb +30 -10
  99. data/lib/plutonium/ui/table/resource.rb +2 -2
  100. data/lib/plutonium/version.rb +1 -1
  101. data/package.json +1 -1
  102. data/plutonium.gemspec +3 -1
  103. data/src/css/components.css +3 -1
  104. metadata +7 -7
  105. data/docs/public/images/blog/dashboards-card-error.png +0 -0
  106. data/docs/public/images/blog/dashboards-loading.png +0 -0
  107. data/docs/public/images/blog/dashboards-overview.png +0 -0
  108. data/docs/public/images/blog/dashboards-sidebar.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec1cce1809eadd51ea67c024d0b3634ce5484c84f8399cf8eaa33c5eb0c2e000
4
- data.tar.gz: fca80361dc22fcb0ff768c9ff3c4a4e6128aceff31425c6e1f02d4e3df6d958c
3
+ metadata.gz: 36351840fe45e3c1d51694397c480dc641bb6edb4b7d32b38149b2af742d317a
4
+ data.tar.gz: dad970de51f6f04a961cae9bf4c50ea35f6b76601371cae3787b3c5e3031dfbf
5
5
  SHA512:
6
- metadata.gz: 7aeac86ceb3d02a7528c685aa7b1a3e4ae1069dc30610cbeea384cc9e777191b7ed6b81903153351feb9919163b1be8e4e19cf902d12a10b8457b31458948d80
7
- data.tar.gz: cb967b6a1a24dcfeda965994c2ed0395a30f1446c78128b3b51dcf2f6e3daa2465a12b95e13b9c07ec2f40cb2f314917a6e0ba4443700c7c51a81d5287dc3211
6
+ metadata.gz: d42e71c6b6c9a94643af9f394f9467283d0465ef25cb1862a3be8dc0a9f8b94f4592398f55a1816a55fd9e1d1412b6112a0cb11fc842c1366ecba27963f7b34a
7
+ data.tar.gz: 88f941e7429c0ef0469d104de914a6e872153a64317f2177329c7f34acbc9b90895846f351fe8d38f77f52fa8198e70ea4512b3eebe728710835f1849b556c8f
@@ -1358,6 +1358,19 @@ default_sort :created_at, :desc
1358
1358
  default_sort { |scope| scope.order(featured: :desc, created_at: :desc) }
1359
1359
  ```
1360
1360
 
1361
+ ## Pagination count
1362
+
1363
+ Each index page load runs a `COUNT(*)` for the total. On a table with millions of rows that count can take longer than the page query itself. Cap it or turn it off per resource:
1364
+
1365
+ ```ruby
1366
+ class TransactionDefinition < ResourceDefinition
1367
+ pagination count: 10_000 # count at most 10,000 rows; past that the total reads "10000+"
1368
+ pagination count: false # no COUNT query; previous/next navigation only
1369
+ end
1370
+ ```
1371
+
1372
+ The global default is `config.pagination = {count: :exact}`. A cap stops counting early only when many rows match: a filter that matches few rows still scans for them, so index the filtered column. Pages past the cap are out of range. To decide per request, override the private `pagination_count` method in the controller.
1373
+
1361
1374
  ## URL Parameters
1362
1375
 
1363
1376
  ```
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.1
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.70.0] - 2026-10-26
6
+
7
+ ### Bug Fixes
8
+
9
+ - Color meta badges from the field's declared colors
10
+
11
+ ### Features
12
+
13
+ - Pin links above the icon rail's footer with footer_menu
14
+ - Show a menu item's trailing badge in the icon rail
15
+ - Cap or skip the index COUNT with pagination count: ([#188](https://github.com/radioactive-labs/plutonium-core/issues/188))
16
+
17
+ ### Miscellaneous Tasks
18
+
19
+ - Move to Ruby 4.0.9 and test on 3.4 and 4.0 ([#187](https://github.com/radioactive-labs/plutonium-core/issues/187))
20
+ - Compress docs images and shrink the logo ([#189](https://github.com/radioactive-labs/plutonium-core/issues/189))
21
+
5
22
  ## [0.69.0] - 2026-10-15
6
23
 
7
24
  ### Bug Fixes
data/CLAUDE.md CHANGED
@@ -323,6 +323,17 @@ mode, icon rail collapsed (`localStorage.theme = 'light'`,
323
323
  generated titles read as broken data). Crop dead space with `magick`. Store under
324
324
  `docs/public/images/<section>/`.
325
325
 
326
+ Compress every PNG before committing: `docs/` ships inside the gem, so each
327
+ screenshot is in every install.
328
+
329
+ ```bash
330
+ pngquant --quality=80-95 --speed 1 --strip --skip-if-larger --ext .png --force <file>.png
331
+ ```
332
+
333
+ Reuse an existing image rather than copying it into a second folder. Full-size
334
+ brand sources live in `brand/` (excluded from the gem); `app/assets/plutonium.png`
335
+ is the 512px compressed copy.
336
+
326
337
  ## Settled Decisions (do not re-litigate)
327
338
 
328
339
  - **SQLite for the dummy app** across all environments; production is multi-db
data/SECURITY.md CHANGED
@@ -12,7 +12,7 @@ please upgrade before reporting an issue to confirm it still reproduces.
12
12
 
13
13
  | Version | Supported |
14
14
  | ------- | ------------------ |
15
- | Latest release (`0.69.x`) | :white_check_mark: |
15
+ | Latest release (`0.70.x`) | :white_check_mark: |
16
16
  | Older releases | :x: |
17
17
 
18
18
  ## Reporting a Vulnerability