nytai commented on a change in pull request #8845: [dashboard] New, list view 
(react)
URL: 
https://github.com/apache/incubator-superset/pull/8845#discussion_r367023664
 
 

 ##########
 File path: superset/assets/src/views/dashboardList/DashboardList.tsx
 ##########
 @@ -0,0 +1,294 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { SupersetClient } from '@superset-ui/connection';
+import { t } from '@superset-ui/translation';
+import moment from 'moment';
+import PropTypes from 'prop-types';
+import React from 'react';
+// @ts-ignore
+import { Button, Modal, Panel } from 'react-bootstrap';
+import ListView from 'src/components/ListView/ListView';
+import { FilterTypeMap } from 'src/components/ListView/types';
+import { FetchDataConfig } from 'src/components/ListView/types';
+import withToasts from 'src/messageToasts/enhancers/withToasts';
+
+import './DashboardList.less';
+
+const PAGE_SIZE = 25;
+
+interface Props {
 
 Review comment:
   We could use both. PropTypes are checked at runtime by react in development 
and log to the console. Interface/types are checked by the typescript 
compiler/vscode and produce errors at build time and are highlighted in the 
editor. I'd say typescript is favorable once the entire repo converts to 
typescript as the types will be available in the editor (on hover, cmd click, 
etc). For now I'm happy to also add PropTypes until we transition more to 
typescript. 
   
   FWIW: The react dev team recommends flow/typescript over PropTypes for 
larger projects: https://reactjs.org/docs/static-type-checking.html

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to