feat(member): condense the overview into composite name and address cells

This commit is contained in:
Simon 2026-07-03 11:35:46 +02:00
parent b79d7ac9ea
commit af2cc2e0d4
17 changed files with 716 additions and 93 deletions

View file

@ -148,20 +148,20 @@ defmodule MvWeb.MemberLive.IndexFieldVisibilityTest do
conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members")
# Verify email is visible initially
# The curated Name column carries the email, so it is visible initially.
html = render(view)
assert html =~ "alice@example.com"
# Open dropdown and hide email
# Open dropdown and hide the Name column
view
|> element("button[aria-controls='field-visibility-menu']")
|> render_click()
view
|> element("button[phx-click='select_item'][phx-value-item='email']")
|> element("button[phx-click='select_item'][phx-value-item='name']")
|> render_click()
# Email should no longer be visible
# The Name column (and the email it carries) is no longer visible
html = render(view)
refute html =~ "alice@example.com"
refute html =~ "bob@example.com"
@ -309,13 +309,13 @@ defmodule MvWeb.MemberLive.IndexFieldVisibilityTest do
conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members")
# Hide a field via dropdown
# Hide the curated Name column (which carries the email) via dropdown
view
|> element("button[aria-controls='field-visibility-menu']")
|> render_click()
view
|> element("button[phx-click='select_item'][phx-value-item='email']")
|> element("button[phx-click='select_item'][phx-value-item='name']")
|> render_click()
html = render(view)
@ -429,7 +429,7 @@ defmodule MvWeb.MemberLive.IndexFieldVisibilityTest do
conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members")
# Verify email is visible initially
# The curated Name column carries the email, so it is visible initially.
html = render(view)
assert html =~ "alice@example.com"
@ -438,12 +438,12 @@ defmodule MvWeb.MemberLive.IndexFieldVisibilityTest do
|> element("button[aria-controls='field-visibility-menu']")
|> render_click()
# Simulate Enter key press on email field button
# Simulate Enter key press on the Name field button
view
|> element("button[phx-click='select_item'][phx-value-item='email']")
|> element("button[phx-click='select_item'][phx-value-item='name']")
|> render_keydown(%{key: "Enter"})
# Email should no longer be visible
# The Name column (and the email it carries) is no longer visible
html = render(view)
refute html =~ "alice@example.com"
end