The SQL Lab Add Query Buttons Do Not Name New Queries Properly #18949
Labels
#bug
Bug report
sqllab:design
Related to the SQL Lab UI/UX
validation:validated
A committer has validated / submitted the issue or it was reported by multiple users
Within the SQL Editor section of SQL Lab, when you select the “+” icon beside the current tab to create a new query, the name of the query gets increased incrementally (see the image below) [except there is consistently a duplicate name for the first two].
However, if you select the “+“ icon on the top right of the web page beside the settings drop down and select “SQL query“, the names of the new queries do not increase incrementally. They are all just named "Untitled Query 2" (see the images below).
In the image above, the query tab in the far right was created using the "SQL query" button under the “+“ icon drop down on the top right of the page. As you can see, the query name was not increased incrementally.
How to reproduce the bug
Expected results
When either the "+" button next to the query tabs or the "SQL query" button from the drop down is selected, they should both increment the name of the untitled query properly.
Actual results
When the "SQL query" button from the drop down is selected, the newly created query tabs are always named "Untitled Query 2". Also, the way the code is currently implemented, there will never be an "Untitled Query 1".
Screenshots
Please see the main summary for screenshots
Environment
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Also, since discovering this bug, I have created a fix for it on my local fork. I will create a corresponding PR that fixes this bug (and link it to this issue).
The text was updated successfully, but these errors were encountered: