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

Session Flow #2439

Merged
merged 47 commits into from
Aug 1, 2022
Merged

Session Flow #2439

merged 47 commits into from
Aug 1, 2022

Conversation

jameskerr
Copy link
Member

@jameskerr jameskerr commented Jul 14, 2022

Main Feature

This is the first implementation of the Session centered query experience. There is no ticket specifically for this.

Bug Fixes
Fixes #2383

Renamed Versions to History

Fixes: #2434

The problem for #2434 was we were calling the "loadRoute" function every time a tab was activated. In the loadRoute function, we sync the editor state with the url. However, we should only do this the first time a new url is opened in a tab, not every time the tab is activated.

The solution is to keep a "lastLocationKey" property on the tab. Then when a tab is activated, it checks to see if the lastLocationKey is the same as the current location key. If it is, do nothing. Otherwise, load the route.

@jameskerr jameskerr requested a review from mason-fish July 14, 2022 22:38
@jameskerr
Copy link
Member Author

jameskerr commented Jul 21, 2022

James' To Do List:

  • Re-style the "select query" text
  • Re-style the "Naming query state"
  • Make buttons for detach, and update
  • Decide what the tab title for a sessions should be
  • Anchor the "Select query..." menu to the left of the input (or in the center of the page).
  • Shorten the time labels in the history.
  • Style the "outdated" query
  • Prevent the back button from leaving the session
  • If the time is under a minute, say "just now"
  • Change the "+" button to say new query session
  • If you run the same exact query twice, don't append a new version or save to history
  • Don't show versions for the session query
  • Put the old query title menu back in

Place we navigate to a query in the app:

  • Sidebar clicking a query
  • Clicking a pool
  • Clicking "Query Pool" from the pool page
  • Clicking a session history item
  • Saving a query
  • Updating a query
  • Detaching a query
  • Selecting a query from the dropdown
  • Clicking a query version
  • Query context menu

More?

@mason-fish
Copy link
Contributor

mason-fish commented Jul 22, 2022

Mason's To Do List:

  • Decide on behavior of a session for query deletion (both tab history and session history will be affected). Implement solution.
  • Default right pane to use the history section.
  • Refactor history section's logic for transforming session history to the props for each history entry component. It works now but should at least be moved to it's own thunk.
  • Handle cleanup of SessionHistory and session versions when tab is removed.
  • Migration to remove DraftQueries.
  • Wire up the "Query Pool" button to use the new session system.
  • "Query Pool" button (from pool info page) does not pre-populate query with from pin
  • Bug: versions are being created with an invalid (maybe non-existent) timestamp. Looks like at least one place this is coming from is the above "Query Pool" button's handler.
  • Scroll for History doesn't work

@jameskerr
Copy link
Member Author

jameskerr commented Jul 28, 2022

Feedback from demo:

  • Name the session
  • Renaming an modified query creates a new query with that name, instead of renaming the old one
  • Clicking the title should bring up the form, the form always makes a new query
  • Change the Save to + "Create"
  • Give a name to a session
  • Put a sessions area in the sidebar
  • Change Create to Save
  • Move select query dropdown
  • Add an x next to the title that "clears" the query "detaches"
  • Delete a history item, delete a version item

@jameskerr
Copy link
Member Author

The unfinished first-class sessions behavior is documented here: #2467

@jameskerr jameskerr merged commit 142995d into main Aug 1, 2022
@jameskerr jameskerr deleted the session-flow branch August 1, 2022 20:38
Comment on lines +21 to +22
const Body = styled.div`
flex: 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment so I can link to it from #2513.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching tabs causes a partially-written query to disappear Rename "Versions" to "History"
3 participants