mikebridge opened a new pull request, #45524:
URL: https://github.com/apache/superset/pull/45524

   ### SUMMARY
   
   The Add Semantic View modal now shows which views could not be created and 
why, without losing track of views that were created successfully.
   
   **What users saw:** an all-failed request showed only a generic toast. A 
partially successful request listed failed names but omitted the server's 
validation messages.
   
   **Why:** the API returns per-view errors in both its 201 partial-success and 
422 all-failed responses. The modal did not read the rejected 422 body or 
display the per-view details.
   
   **What this changes:**
   - Display each failed view's name and validation message inline, including 
field-error mappings, as escaped text.
   - Keep the modal open for failures. Mark confirmed successes as already 
added, refresh the underlying list, and exclude those successes from the next 
retry.
   - Keep all-success behavior unchanged: report success and close.
   - Use a generic fallback for malformed responses and transport failures; do 
not display raw transport exception messages.
   - Ignore save responses belonging to a closed modal.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: failure toast without the validation details; successful items could 
remain selected after a partial result.
   
   After: inline per-view errors and a retry selection containing only views 
that were not confirmed created.
   
   No screenshots captured: application services were not started. Rendered 
feedback and retry behavior are covered by RTL tests.
   
   ### TESTING INSTRUCTIONS
   
   With `SEMANTIC_LAYERS` enabled:
   1. Open Add Semantic View and select multiple views.
   2. Make one view fail server validation while another succeeds. Confirm the 
successful view is marked already added, the error includes the failed view 
name and message, and the modal stays open.
   3. Retry and confirm only the failed view is submitted.
   4. Exercise an all-failed request, then an all-success request. Confirm 
errors remain visible for the former and the modal closes for the latter.
   
   Automated: the touched AddSemanticViewModal Jest/RTL suite covers all-failed 
422, mixed 201, all-success, malformed responses, transport failures, text 
escaping, retry exclusion and a late response after close/reopen. Changed-file 
hooks include targeted TypeScript checking.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `SEMANTIC_LAYERS`
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to