Simplify auto updates multi-cluster view#57709
Conversation
| disabled, | ||
| label: getClusterName(c.clusterUri), | ||
| helperText: `${c.toolsVersion} client, ${compatibility}.`, | ||
| label: `Use version from cluster ${getClusterName(c.clusterUri)}`, |
There was a problem hiding this comment.
Should we put the cluster name in bold? (Maybe the version numbers too? Makes them stand out a bit vs the text)
There was a problem hiding this comment.
We could maybe even use just the cluster name as the label.
There was a problem hiding this comment.
Hmm yeah, we can just show the cluster name.
Maybe the version numbers too?
It seems to me that shortening the labels improves readability enough that it's not necessary.
ravicious
left a comment
There was a problem hiding this comment.
This is definitely an upgrade!
| disabled, | ||
| label: getClusterName(c.clusterUri), | ||
| helperText: `${c.toolsVersion} client, ${compatibility}.`, | ||
| label: `Use version from cluster ${getClusterName(c.clusterUri)}`, |
There was a problem hiding this comment.
We could maybe even use just the cluster name as the label.
| > | ||
| <Stack gap={0}> | ||
| <H3>Updates source</H3> | ||
| <P3>Multiple clusters can manage Teleport Connect version.</P3> |
There was a problem hiding this comment.
What does "Multiple clusters can manage Teleport Connect version." really mean? It kind of suggests that you can pick multiple clusters but you can actually choose just one. Should this say something like "Choose which cluster to follow for updates."?
There was a problem hiding this comment.
I wanted a safe label that works in both cases: when clusters are incompatible and you need to select a cluster, and when clusters are compatible and no changes are needed (but you may want to pick a different cluster).
But actually "Choose which cluster to follow for updates." works fine too and doesn't suggest that you can select more than one option.
* Simplify auto updates multi-cluster view * Improve labels * Fix tests
* Simplify auto updates multi-cluster view * Improve labels * Fix tests
* Simplify auto updates multi-cluster view * Improve labels * Fix tests (cherry picked from commit b574045)
* Simplify auto updates multi-cluster view * Improve labels * Fix tests (cherry picked from commit b574045)
* Integrate app updater with UI (#57491) * Implement `checkForUpdates`, `download`, `cancelDownload`, `changeManagingCluster` and `quitAndInstall` * Expose new APIs through Electron IPC * Add app updater context to store updater state * Add `AppUpdates` dialog * Switch "Download" button to "Starting Download..." immediately after clicking it * Clear managing cluster on logout * Return correct error in `GetClusterVersions` * Do not prepend `https://` to file URL, DefaultBaseURL already contains it, trim the checksum value before validating it * Only try to download an update if it's available * Remove separate `will-quit` handler * Clarify comment * Invert condition in `preventInstallingOutdatedUpdates` * Add comments * Move `closeAllConnections()` out of try catch * Add specialized functions to serialize/deserialize errors * Add tests * Leave TODO * Do not wait for `maybeRemoveAppUpdatesManagingCluster` in `useClusterLogout` * Hide app updater for .tar.gz which is not supported * Add missing mock (cherry picked from commit 13aa750) * Show update widget in login dialog (#57695) * Add app updates widget to login dialog * Adjust compatibility warning to app updates * Simplify widget error state, do not show full error message * Make the widget take up 100% width both in login modal an in story * Fix LocalWithPasswordless story * Use `alignItems="stretch"` * Use `SpaceProps` instead of redefining `mx` manually * Infer type * Display buttons in the bottom of Alert * Avoid moving content when scrollbar appears * Destructure `Promise.all` result * Add comment --------- Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com> (cherry picked from commit c59a4e6) * Simplify auto updates multi-cluster view (#57709) * Simplify auto updates multi-cluster view * Improve labels * Fix tests (cherry picked from commit b574045) * Connect: Force focus after a successful SSO login * Move login functions from ClustersService to useClusterLogin * Remove no longer used GetResourcesParams * Remove clusters/types.ts * Force focus on Connect after successful SSO login * Update SSO prompt after login but before sync * Add test for SSO prompts * Use `Promise.withResolvers` Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com> * Update wait-for-sync prompt message --------- Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com> * Hardcode the lowest supported Connect versions that support managed updates (#58348) * Provide the lowest supported app versions for managed updates * Deserialize errors in the UI code, not in preload Otherwise, the error name is lost. * Bump version in tests * Lint * Show exact version in error message * Do not hide UnsupportedVersionError * Fix margin * Make alert take 100% width (cherry picked from commit d7e1352) --------- Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Integrate app updater with UI (#57491) * Implement `checkForUpdates`, `download`, `cancelDownload`, `changeManagingCluster` and `quitAndInstall` * Expose new APIs through Electron IPC * Add app updater context to store updater state * Add `AppUpdates` dialog * Switch "Download" button to "Starting Download..." immediately after clicking it * Clear managing cluster on logout * Return correct error in `GetClusterVersions` * Do not prepend `https://` to file URL, DefaultBaseURL already contains it, trim the checksum value before validating it * Only try to download an update if it's available * Remove separate `will-quit` handler * Clarify comment * Invert condition in `preventInstallingOutdatedUpdates` * Add comments * Move `closeAllConnections()` out of try catch * Add specialized functions to serialize/deserialize errors * Add tests * Leave TODO * Do not wait for `maybeRemoveAppUpdatesManagingCluster` in `useClusterLogout` * Hide app updater for .tar.gz which is not supported * Add missing mock (cherry picked from commit 13aa750) * Show update widget in login dialog (#57695) * Add app updates widget to login dialog * Adjust compatibility warning to app updates * Simplify widget error state, do not show full error message * Make the widget take up 100% width both in login modal an in story * Fix LocalWithPasswordless story * Use `alignItems="stretch"` * Use `SpaceProps` instead of redefining `mx` manually * Infer type * Display buttons in the bottom of Alert * Avoid moving content when scrollbar appears * Destructure `Promise.all` result * Add comment --------- Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com> (cherry picked from commit c59a4e6) * Simplify auto updates multi-cluster view (#57709) * Simplify auto updates multi-cluster view * Improve labels * Fix tests (cherry picked from commit b574045) * Connect: Force focus after a successful SSO login * Move login functions from ClustersService to useClusterLogin * Remove no longer used GetResourcesParams * Remove clusters/types.ts * Force focus on Connect after successful SSO login * Update SSO prompt after login but before sync * Add test for SSO prompts * Use `Promise.withResolvers` Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com> * Update wait-for-sync prompt message --------- Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com> * Hardcode the lowest supported Connect versions that support managed updates (#58348) * Provide the lowest supported app versions for managed updates * Deserialize errors in the UI code, not in preload Otherwise, the error name is lost. * Bump version in tests * Lint * Show exact version in error message * Do not hide UnsupportedVersionError * Fix margin * Make alert take 100% width (cherry picked from commit d7e1352) --------- Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
The last part of #50948. RFD.
After using the updater in the real app, I realized that it doesn't look great when there are multiple clusters.
The management view occupies too much space and its options are not clear enough.
Summary of changes:
19.0.0 clientinstead of justTeleport Connect 19.0.0.Updated view (I think it now looks closer to what you suggested during our call, Rafał :p)