ydb-embedded-ui icon indicating copy to clipboard operation
ydb-embedded-ui copied to clipboard

πŸ‘‘ [query editor] add query settings dialog

Open antonkovalenko opened this issue 1 year ago β€’ 8 comments

As a developer of applications over YDB I want to debug queries in embedded ui. When developing queries in embedded ui I want to be able to set for queries:

  • timeout
  • transaction isolation level
  • statistics collection mode (full, profile, etc). Besides I want to specify a query service and method that I would like to use for query execution. Important – Let's remove query service and method selector from the form to the dialog

To achive this let's add a settings control to run button it opens a dialog that allows to change settings. settings are saved in a browser per database

when my settings are overriding default ones, I want to see an indication on the settings control and their values in a gray small font in the right bottom corner of the screen

Take a look at design mockups

Frame 2087325956 Frame 2087325950

antonkovalenko avatar Apr 25 '24 14:04 antonkovalenko

I think, settings icon and settings themselves should apply both for execute and explain.

I'm not sure about isolation level and stats mode, but timeout and query type are applied to both actions.

Also some explanation popups should be added (question marks near labels). Currently it's not clear, what isolation level means and what is the difference between full and profile stats modes

artemmufazalov avatar May 02 '24 07:05 artemmufazalov

  1. when I alter settings, I see the results with info banner with altered settings.
  2. I can close this banner. then altered settings are available under (?) sign. Remember that banner was closed only for a browser session
  3. when i run a query from history i want it be run with ~~query settings~~ my curent settings and not those it was run with during first time
  4. settings exist in localstorage
  5. separate ticket about stop button
  6. tooltip on cog leading to settings dialoh with current settings

antonkovalenko avatar Jul 17 '24 12:07 antonkovalenko

Subtasks for Issue #803

This issue has been broken down into the following subtasks to streamline the implementation process:

  1. ~~Create Settings Control for Run Button~~ https://github.com/ydb-platform/ydb-embedded-ui/issues/1051

    • [x] Add a settings control next to the run button.
    • [x] Ensure it opens a dialog for changing settings.
  2. ~~Design Settings Dialog UI~~ https://github.com/ydb-platform/ydb-embedded-ui/issues/1051

    • [x] Include fields for timeout, transaction isolation level, and statistics collection mode.
    • [x] Add options for selecting query service and method.
    • [x] Incorporate design mockups into the dialog.
    • [x] Feature flag for testing
  3. ~~Implement Settings Persistence~~ https://github.com/ydb-platform/ydb-embedded-ui/issues/1060

    • [x] Save settings in browser
  4. Running and Indication of Overridden Settings https://github.com/ydb-platform/ydb-embedded-ui/issues/1060

    • [x] Show an indication on the settings control when default settings are overridden.
    • [x] Show changed settings in gear tootip on hover
    • [x] Apply settings to query when it is ran or explained.
    • [x] Tracing level implementation
  5. Banner for Altered Settings https://github.com/ydb-platform/ydb-embedded-ui/issues/1060

    • [x] Display an info banner with altered settings when they are changed.
    • [x] Allow the banner to be closed, with settings accessible via a question mark icon afterward.
    • [x] Ensure the banner state (open/closed) is remembered in local storage.
    • [x] Show banner once a week if it was closed. Reset timer for new settings.
  6. Separate Ticket for Stop Button

    • [x] Create a separate ticket to address adding a stop button for query execution.
  7. Other Tasks

    • [x] Remove mode from history
    • [x] Remove old functionality, remove experiments flags, update tests

Progress

[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100%

astandrik avatar Jul 18 '24 13:07 astandrik

Subtasks for Issue #803

  • [ ] Include fields for timeout, transaction isolation level, and statistics collection mode.

I'd separate transaction isolation level dialog option to separate ticket (and tracing level, but it seems it's already separated). Currently, this option is not supported for query execution, so it's not only about adding a field in the dialog

artemmufazalov avatar Jul 18 '24 13:07 artemmufazalov

3 issues:

  1. Query settings dialog– 5 sp
  2. Settings usage in requests and Settings and results display modification – 5 sp
  3. Settings storage (in session storage and query history) -2 sp

antonkovalenko avatar Jul 22 '24 08:07 antonkovalenko

1062

antonkovalenko avatar Jul 24 '24 12:07 antonkovalenko

Task is done waiting for review of the last pr before closing

astandrik avatar Aug 01 '24 11:08 astandrik

Stand

astandrik avatar Aug 01 '24 11:08 astandrik