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/06/09 10:25:34 UTC

[GitHub] [superset] zhaoyongjie commented on a diff in pull request #20317: chore(explore): Visual updates to explore datasource panel

zhaoyongjie commented on code in PR #20317:
URL: https://github.com/apache/superset/pull/20317#discussion_r893334954


##########
superset-frontend/src/explore/components/DatasourcePanel/index.tsx:
##########
@@ -327,7 +321,7 @@ export default function DataSourcePanel({
           placeholder={t('Search Metrics & Columns')}
         />
         <div className="field-selections">
-          {isValidDatasourceType && showInfoboxCheck() && (
+          {datasource.type === DatasourceType.Query && showInfoboxCheck() && (

Review Comment:
   I have added a type guard at [here](https://github.com/apache/superset/blob/354a89950c4d001da3e107f60788cea873bd6bf6/superset-frontend/packages/superset-ui-chart-controls/src/types.ts#L447). We can define more type guard to handle different type of datasources.



##########
superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx:
##########
@@ -244,9 +244,23 @@ class DatasourceControl extends React.PureComponent {
     return (
       <Styles data-test="datasource-control" className="DatasourceControl">
         <div className="data-container">
-          <Icons.DatasetPhysical className="dataset-svg" />
-          {/* Add a tooltip only for long dataset names */}
-          {!isMissingDatasource && datasource.name.length > 25 ? (
+          {datasource.type === DatasourceType.Query ? (

Review Comment:
   same before



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