Commit 7c59e13
committed
Fix: show success toast when saving column preferences
When saving column defaults, the flash was rendered inside the
turbo_stream.replace of the form element, placing it inside the
dropdown with incorrect styling instead of the top-level #flashes
container.
Fix: separate the flash into its own turbo_stream.append targeting
#flashes, matching the pattern used by destroy_product_variant and
clone turbo stream views.
Also tightened the spec to assert the flash appears in #flashes
with .flash.success class, not just that the text is present.
Fixes openfoodfoundation#139661 parent 939ae20 commit 7c59e13
2 files changed
Lines changed: 6 additions & 3 deletions
File tree
- app/views/admin/column_preferences
- spec/system/admin/products_v3
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
0 commit comments