Repository navigation
UX: Prevent loading skeleton during ticket reply and preserve the current ticket state during re-fetching #181
AhmedAmgadElsharkawy
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
@AhmedAmgadElsharkawy I think this sounds like a good direction for the application. Please, type up a draft pull request for this. Thanks ! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
While testing the ticket reply flow, I noticed a UX friction point on the ticket details screen: submitting a reply causes the entire view to disappear and flash a full loading skeleton before displaying the updated ticket.
Looking through the client code (SupportTicketDetailPage.tsx especially), I found this:
POSTrequest. The backend returns a302 Foundredirect rather than a201 Createdwith the updated ticket entity in the response body (matching traditional form submission conventions).refreshNoncestate, which issues subsequentGETrequests to retrieve the updated ticket details usingUseJsonhook.nulland sets loading totrue. The component temporarily replaces the entire view with the loading skeleton until theGETrequests resolve which make us lose the old state and causes a bad UX, especially if the fetching failed for any reason.Proposed Improvement
We can make this much smoother on the frontend without blowing away the active view:
nullor triggering the full-page loading skeleton.I would like to check my understanding of the current flow and get your thoughts on this proposed improvement. If this direction is accepted, I would be happy to take this on and submit a PR to implement the frontend fix.
Also, long-term, is there any plan to have the backend endpoints return JSON representations directly rather than redirect responses to match the SPA philosophy, or should we continue designing the client to seamlessly bridge the current pattern?
All reactions