vanshaj2023 commented on issue #3327:
URL:
https://github.com/apache/apisix-dashboard/issues/3327#issuecomment-4058095201
Hi @Baoyuantop ,
I found this while exploring the codebase for GSoC contributions.
The issue is that `isLoading={!schema}` in `PluginEditorDrawer.tsx` cannot
distinguish between "schema is loading" and "schema fetch failed" since both
result in `schema` being `undefined`.
My proposed approach would be to introduce an explicit error state tracking
whether the fetch failed separately from the loading state, then rendering
an
error message with a retry button instead of the skeleton when a failure
occurs.
Before I start, a few questions:
- Should the error state be handled inside `PluginEditorDrawer` itself, or
higher
up where the schema is fetched and passed as a prop?
- Is there a preferred error/retry UI pattern already used elsewhere in the
codebase I should follow?
- Should the retry re-fetch the schema, or just close and reopen the drawer?
Could you assign this issue to me?
Happy to submit a PR once aligned on the approach.
--
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]