michellethomas commented on a change in pull request #4663: [Request For 
Comments][Explore] Streamlined metric definitions for SQLA and Druid
URL: 
https://github.com/apache/incubator-superset/pull/4663#discussion_r176613921
 
 

 ##########
 File path: superset/assets/javascripts/explore/propTypes/savedMetricType.js
 ##########
 @@ -0,0 +1,6 @@
+import PropTypes from 'prop-types';
+
+export default PropTypes.shape({
+  metric_name: PropTypes.string.isRequired,
+  expression: PropTypes.string.isRequired,
+});
 
 Review comment:
   Just curious, why have this in a separate file instead of defined as a shape 
in the file it's used? This isn't being used in multiple places and it doesn't 
have a complicated structure (with imports). Is it a best practice?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to