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

Zui with No Tabs Open #2797

Merged
merged 40 commits into from
Jul 17, 2023
Merged

Zui with No Tabs Open #2797

merged 40 commits into from
Jul 17, 2023

Conversation

jameskerr
Copy link
Member

@jameskerr jameskerr commented Jul 7, 2023

In order to achieve this, we had to make these changes.

  1. Remove the lake from the URL

The "url" for each tab was previously prefixed with /lake/:id. This had to be removed, and a migration created to migrate all the urls saved in the state. The routes have been updated to reflect this as well.

  1. Store the current lake id in the state for each window.

A window will only be able to connect to one lake at a time. This is like how slack and vscode have designed their apps. Their "workspaces" are the equivalent of our "lakes". You can have multiple windows connected to different lakes though. Wrote migration to set the lake id to whatever the lake id in the last opened tab.

  1. Remove the constraint of having 1 tab always open.

  2. Create a view for when there are no tabs open. Right now it's just the big zed logo background image.

  3. Assign the tabs to a lake. When switching lakes, the tabs for the previous lake will be saved and hidden. When switching back, they will be restored.

Extras:

  • I made the width and presence of the detail pane the same for every tab in a window. This keeps it from jumping around as you move through the tabs. Feels much better.
  • I styled the tabs slightly different.

Questions Found To Follow Up?

Do we need the errors reducer anymore?
Do we need the URL reducer??
Do we need the toolbars reducer anymore??

Closes #2249

@jameskerr jameskerr requested a review from philrz July 10, 2023 21:26
@philrz

This comment was marked as resolved.

@philrz
Copy link
Contributor

philrz commented Jul 13, 2023

I'm prepping to do some testing of what happens when upgrading from the last GA Zui release v1.1.0 to Dev builds based on this branch, as I want to fully understand what happens to details like editor contents, History, etc. after upgrade. As the old design made it somewhat difficult to even get to a state with connections to different lakes in different tabs, I've settled on a a consistent recipe that gets me into that as my "before upgrade" state. Therefore I'm describing & showing that in this comment and will refer back to it in other comments where I cite problems I might find after upgrading to a Dev build from this "before" state.

The steps described in text:

  1. Have GA Zui v1.1.0 and the latest Zui Insiders installed
  2. Start with Zui and Zui Insiders not launched and all lake/state cleared out
  3. Open Zui Insiders and import results.zng.gz, then minimize Zui Insiders (we only need it for its "remote" lake)
  4. Open GA Zui and import sample.zng.gz
  5. Add the connection to the Zui Insiders lake on http://localhost:9988
  6. Click on the results.zng.gz remote pool and then click Query Pool to start a Query Session
  7. Click back to the Welcome to Zui tab
  8. Change the lake connection to the local one behind GA Zui
  9. Click on "+" to open a new Query Session
  10. Select the sample.zng.gz pool from the drop-down
  11. Close the other tabs leaving just the query sessions for results.zng.gz and sample.zng.gz (note how the selection in the lake pull-down changes as I click between tabs)
Prep.mp4

@philrz

This comment was marked as resolved.

@philrz

This comment was marked as resolved.

@philrz

This comment was marked as resolved.

When you load from sidebar, new tab, when you load from new pool page, replace url.
@jameskerr jameskerr merged commit 05f017b into main Jul 17, 2023
7 checks passed
@jameskerr jameskerr deleted the no-tabs branch July 17, 2023 19:36
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.

Allow app to have no tabs open
2 participants