Truncate access review roles with badge list

Long role strings in the access review table broke row layout when
drivers joined many roles into one comma-separated value. Expose
roles as a string array in GraphQL by splitting the stored role at
the API layer, and render the first three roles as badges with a
"+X more" popover for the rest.

Closes ENG-459.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-12 18:23:04 +02:00
parent bf20ca1a90
commit 8094e7cfd0
80 changed files with 768 additions and 378 deletions

View File

@@ -41,7 +41,7 @@ func TestMetabaseDriver(t *testing.T) {
assert.Equal(t, "alice@example.com", records[0].Email)
assert.Equal(t, "Alice A.", records[0].FullName)
assert.Equal(t, "Admin", records[0].Role)
assert.Equal(t, []string{"Admin"}, records[0].Roles)
assert.True(t, records[0].IsAdmin)
require.NotNil(t, records[0].Active)
assert.True(t, *records[0].Active)
@@ -51,7 +51,7 @@ func TestMetabaseDriver(t *testing.T) {
assert.Equal(t, "bob@example.com", records[1].Email)
assert.Equal(t, "Bob Builder", records[1].FullName)
assert.Equal(t, "User", records[1].Role)
assert.Equal(t, []string{"User"}, records[1].Roles)
assert.False(t, records[1].IsAdmin)
require.NotNil(t, records[1].Active)
assert.False(t, *records[1].Active)