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

feat(SqlLab): Change Save Dataset Button to Split Save Query Button II #20570

Conversation

lyndsiWilliams
Copy link
Member

SUMMARY

This changes the current save query button into a split save button if the database has "Allow this database to be explored" enabled. When the user clicks the caret section of the button, they can now save the query as a dataset.

Bonus: In order to create this button, I conveniently needed to fix the styling on the "Run" query split button. The split line now goes all the way through the button and the caret is centered.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:

saveButtonBefore
runButtonBefore

AFTER:

splitSaveButtonAfter
saveButtonAfter
runButtonAfter

TESTING INSTRUCTIONS

  • From SqlLab, open a query for a database that has "Allow this database to be explored" enabled.
    • Observe the new split save button
      • Click the "Save" section of the button to see the save query modal
      • Click the caret v section of the button, then click "Save dataset" to see the save dataset modal
      • Both of these modals should be fully functional
  • From SqlLab, open a query for a database that does NOT have "Allow this database to be explored" enabled.
    • Observe that the save button is a normal button, not split
      • Clicking this button should show the save query modal

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

hughhhh and others added 30 commits June 6, 2022 15:09
> columns are loading into page
…ype is Query [41493]

Initial commit to add ability for the a Query Preview Modal to be available when the data source type is Query and not Dataset
Converted ModalTrigger to a functional TypeScript component
> allow for all records to be displayed
> fix select with all columns queries
> filters are now working
…view-modal-for-chart-source-query

feat: Ericbriscoe/sc 41493/query preview modal for chart source query
…set, adds default metric when chart source is query
… datasource

A follow on separate effort will enable having a default Count metric when Query is the datasource type
@lyndsiWilliams lyndsiWilliams force-pushed the lyndsi/sql-lab-new-explore-button-functionality-and-move-save-dataset-to-split-save-button branch from 21455d5 to cd89138 Compare July 11, 2022 16:01
@lyndsiWilliams
Copy link
Member Author

Continued in this PR: #20852

@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@lyndsiWilliams lyndsiWilliams deleted the lyndsi/sql-lab-new-explore-button-functionality-and-move-save-dataset-to-split-save-button branch July 28, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants