solidusio / solidusio/solidus

Surface object-level validation errors in the admin

Open
#6,629 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

changelog:solidus_admin
Dominant language
Ruby
Stars
5.3k
Forks
1.4k
Avg merge
1d 22h
Merged PRs (30d)
62

Description

Desired Behavior

Present errors on the :base of an object to admin users. Errors should be presented whenever objects are being created or updated and they fail due to object-level validation errors.

(Optional) Current Behavior

Currently, no error is presented to the user. A 422 turbo request occurs in the background, but it does not surface what went wrong.

(Optional) Additional notes

  • We could categorize this as a bug, but I think the kind of work that needs to be done is more feature-like.
  • Ideally, every @resource record with object-level validation errors on it can be treated the same way. But we should implement it in such a way that developers can redefine functionality per resource. (Just look at how the existing ResourcesController and resource base components work.)
  • I think that we should use the existing flash[:alert] functionality that solidus_admin provides to surface these errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing ResourcesController and resource base components to trace how create and update failures are handled, including the existing flash[:alert] functionality. Verify the 422 Turbo request path for object-level :base validation errors. Done means admin users see those errors for every resource while resource-specific redefinition remains possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.