You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/10 03:30:04 UTC

[GitHub] [superset] ad-m commented on a change in pull request #18653: feat: add prop to `setDBEngine` in DatabaseModal

ad-m commented on a change in pull request #18653:
URL: https://github.com/apache/superset/pull/18653#discussion_r803269827



##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.jsx
##########
@@ -1016,4 +1016,24 @@ describe('DatabaseModal', () => {
       });
     });
   });
+  describe('DatabaseModal w/ Deeplinking Engine', () => {
+    const renderAndWait = async () => {
+      const mounted = act(async () => {
+        render(<DatabaseModal {...dbProps} setDBEngine={'PostgreSQL'} />, {

Review comment:
       ```suggestion
           render(<DatabaseModal {...dbProps} setDBEngine='PostgreSQL' />, {
   ```
   
   Fix linting

##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -428,6 +429,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
   onHide,
   show,
   databaseId,
+  setDBEngine,

Review comment:
       I wonder if this property name is optimal because it sounds a bit like an operation instead of a React-style declarative declaration. Can we delete `set` part of that name?
   

##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
##########
@@ -656,6 +658,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
         },
       });
     } else {
+      console.log(availableDbs);

Review comment:
       ```suggestion
   ```
   Avoid unnecesary logging




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org