superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jasnovak commented on a change in pull request #4900: Hide restricted ui elements, remove <br> from error message
Date Thu, 03 May 2018 18:21:25 GMT
jasnovak commented on a change in pull request #4900: Hide restricted ui elements, remove <br>
from error message
URL: https://github.com/apache/incubator-superset/pull/4900#discussion_r185894185
 
 

 ##########
 File path: superset/assets/src/dashboard/components/SliceHeader.jsx
 ##########
 @@ -1,13 +1,16 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import moment from 'moment';
+import { connect } from 'react-redux';
 
 import { t } from '../../locales';
 import EditableTitle from '../../components/EditableTitle';
 import TooltipWrapper from '../../components/TooltipWrapper';
 
 const propTypes = {
   slice: PropTypes.object.isRequired,
+  superset_can_explore: PropTypes.bool,
 
 Review comment:
   Yes, I generally follow that convention as well. But the code is not consistent in that.
In this code, props for permissions are usually written in snake_case on the js side. So I
used snake_case as well to match the current style:
   
   Here's a few examples:
   in ExploreChartHeader.jsx:
   const propTypes = {
     actions: PropTypes.object.isRequired,
     addHistory: PropTypes.func,
     can_overwrite: PropTypes.bool.isRequired,
     can_download: PropTypes.bool.isRequired,
   
   or in ExploreViewContainer:
       can_overwrite: !!explore.can_overwrite,
       can_download: !!explore.can_download,
       column_formats: explore.datasource ? explore.datasource.column_formats : null,
   
   I can do either way of course, if you'd rather I copy the current style, or use camel case.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message