mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 00:12:39 +00:00
fix: open the contact card in place instead of sliding in from the top left
This commit is contained in:
@@ -75,3 +75,14 @@ describe('RecipientCardPopover', () => {
|
||||
expect(onClose).toHaveBeenCalledTimes(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('recipient card styling', () => {
|
||||
// A bare `duration-*` sets transition-duration, and with no
|
||||
// transition-property that means `all`: the card slid from the top left
|
||||
// corner to its anchor instead of appearing there.
|
||||
it('times only the enter animation, not a transition on its position', () => {
|
||||
render(<RecipientCardPopover anchor={{ top: 10, bottom: 30, left: 10 }} email={address} onClose={() => {}} />);
|
||||
const classes = screen.getByRole('dialog').className.split(/\s+/);
|
||||
expect(classes.filter((c) => /^duration-/.test(c))).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -184,7 +184,7 @@ export function placeCard(anchor: CardAnchor, height: number): { top: number; le
|
||||
}
|
||||
|
||||
export const recipientCardClass =
|
||||
"fixed z-50 w-[300px] max-w-[calc(100vw-16px)] bg-background rounded-lg shadow-lg border border-border animate-in fade-in-0 zoom-in-95 duration-100";
|
||||
"fixed z-50 w-[300px] max-w-[calc(100vw-16px)] bg-background rounded-lg shadow-lg border border-border animate-in fade-in-0 zoom-in-95 animation-duration-100";
|
||||
|
||||
interface RecipientCardPopoverProps extends RecipientCardProps {
|
||||
anchor: CardAnchor;
|
||||
|
||||
Reference in New Issue
Block a user