geido commented on code in PR #33443:
URL: https://github.com/apache/superset/pull/33443#discussion_r2097384644
##########
superset-frontend/src/SqlLab/components/SqlEditor/index.tsx:
##########
@@ -888,6 +891,68 @@ const SqlEditor: FC<Props> = ({
dispatch(queryEditorSetCursorPosition(queryEditor, newPosition));
};
+ const copyQuery = (callback: (text: string) => void) => {
+ callback(currentSQL.current);
+ };
+ const renderCopyQueryButton = () => (
+ <Button type="primary">{t('COPY QUERY')}</Button>
+ );
+
+ const renderDatasetWarning = () => (
+ <Alert
+ css={css`
+ margin-bottom: 8px;
+ padding-top: 16px;
+ `}
+ type="info"
+ description={
+ <div
+ css={css`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ `}
+ >
+ <div
+ css={css`
+ display: flex;
+ flex-direction: column;
+ `}
+ >
+ <p
+ css={css`
+ font-size: 14px;
Review Comment:
We can use standard font-sizes from the theme. The same applies to font
weights.
##########
superset-frontend/src/components/Datasource/DatasourceEditor.jsx:
##########
@@ -1112,20 +1139,26 @@ class DatasourceEditor extends PureComponent {
}
additionalControl={
<div
- css={css`
- position: absolute;
- right: 0;
- top: 0;
- z-index: 2;
- `}
+ css={{
+ position: 'absolute',
+ right: 0,
+ top: 0,
+ zIndex: 2,
+ }}
>
+ <Button css={floatingButtonCss} size="small">
+ <Icons.ExportOutlined
+ iconSize="s"
+ css={theme => ({
Review Comment:
We should use the `iconColor` prop
##########
superset-frontend/src/components/Datasource/DatasourceEditor.jsx:
##########
@@ -723,6 +724,26 @@ class DatasourceEditor extends PureComponent {
});
}
+ getsqllabRouteProps() {
Review Comment:
Nit: getSQLLabRouteProps
##########
superset-frontend/src/SqlLab/components/SqlEditor/index.tsx:
##########
@@ -888,6 +891,68 @@ const SqlEditor: FC<Props> = ({
dispatch(queryEditorSetCursorPosition(queryEditor, newPosition));
};
+ const copyQuery = (callback: (text: string) => void) => {
+ callback(currentSQL.current);
+ };
+ const renderCopyQueryButton = () => (
+ <Button type="primary">{t('COPY QUERY')}</Button>
+ );
+
+ const renderDatasetWarning = () => (
+ <Alert
+ css={css`
+ margin-bottom: 8px;
Review Comment:
Can we use `gridUnit` from the theme for margins / paddings?
--
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]