rusackas commented on code in PR #41101:
URL: https://github.com/apache/superset/pull/41101#discussion_r3523796851
##########
superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx:
##########
@@ -106,10 +108,12 @@ export function OAuth2RedirectMessage({
}
if (source === 'sqllab' && query) {
dispatch(reRunQuery(query));
- } else if (source === 'explore' && chartId) {
- dispatch(triggerQuery(true, chartId));
+ } else if (source === 'explore') {
+ dispatch(triggerQuery(true, chartId ?? UNSAVED_CHART_ID));
Review Comment:
This is in now... the selector uses the same fallback chain as `getChartKey`
(`slice_id`, then `form_data.slice_id`, then `UNSAVED_CHART_ID`).
##########
superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.tsx:
##########
@@ -106,10 +108,12 @@ export function OAuth2RedirectMessage({
}
if (source === 'sqllab' && query) {
dispatch(reRunQuery(query));
- } else if (source === 'explore' && chartId) {
- dispatch(triggerQuery(true, chartId));
+ } else if (source === 'explore') {
+ dispatch(triggerQuery(true, chartId ?? UNSAVED_CHART_ID));
} else if (source === 'dashboard') {
dispatch(onRefresh(chartList.map(Number), true, 0, dashboardId));
+ } else if (source === 'crud') {
+ dispatch(api.util.invalidateTags([{ type: 'Schemas', id: 'LIST' }]));
Review Comment:
Done in the current diff... the crud branch invalidates `Catalogs` and
`Tables` alongside `Schemas`, so all three refetch after the dance completes.
##########
superset-frontend/src/components/ErrorMessage/OAuth2RedirectMessage.test.tsx:
##########
@@ -101,8 +133,8 @@ const defaultProps = {
source: 'sqllab' as ErrorSource,
};
-const setup = (overrides = {}) => (
- <Provider store={mockStore}>
+const setup = (overrides = {}, store: any = mockStore) => (
Review Comment:
This one's fair... we try to avoid `any` even in test helpers, and typing it
as `Store` is a one-word fix. @yousoph mind flipping that when you get a chance?
--
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]