michael-s-molina commented on code in PR #20369:
URL: https://github.com/apache/superset/pull/20369#discussion_r900400808
##########
superset-frontend/src/addSlice/AddSliceContainer.tsx:
##########
@@ -297,29 +313,38 @@ export default class AddSliceContainer extends
React.PureComponent<
value={this.state.datasource}
/>
<span>
- {t(
- 'Instructions to add a dataset are available in the
Superset tutorial.',
- )}{' '}
+ <a
+ href="/tablemodelview/list/#create"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ {t('Add a dataset')}
+ </a>
+ {t(' or ')}
<a
href="https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard/#registering-a-new-table"
rel="noopener noreferrer"
target="_blank"
>
+ {t('view instructions ')}
Review Comment:
Same here
##########
superset-frontend/src/addSlice/AddSliceContainer.tsx:
##########
@@ -297,29 +313,38 @@ export default class AddSliceContainer extends
React.PureComponent<
value={this.state.datasource}
/>
<span>
- {t(
- 'Instructions to add a dataset are available in the
Superset tutorial.',
- )}{' '}
+ <a
Review Comment:
Shouldn't this option only appear if the user has permission to add a
dataset?
##########
superset-frontend/src/addSlice/AddSliceContainer.tsx:
##########
@@ -297,29 +313,38 @@ export default class AddSliceContainer extends
React.PureComponent<
value={this.state.datasource}
/>
<span>
- {t(
- 'Instructions to add a dataset are available in the
Superset tutorial.',
- )}{' '}
+ <a
+ href="/tablemodelview/list/#create"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ {t('Add a dataset')}
+ </a>
+ {t(' or ')}
Review Comment:
Spaces shouldn't be part of the translated string 😉
##########
superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx:
##########
@@ -626,6 +628,15 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
);
};
+ const location = useLocation();
+ const history = useHistory();
+ useEffect(() => {
Review Comment:
If we are adding the `#create` as a valid URI fragment then I don't think we
should automatically remove it. That way if the user refreshes the page, the
modal will stay open. We should remove the hash if the user closes the modal.
To be consistent, we should also update the hash when the user clicks on `Add
dataset` from the list.
--
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]