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

fix(portal): Add provider icon to identity/group badges #4947

Merged
merged 6 commits into from May 10, 2024
Merged

Conversation

jamilbk
Copy link
Member

@jamilbk jamilbk commented May 10, 2024

  • Makes the group badges a little easier on the eyes, and reduces their size to improve layout flow a bit. Allows to more quickly identity provider adapters at-a-glance.
  • Fix group badge wrapping so that long group names don't flow into the next table cell

Fixes #4905

Screenshot 2024-05-10 at 7 24 59 AM

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
firezone ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 2:32pm

@github-actions github-actions bot added the kind/bug Something isn't working label May 10, 2024
Copy link

github-actions bot commented May 10, 2024

Terraform Cloud Plan Output

Plan: 15 to add, 15 to change, 15 to destroy.

Terraform Cloud Plan

@@ -113,7 +113,6 @@ defmodule Web.Live.Groups.EditActorsTest do
end)
|> with_table_row("actor", "#{admin_actor.name} (admin)", fn row ->
for(identity <- admin_actor.identities) do
assert row["identities"] =~ identity.provider.name
Copy link
Member Author

Choose a reason for hiding this comment

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

The icon is not pulled by the with_table_row helper. The provider_icon matcher is tested elsewhere so I thought this was ok to remove.

Copy link

github-actions bot commented May 10, 2024

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 242.2 MiB (+3%) 243.4 MiB (+3%) 332 (+68%)
direct-tcp-server2client 241.9 MiB (-2%) 242.8 MiB (-2%) 296 (-54%)
relayed-tcp-client2server 226.9 MiB (+0%) 227.5 MiB (+0%) 203 (-15%)
relayed-tcp-server2client 238.2 MiB (-2%) 238.6 MiB (-2%) 455 (+2%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 500.0 MiB (+0%) 0.03ms (+48%) 41.26% (-18%)
direct-udp-server2client 500.0 MiB (+0%) 0.02ms (+102%) 21.26% (-3%)
relayed-udp-client2server 500.0 MiB (+0%) 0.03ms (-85%) 56.45% (+3%)
relayed-udp-server2client 500.0 MiB (+0%) 0.03ms (+8%) 43.08% (-11%)

@AndrewDryga
Copy link
Collaborator

We were discussing this and we can't use icons because an account can have multiple providers of the same type active so you won't be able to tell the difference between them. We also can't just remove the prefix because then in case of name collision you won't be able to tell where that group is coming from.

@bmanifold
Copy link
Collaborator

We were discussing this and we can't use icons because an account can have multiple providers of the same type active so you won't be able to tell the difference between them. We also can't just remove the prefix because then in case of name collision you won't be able to tell where that group is coming from.

I understand where you're coming from, but as I think about it there are two things that make me think this would be ok:

  1. The likelihood of an account having 2 of the same provider is probably very small (unless there's a use case I'm overlooking)
  2. Won't clicking on the icon take you to the correct provider?

@jamilbk
Copy link
Member Author

jamilbk commented May 10, 2024

We were discussing this and we can't use icons because an account can have multiple providers of the same type active so you won't be able to tell the difference between them. We also can't just remove the prefix because then in case of name collision you won't be able to tell where that group is coming from.

I understand where you're coming from, but as I think about it there are two things that make me think this would be ok:

  1. The likelihood of an account having 2 of the same provider is probably very small (unless there's a use case I'm overlooking)
  2. Won't clicking on the icon take you to the correct provider?

Yeah that was my thinking too. No one has more than one provider of the same type configured, and if they do, hovering over the icon will display the provider name anyhow.

Seems like adding a little bit of ambiguity in the rare case is worth fixing the design issue for everyone.

@AndrewDryga
Copy link
Collaborator

@jamilbk @bmanifold I agree that there is an issue but I think we can fix it in other ways that don't sacrifice usability.

For example, we don't allow duplicate provider names, so we can shorten the name to the initials (eg. only keep capital letters) on smaller screens (using media queries). And this will work even if an account has multiple providers because hovering is not a solution - the human brain can't keep more than a few things in short memory.

@jamilbk jamilbk enabled auto-merge May 10, 2024 19:25
@jamilbk jamilbk disabled auto-merge May 10, 2024 20:39
Copy link
Collaborator

@bmanifold bmanifold left a comment

Choose a reason for hiding this comment

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

LGTM

@jamilbk jamilbk added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit 7faacd9 May 10, 2024
135 checks passed
@jamilbk jamilbk deleted the fix/badge-length branch May 10, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout slightly broken on Actors table
3 participants