New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add loadingStatusErrorMessage to state #366
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
=======================================
Coverage 99.71% 99.72%
=======================================
Files 18 18
Lines 356 358 +2
Branches 111 112 +1
=======================================
+ Hits 355 357 +2
Misses 1 1
☔ View full report in Codecov by Sentry. |
src/types/enums.ts
Outdated
@@ -17,6 +17,7 @@ export enum SCRIPT_LOADING_STATE { | |||
*/ | |||
export enum DISPATCH_ACTION { | |||
LOADING_STATUS = "setLoadingStatus", | |||
CRITICAL_ERROR = "criticalError", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this name? It may be nice to name it after LOADING_STATUS so it's clearer that this error message is related to a script loading failure.
CRITICAL_ERROR = "criticalError", | |
LOADING_STATUS_ERROR_MESSAGE = "loadingStatusErrorMessage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! Renamed
src/types/scriptProviderTypes.ts
Outdated
value: { state: SCRIPT_LOADING_STATE; message: string }; | ||
} | ||
| { | ||
type: `${DISPATCH_ACTION.LOADING_STATUS_ERROR_MESSAGE}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this type
? Can we remove it?
Great work @dtjones404! 💯 |
Probably naive first attempt to expose error message in case of rejected script load