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/04/12 00:16:03 UTC

[GitHub] [superset] betodealmeida commented on a diff in pull request #19598: feat: add empty states to sqlab editor and select

betodealmeida commented on code in PR #19598:
URL: https://github.com/apache/superset/pull/19598#discussion_r847835044


##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx:
##########
@@ -142,6 +144,22 @@ export default function SqlEditorLeftBar({
   const shouldShowReset = window.location.search === '?reset=1';
   const tableMetaDataHeight = height - 130; // 130 is the height of the selects above
 
+  const emptyStateComponent = (
+    <EmptyStateSmall
+      image="empty.svg"
+      title={
+        noDbFoundTitle
+          ? 'No databases match your search'
+          : 'There are no databases available'
+      }
+      description={
+        <p>
+          Manage your database <a href="/databaseview/list">here</a>

Review Comment:
   These should be translatable with `t()`.



##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx:
##########
@@ -92,6 +93,7 @@ export default function SqlEditorLeftBar({
   // Ref needed to avoid infinite rerenders on handlers
   // that require and modify the queryEditor
   const queryEditorRef = useRef<QueryEditor>(queryEditor);
+  const [noDbFoundTitle, setTitleForNoDBFound] = useState(false);

Review Comment:
   Yeah, the name `noDbFoundTitle` makes me thing this is a string, not a boolean.



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