Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.

<!-- template-start -->

## 9.4.2 ((6/17/2026, 11:55 PM PST))

This is an artificial version bump with no new change.

## 9.4.1 ((6/15/2026, 01:02 PM PST))

This is an artificial version bump with no new change.
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coinbase/cds-common",
"version": "9.4.1",
"version": "9.4.2",
"description": "Coinbase Design System - Common",
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions packages/mcp-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.

<!-- template-start -->

## 9.4.2 ((6/17/2026, 11:55 PM PST))

This is an artificial version bump with no new change.

## 9.4.1 ((6/15/2026, 01:02 PM PST))

This is an artificial version bump with no new change.
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coinbase/cds-mcp-server",
"version": "9.4.1",
"version": "9.4.2",
"description": "Coinbase Design System - MCP Server",
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions packages/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.

<!-- template-start -->

## 9.4.2 ((6/17/2026, 11:55 PM PST))

This is an artificial version bump with no new change.

## 9.4.1 (6/15/2026 PST)

#### 🐞 Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coinbase/cds-mobile",
"version": "9.4.1",
"version": "9.4.2",
"description": "Coinbase Design System - Mobile",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.

<!-- template-start -->

## 9.4.2 (6/17/2026 PST)

#### 🐞 Fixes

- Fix: Tray overlay backdrop now fades out on close. [[#736](https://github.com/coinbase/cds/pull/736)]

## 9.4.1 (6/15/2026 PST)

#### 🐞 Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coinbase/cds-web",
"version": "9.4.1",
"version": "9.4.2",
"description": "Coinbase Design System - Web",
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions packages/web/src/overlays/tray/Tray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export const Tray = memo(
const trayRef = useRef<HTMLDivElement>(null);
const { observe: observeTraySize, height: trayHeight } = useDimensions<HTMLDivElement>();
const contentRef = useRef<HTMLDivElement>(null);
const overlayRef = useRef<HTMLDivElement>(null);
const hasCalledOnOpenComplete = useRef(false);
const [scope, animate] = useAnimate();
const dragControls = useDragControls();
Expand Down Expand Up @@ -320,6 +321,9 @@ export const Tray = memo(
? { x: pin === 'right' ? '100%' : '-100%' }
: { y: pin === 'bottom' ? '100%' : '-100%' };
}
if (overlayRef.current) {
animate(overlayRef.current, { opacity: 0 }, animationConfig.slideOut.transition);
}
animate(scope.current, finalAnimationValue, animationConfig.slideOut.transition).then(() => {
setIsOpen(false);
onClose?.();
Expand All @@ -329,6 +333,9 @@ export const Tray = memo(

const handleSwipeClose = useCallback(() => {
if (!scope.current) return;
if (overlayRef.current) {
animate(overlayRef.current, { opacity: 0 }, { duration: 0.15, ease: 'easeOut' });
}
animate(scope.current, { y: '100%' }, { duration: 0.15, ease: 'easeOut' }).then(() => {
setIsOpen(false);
onBlur?.();
Expand Down Expand Up @@ -454,6 +461,8 @@ export const Tray = memo(
zIndex={zIndex}
>
<Overlay
ref={overlayRef}
animated
className={cx(trayClassNames.overlay, classNames?.overlay)}
onClick={handleOverlayClick}
style={styles?.overlay}
Expand Down
14 changes: 14 additions & 0 deletions packages/web/src/overlays/tray/__tests__/Tray.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,18 @@ describe('Tray', () => {
expect(root?.querySelector(`.${trayClassNames.handleBarHandle}`)).toBeInTheDocument();
});
});

describe('overlay animation', () => {
it('wraps the overlay in a motion container so the backdrop fades', () => {
const onCloseCompleteSpy = jest.fn();
render(
<DefaultThemeProvider>
<Tray onCloseComplete={onCloseCompleteSpy} title={titleText}>
{loremIpsum}
</Tray>
</DefaultThemeProvider>,
);
expect(screen.getByTestId('tray-overlay-motion')).toBeInTheDocument();
});
});
});
Loading