fix(design): a user row answers as a whole card — the hover layer under its badges and buttons, a click anywhere opens the account (E28)
The layer was the name button's own and ended at the row's first badge or button. The card now paints the B3 layer under its content (isolate + a new z-under level), the name button's hit layer spans the card, and the actions sit above it.
This commit is contained in:
@@ -98,6 +98,24 @@ describe("the last sign-in column (E22 S1)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// E28 (owner): the hover ended wherever the row's first badge or button began, because the layer was
|
||||
// the name button's own. The card is the row: it paints the layer under its content, and the name
|
||||
// button's hit layer spans the card, under the actions that sit above it.
|
||||
describe("a user row", () => {
|
||||
it("answers as a whole card, with its actions above the card's hit layer", async () => {
|
||||
mount();
|
||||
const open = await screen.findByTitle("users.account.open");
|
||||
const card = open.parentElement!;
|
||||
expect(card.className).toMatch(/(^|\s)isolate(\s|$)/);
|
||||
expect(card.className).toMatch(/(^|\s)hover:before:bg-\(--hover\)(\s|$)/);
|
||||
expect(open.className).toMatch(/(^|\s)after:inset-0(\s|$)/);
|
||||
expect(open.className).not.toMatch(/selectable|hover:/);
|
||||
const actions = [...card.querySelectorAll("button")].filter((b) => b !== open);
|
||||
expect(actions.length).toBeGreaterThan(0);
|
||||
for (const b of actions) expect(b.className).toMatch(/(^|\s)relative(\s|$)/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("a user action that fails", () => {
|
||||
it("says a user who is gone, and refetches the list", async () => {
|
||||
const users = mount();
|
||||
|
||||
Reference in New Issue
Block a user