Scroll the Share people list on a short frame instead of squashing it.
Overflow-hidden let flex shrink the avatar rows, and the pane used the browser scrollbar instead of the design-system one.
This commit is contained in:
1 parent
1b3d055c81
commit
27f06dd7b0
2 files changed
+8
-3
No files matched your search
@@ -41,7 +41,7 @@ function PersonRow(props: {
|
|||||||
roleLabel: string;
|
roleLabel: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-center gap-3 overflow-hidden">
|
<div className="flex w-full shrink-0 items-center gap-3 overflow-hidden">
|
||||||
<Avatar
|
<Avatar
|
||||||
alt=""
|
alt=""
|
||||||
initials={props.initials}
|
initials={props.initials}
|
||||||
@@ -142,7 +142,8 @@ export const ShareView = memo(function ShareView({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex min-h-0 flex-1 flex-col gap-5 overflow-x-clip overflow-y-auto px-6 pb-6 pt-6">
|
<div className="scrollbar-design min-h-0 flex-1 overflow-x-clip overflow-y-auto">
|
||||||
|
<div className="flex flex-col gap-5 px-6 pb-6 pt-6">
|
||||||
<div className="flex w-full items-center gap-2">
|
<div className="flex w-full items-center gap-2">
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -182,7 +183,7 @@ export const ShareView = memo(function ShareView({
|
|||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<div className="flex w-full flex-col items-start gap-3 overflow-hidden">
|
<div className="flex w-full shrink-0 flex-col items-start gap-3">
|
||||||
<p className="w-full text-small-label text-[var(--color-content-default-secondary)]">
|
<p className="w-full text-small-label text-[var(--color-content-default-secondary)]">
|
||||||
{copy.peopleWithAccess}
|
{copy.peopleWithAccess}
|
||||||
</p>
|
</p>
|
||||||
@@ -303,6 +304,7 @@ export const ShareView = memo(function ShareView({
|
|||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{linkCopied ? (
|
{linkCopied ? (
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ describe("Share modal", () => {
|
|||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
expect(screen.getByText("Juniper Street Food Share")).toBeInTheDocument();
|
expect(screen.getByText("Juniper Street Food Share")).toBeInTheDocument();
|
||||||
expect(screen.getByText("You")).toBeInTheDocument();
|
expect(screen.getByText("You")).toBeInTheDocument();
|
||||||
|
const people = screen.getByText("People with access").parentElement;
|
||||||
|
expect(people).not.toHaveClass("overflow-hidden");
|
||||||
|
expect(people?.parentElement?.parentElement).toHaveClass("scrollbar-design");
|
||||||
expect(screen.getByText("N")).toBeInTheDocument();
|
expect(screen.getByText("N")).toBeInTheDocument();
|
||||||
expect(screen.getByText("R")).toBeInTheDocument();
|
expect(screen.getByText("R")).toBeInTheDocument();
|
||||||
expect(screen.getByRole("button", { name: "Invite" })).toBeEnabled();
|
expect(screen.getByRole("button", { name: "Invite" })).toBeEnabled();
|
||||||
|
|||||||
Reference in new issue
Block a user