plutonium 0.56.2 → 0.57.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7932a8a7af49201798eaf8727c03857ab7b7b3490a7ce049acd89cf8efeeda38
4
- data.tar.gz: 4a268a9cd14ae441ca664c249a3b602f2509aa63f38b9e76a4fd06b0d56fc3a3
3
+ metadata.gz: 8780fef2990ef53370f7883f0b5d5ed262744ca639b26710a8e8a002765f4df0
4
+ data.tar.gz: 695ed4654c732d10aa14af00ad9c345627a1ffb624de90d5fd475ca3f78daa77
5
5
  SHA512:
6
- metadata.gz: eea920321f823c316c2ba4aa226e56e614fc0fc39790ee6ac9dd1893fc2a028d4165782823aab2bb8b4285bdbe868fbb43c68553df2eff74784ce04a6de98bff
7
- data.tar.gz: 713961bf18c70042aa361e948a72caa918d67e0636f2b632715809f7e48c1d4aa41efe77e4517469d0e6ab8c13270965b9558a59d27e98264149646c5b757ea0
6
+ metadata.gz: b112625485b6e1ff480c28af736227df6243d8fb890036254e5b2c4e7b9ad2e3825083ed69771c2cd1c199292dcc5c9d112821951c22324ffceeae5889839bbe
7
+ data.tar.gz: 9970143c56fdc7270294413094bb9cb48495db02302272dd69e56b57dbb0a37bb91311b5634da60052b6cca6542044567b9fb698f23fa42b228c8146e9d3bc80
@@ -978,6 +978,20 @@ scope(:mine) { |s| s.where(author: current_user) }
978
978
  default_scope :published # applied on initial load; "All" button clears it
979
979
  ```
980
980
 
981
+ ### Conditional scopes (`condition:`)
982
+
983
+ Like `condition:` on actions and fields — define a scope but only **render its button** when a proc is truthy. The scope itself (and its URL) stays live; `condition:` only controls UI visibility.
984
+
985
+ ```ruby
986
+ scope :admin_only, condition: -> { current_user.admin? }
987
+ scope :beta_feature, condition: -> { params[:beta] == "1" }
988
+ scope :never_shown, condition: -> { false } # hides button but URL still works
989
+ ```
990
+
991
+ The proc is evaluated against the view context — `current_user`, `params`, `request`, `allowed_to?` are all available directly. There is no `object`/`record` (scopes have no single-record context).
992
+
993
+ 🚨 **`condition:` is NOT authorization.** A hidden scope button still has a live URL. Use `condition:` for UI relevance ("show admins only this tab"). Use the policy's `relation_scope` for "who can see these records at all".
994
+
981
995
  ## Sorting
982
996
 
983
997
  ```ruby
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [0.57.0] - 2026-06-09
2
+
3
+ ### 🚀 Features
4
+
5
+ - *(scopes)* Add display-only condition: to scopes
6
+
7
+ ### 🐛 Bug Fixes
8
+
9
+ - *(generators/assets)* Guard tailwind prerequisite and fix landing page command
10
+ - *(entity_scoping)* Guard against nil current_scoped_entity in remember_scoped_entity
11
+ - *(ui/slideover)* Use dynamic viewport height to prevent clipping on mobile
12
+
13
+ ### ⚙️ Miscellaneous Tasks
14
+
15
+ - *(templates)* Add skill sync to plutonium template and use conventional commits
16
+ ## [0.56.3] - 2026-06-07
17
+
18
+ ### 🐛 Bug Fixes
19
+
20
+ - *(ui/sidebar)* Use dynamic viewport height so mobile rail toggle stays visible
21
+ - *(ui/sidebar)* Link icon rail logo to home
22
+ - *(ui/sidebar)* Default icon rail to pinned
23
+ - *(ui/table)* Let scopes bar scroll horizontally on small screens
1
24
  ## [0.56.2] - 2026-06-05
2
25
 
3
26
  ### 🐛 Bug Fixes