Skip to content

Render turbo error flash for failed project custom field section actions#22583

Open
MASTERMINDftw wants to merge 5 commits intoopf:devfrom
MASTERMINDftw:fix/turbo-error
Open

Render turbo error flash for failed project custom field section actions#22583
MASTERMINDftw wants to merge 5 commits intoopf:devfrom
MASTERMINDftw:fix/turbo-error

Conversation

@MASTERMINDftw
Copy link
Copy Markdown

Ticket

No ticket linked.

What are you trying to accomplish?

This PR adds turbo-stream error feedback for failed admin project custom field section actions.

Previously, failed destroy, move, and drop actions in Admin::Settings::ProjectCustomFieldSectionsController did not show a user-visible error in the UI.

Screenshots

No screenshots attached. This change affects turbo-stream flash behavior for failure cases.

What approach did you choose and why?

I followed the existing turbo-stream error handling pattern already used in neighboring admin controllers.

Instead of leaving the failure branches empty, the controller now renders an error flash via render_error_flash_message_via_turbo_stream(...) using joined service error messages. I also added focused controller specs for the failure paths.

This keeps the change small, consistent with the surrounding code, and improves admin feedback without changing the successful flow.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant