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

Connection list: Hide cluster name for single cluster #40262

Merged
merged 3 commits into from Apr 9, 2024

Conversation

ravicious
Copy link
Member

Changelog: Teleport Connect now hides cluster name in the connection list if there's only a single cluster available

Just a small cleanup. Many of our users log in just to a single cluster, presumably it has no leaf clusters as well. As such, we just end up repeating the cluster name which offers little value. See an example from an actual customer.

This PR makes it so that the cluster name is no longer shown when there's only a single cluster in clustersService and the connections come just from a single cluster as well.

Before After
before after

Comparing how identical data is displayed between those two versions:

Before After
before after

The list is a little more condensed, mostly because the vertical padding was changed from 6px to a standard 4px.

padding: ${props => props.theme.space[1]}px
${props => props.theme.space[2]}px;
// Space out items more if there are two lines of text to show inside a single item.
margin-block-start: ${props =>
Copy link
Member Author

@ravicious ravicious Apr 5, 2024

Choose a reason for hiding this comment

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

This is similar to gap but is defined on a child rather than a parent.

Well, it is similar to gap when called like this:

.stack > * + * {
  margin-block-start: 1.5rem;
}

…so that it's not applied to the first item in the list, but here it doesn't matter anyway.

I used it here since the parent in question is <ul> without display: flex. Perhaps using display: flex on <ul> is fine, but I didn't want to spend time on figuring out if it breaks anything related to list-specific spacing (e.g. list-style-type). Let me know if you know though!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think using display: flex on <ul> shouldn't break anything, but I'm fine with keeping it as is.

@ravicious ravicious enabled auto-merge April 9, 2024 13:13
@ravicious ravicious added this pull request to the merge queue Apr 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 9, 2024
@ravicious ravicious added this pull request to the merge queue Apr 9, 2024
Merged via the queue into master with commit 27b0a86 Apr 9, 2024
37 checks passed
@ravicious ravicious deleted the r7s/cluster-name-in-conns branch April 9, 2024 13:35
@public-teleport-github-review-bot

@ravicious See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Failed
branch/v15 Failed

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

Successfully merging this pull request may close these issues.

None yet

3 participants