geido commented on code in PR #21189:
URL: https://github.com/apache/superset/pull/21189#discussion_r954900941


##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx:
##########
@@ -17,17 +17,28 @@
  * under the License.
  */
 import React from 'react';
-import { render, screen } from 'spec/helpers/testing-library';
+import { render, screen, act } from 'spec/helpers/testing-library';
 import AddDataset from 'src/views/CRUD/data/dataset/AddDataset';
 
 describe('AddDataset', () => {
-  it('renders a blank state AddDataset', () => {
-    render(<AddDataset />);
+  const renderAndWait = async () => {

Review Comment:
   If the purpose here to wait until the component has finished loading, you 
can use something like this
   
   ```
   const waitForRender = (overrides: Record<string, any> = {}) =>
     waitFor(() => render(<AddDataset />);
   
   await waitForRender();
   ```



##########
superset-frontend/src/components/PageHeaderWithActions/index.tsx:
##########
@@ -152,6 +158,8 @@ export const PageHeaderWithActions = ({
               css={menuTriggerStyles}
               buttonStyle="tertiary"
               aria-label={t('Menu actions trigger')}
+              tooltip={tooltipProps?.text ?? undefined}
+              placement={tooltipProps?.placement ?? undefined}

Review Comment:
   ```suggestion
                 tooltip={tooltipProps?.text}
                 placement={tooltipProps?.placement}
   ```



##########
superset-frontend/src/components/PageHeaderWithActions/index.tsx:
##########
@@ -19,6 +19,7 @@
 import React, { ReactNode, ReactElement } from 'react';
 import { css, SupersetTheme, t, useTheme } from '@superset-ui/core';
 import { AntdDropdown, AntdDropdownProps } from 'src/components';
+import { TooltipPlacement } from 'antd/es/tooltip';

Review Comment:
   Would you mind exporting this from the Tooltip component in our components 
library and then importing it here? I think we should centralize all the 
components related things and avoid accessing antd directly



##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx:
##########
@@ -17,7 +17,85 @@
  * under the License.
  */
 import React from 'react';
+import { t, styled, css, SupersetTheme } from '@superset-ui/core';
+import { PageHeaderWithActions } from 'src/components/PageHeaderWithActions';
+import Button from 'src/components/Button';
+import Icons from 'src/components/Icons';
+import { Menu } from 'src/components/Menu';
+import { TooltipPlacement } from 'antd/es/tooltip';
+
+const editableTitleProps = {
+  title: '',
+  placeholder: 'Add the name of the dataset',

Review Comment:
   I think all the text in this file needs to be localized



-- 
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]

Reply via email to