-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sqllab): Show warning message when deprecated db is selected #29607
fix(sqllab): Show warning message when deprecated db is selected #29607
Conversation
3e38002
to
4c62d8b
Compare
const { findByText } = setup({ ...mockedProps, queryEditor }, store); | ||
expect( | ||
await findByText( | ||
'The selected database is currently deprecated and cannot be used', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'The selected database is currently deprecated and cannot be used', | |
'The database that was used to generate this query could not be found', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option perhaps "could not be reached"?
<Alert | ||
type="warning" | ||
message={t( | ||
'The selected database is currently deprecated and cannot be used', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot assume that the database was deprecated. It may be an intermittent error. I suggest a more generic message.
'The selected database is currently deprecated and cannot be used', | |
'The database that was used to generate this query could not be found', |
'The selected database is currently deprecated and cannot be used', | ||
)} | ||
description={t( | ||
'Choose one of the available databases from the panel on the left.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Choose one of the available databases from the panel on the left.', | |
'Choose one of the available databases on the left panel.', |
) (cherry picked from commit db3fa8d)
SUMMARY
When the selected database in the SQL editor is removed from the selection, the current implementation shows an empty state screen, making it appear as if all data has been lost.
This commit changes the behavior to display a deprecated state message when an SQL statement exists, clearly indicating the issue instead of showing an empty state screen.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
before--deprecated-message.mov
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION