Skip to content
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

The SQL Lab Add Query Buttons Do Not Name New Queries Properly #18949

Closed
3 tasks done
cccs-Dustin opened this issue Feb 25, 2022 · 3 comments
Closed
3 tasks done

The SQL Lab Add Query Buttons Do Not Name New Queries Properly #18949

cccs-Dustin opened this issue Feb 25, 2022 · 3 comments
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

Comments

@cccs-Dustin
Copy link
Contributor

cccs-Dustin commented Feb 25, 2022

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

plus button

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

SQL query button
After SQL query button

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

  1. Go to the SQL Editor page by selecting it from the main menu under the "SQL Lab" drop down.
  2. You can immediately notice one of the bugs that occurs, the first untitled query will always be called "Untitled Query 2", never "Untitled Query 1".
  3. Click on the "+" button next to the list of query tabs, it should properly increment the query tab names.
  4. Select the “+“ icon on the top right of the web page beside the settings drop down, and then click "SQL query"
  5. You will notice that the name of the newly created query is "Untitled Query 2". No matter how many times you complete step 4, it will never increment the new query tab names.

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

  • operating system name and version: Ubuntu 20.04
  • browser type and version: Google Chrome (Version 97.0.4692.71)
  • superset version: Superset 1.4
  • python version: Python 3.8.12
  • node.js version: Node v14.16.1
  • any feature flags active: N/A

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

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

@cccs-Dustin cccs-Dustin added the #bug Bug report label Feb 25, 2022
@cccs-Dustin
Copy link
Contributor Author

Hi @geido! Would you be able to take a look at this issue and provide feedback if any?

@zhaoyongjie zhaoyongjie added 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 labels Mar 2, 2022
@zhaoyongjie
Copy link
Member

Hi @cccs-Dustin, thanks for pointing this, validated on latest master.

@cccs-Dustin
Copy link
Contributor Author

cccs-Dustin commented Mar 11, 2022

Closing this issue as the PR which was made to fix this bug (#18951) has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants