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

Improve package selection Web UI workflow #1665

Closed
4 tasks
Racer159 opened this issue May 1, 2023 · 4 comments · Fixed by #1687
Closed
4 tasks

Improve package selection Web UI workflow #1665

Racer159 opened this issue May 1, 2023 · 4 comments · Fixed by #1687
Assignees
Labels
enhancement ✨ New feature or request ux
Milestone

Comments

@Racer159
Copy link
Contributor

Racer159 commented May 1, 2023

Is your feature request related to a problem? Please describe.

Our package selection workflow in the UI is a bit slow due to searching the entire home directory at one time.

Describe the solution you'd like

Recommend the following changes:

For 'init' package deployment

  • in the selection window, only show init packages that exist in the three places that Zarf searches for them:
    • Current Working Directory
    • Zarf Binary Directory
    • Home .zarf-cache folder
    • If a user selects an init package that does not match the current zarf version - show an error message (this needs to exist in CLI too)

Regular Package Deployment

For 'regular' packages - the UX flow proceeds in two parts:

  • Search # 1.

    • Search and show packages located in the current working directory w/o subdirectories (matching the tab behavior on zarf package deploy)
    • If packages are found show in the table and add a expand search button to table that executes search # 2
    • If no packages are found - show no package found error message (gives the user option to cancel deployment or proceed to part # 2
  • search part # 2

    • Search and show packages located in the entire home directory
    • Exclude trash
    • Exclude hidden folders
  • For both workflows, increase the height of the package selection table to show more packages at once

Design File

https://www.figma.com/file/MUItIzpzLBLuIyt225Bwgl/Zarf-Web-Ui?type=design&node-id=1544%3A56348&t=JeB5xVvOb7lcP6ZB-1

@Racer159 Racer159 added the UI label May 1, 2023
@Racer159 Racer159 added the ux label May 1, 2023
@Racer159 Racer159 added this to the v0.27 (m1-5.9) milestone May 1, 2023
@Racer159 Racer159 added the enhancement ✨ New feature or request label May 1, 2023
@mike-winberry mike-winberry self-assigned this May 5, 2023
mike-winberry added a commit that referenced this issue May 9, 2023
… update FindInitPackage to use the version name and to look in execution, cache directory, and the current working directory. Update io.go with a FileList method that reads a directory and returns a list of filepaths matched against an optional regex.
@mike-winberry mike-winberry linked a pull request May 9, 2023 that will close this issue
6 tasks
mike-winberry added a commit that referenced this issue May 10, 2023
…er for packages with the /packages/explore route.
@Madeline-UX
Copy link
Contributor

@Racer159 - I updated this issue to discuss a new UX flow for searching for zarf packages. I changed a few things:

  • Instead of hiding init packages that do not match current zarf version we should provide a warning on deployment that informs them of the risk.
  • Additionally if that behavior is in the web UI it probably should also be added to the CLI

@Racer159
Copy link
Contributor Author

Not sure I agree with showing all init packages since that may be more dangerous then helpful - we pair them together because the init package contains the Zarf agent which can have breaking changes between versions and might break a cluster deployment in weird ways that would be hard to debug.

@Madeline-UX
Copy link
Contributor

Is that a current behavior in the CLI as well?
What if the user wants to use a old version of the init package because that is what they have on their machine?
How can we guarantee a user got a new init package when they updated Zarf? (ex. disconnected user gets new zarf binary but not new init package and needs to destroy and reboot entire cluster and resources) Is this a failure?

@Madeline-UX
Copy link
Contributor

Design is finalized and ready in Figma

mike-winberry added a commit that referenced this issue Jun 1, 2023
…ts as they are found and open a dialog if not. TODO add recursive file streaming and the expanded search.
mike-winberry added a commit that referenced this issue Jun 1, 2023
…query param init: boolean and recursively streams packages from the users home folder (init packages when init = true). Update utils io.go with IsTrashBin method that takes in a directory path and checks if it is the os trash bin. Updat the ui server with new packages/find/stream routes. Update frontend api with new routes and method for recursively streaming packages. TODO: add the expanded search button and logic.. Handle warnings for init packages that dont match the executable version.
mike-winberry added a commit that referenced this issue Jun 2, 2023
…eList; Extracted hidded directory check into IsHidden utility method; Removed unused FileList method. Update all references to RecursiveFileList references to nolonger have the unused flags. Update api/packages find.go: Removed the initPackagesPattern and replaced references with currentInitPattern; Update recursivePackageStream to ignore hidden directories as well as the Trash folder.
mike-winberry added a commit that referenced this issue Jun 2, 2023
…rch again after expanded search has been run.
@Racer159 Racer159 removed this from the v0.27 (m3-5.30) milestone Jun 5, 2023
mike-winberry added a commit that referenced this issue Jun 12, 2023
…eList; Extracted hidded directory check into IsHidden utility method; Removed unused FileList method. Update all references to RecursiveFileList references to nolonger have the unused flags. Update api/packages find.go: Removed the initPackagesPattern and replaced references with currentInitPattern; Update recursivePackageStream to ignore hidden directories as well as the Trash folder.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…rch again after expanded search has been run.
mike-winberry added a commit that referenced this issue Jun 12, 2023
… update FindInitPackage to use the version name and to look in execution, cache directory, and the current working directory. Update io.go with a FileList method that reads a directory and returns a list of filepaths matched against an optional regex.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…er for packages with the /packages/explore route.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…ts as they are found and open a dialog if not. TODO add recursive file streaming and the expanded search.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…query param init: boolean and recursively streams packages from the users home folder (init packages when init = true). Update utils io.go with IsTrashBin method that takes in a directory path and checks if it is the os trash bin. Updat the ui server with new packages/find/stream routes. Update frontend api with new routes and method for recursively streaming packages. TODO: add the expanded search button and logic.. Handle warnings for init packages that dont match the executable version.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…eList; Extracted hidded directory check into IsHidden utility method; Removed unused FileList method. Update all references to RecursiveFileList references to nolonger have the unused flags. Update api/packages find.go: Removed the initPackagesPattern and replaced references with currentInitPattern; Update recursivePackageStream to ignore hidden directories as well as the Trash folder.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…rch again after expanded search has been run.
mike-winberry added a commit that referenced this issue Jun 12, 2023
… update FindInitPackage to use the version name and to look in execution, cache directory, and the current working directory. Update io.go with a FileList method that reads a directory and returns a list of filepaths matched against an optional regex.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…er for packages with the /packages/explore route.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…ts as they are found and open a dialog if not. TODO add recursive file streaming and the expanded search.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…query param init: boolean and recursively streams packages from the users home folder (init packages when init = true). Update utils io.go with IsTrashBin method that takes in a directory path and checks if it is the os trash bin. Updat the ui server with new packages/find/stream routes. Update frontend api with new routes and method for recursively streaming packages. TODO: add the expanded search button and logic.. Handle warnings for init packages that dont match the executable version.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…eList; Extracted hidded directory check into IsHidden utility method; Removed unused FileList method. Update all references to RecursiveFileList references to nolonger have the unused flags. Update api/packages find.go: Removed the initPackagesPattern and replaced references with currentInitPattern; Update recursivePackageStream to ignore hidden directories as well as the Trash folder.
mike-winberry added a commit that referenced this issue Jun 12, 2023
…rch again after expanded search has been run.
Racer159 added a commit that referenced this issue Jun 12, 2023
## Is your feature request related to a problem? Please describe.
Our package selection workflow in the UI is a bit slow due to searching
the entire home directory at one time.

## Describe the solution you'd like
Recommend the following changes:

### For 'init' package deployment
- [x] in the selection window, only show init packages that exist in the
three places that Zarf searches for them:
  - Current Working Directory
  -  Zarf Binary Directory
  - Home `.zarf-cache` folder
  - Only show init packages that match the current build version. 

### Regular Package Deployment
For 'regular' packages -  the UX flow proceeds in two parts:
- [x] Search # 1. 
- Search and show packages located in the current working directory w/o
subdirectories (matching the tab behavior on `zarf package deploy`)
- If packages are found show in the table and add a expand search button
to table that executes search # 2
- If no packages are found - show no package found error message (gives
the user option to cancel deployment or proceed to part # 2
- [x] search part # 2
    - Search and show packages located in the entire home directory
    - Exclude trash 
    - Exclude hidden folders

- [x] For both workflows, increase the height of the package selection
table to show more packages at once

## Design File

https://www.figma.com/file/MUItIzpzLBLuIyt225Bwgl/Zarf-Web-Ui?type=design&node-id=1544%3A56348&t=JeB5xVvOb7lcP6ZB-1


## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)

---------

Co-authored-by: Wayne Starr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants