Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 23, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

chaimann and others added 14 commits July 23, 2025 19:22
Since we now have a dedicated UI component for Alerts, we should be able
to distinguish which flash type goes where (toast or alert). This helper
adds two methods: #toasts will collect any flash key other than
`:alert`, ideally we use "notice" and "error" but it's not forced;
#alerts will return everything in `flash[:alert]`;
`:alert` flash key should be used to construct flashes that are
displayed by Alert component.
`flash[:notice]` is what is commonly used in other controllers to
display a regular success/notice toast, so to be consistent let's use
it everywhere. `:success` would also work, but to avoid confusion with
Alerts of "success" type (see "ui/alert" component) it's better to use
correct naming everywhere.
This should allow to target them with turbo stream responses when needed
Passing strings as messages to `flash[]` is more common than using other
primitives, and users deciding to set flash[:alert] might not be aware
of the Hash structure that is required to correctly construct and
display a UI alert from flash[:alert]. So instead of letting it fail
because of the type mismatch (when calling #slice on a string instead
of a hash), we can add a fallback option to treat given string as a body
of the alert message and construct a `danger` type alert with default
title.
We should not delete adjustment reasons if there are adjustments created
with them.
This migration will fail if there are any adjustments with invalid
adjustment reason IDs. The suggested path of action for store owners is
to change those adjustment reason IDs to NULL, because we don't want to
accidentally lose adjustments.
[Admin] Flashes helper and reorganization
Restrict deletion of adjustment reasons if adjustments present
fix admin component generator namespace
@pull pull bot locked and limited conversation to collaborators Jul 23, 2025
@pull pull bot added the ⤵️ pull label Jul 23, 2025
@pull pull bot merged commit 48de765 into nebulab:main Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants