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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]