From f98d145a2ec2b8b1987fa63cf013c7f618dc56eb Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Thu, 6 Aug 2026 08:01:01 +1000 Subject: [PATCH 1/2] fix: tooltip prop spread in s2 docs examples (#10413) --- packages/dev/s2-docs/pages/s2/Tooltip.mdx | 4 ++-- packages/dev/s2-docs/src/VisualExampleClient.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dev/s2-docs/pages/s2/Tooltip.mdx b/packages/dev/s2-docs/pages/s2/Tooltip.mdx index 8929caecfaf..93529ce115c 100644 --- a/packages/dev/s2-docs/pages/s2/Tooltip.mdx +++ b/packages/dev/s2-docs/pages/s2/Tooltip.mdx @@ -17,9 +17,9 @@ import {Tooltip, TooltipTrigger} from '@react-spectrum/s2/Tooltip'; import {ActionButton} from '@react-spectrum/s2/ActionButton'; import Edit from '@react-spectrum/s2/icons/Edit'; - + - Edit name + Edit name ``` diff --git a/packages/dev/s2-docs/src/VisualExampleClient.tsx b/packages/dev/s2-docs/src/VisualExampleClient.tsx index 2c9e957e1c2..245d869517a 100644 --- a/packages/dev/s2-docs/src/VisualExampleClient.tsx +++ b/packages/dev/s2-docs/src/VisualExampleClient.tsx @@ -447,7 +447,7 @@ function renderProp(name: string, value: any, control?: PropControl, indent = '' ); } else if (typeof value === 'boolean') { - if (value === false && control?.optional) { + if (value === false && control?.optional && !control?.default) { return null; } if (name === 'contextualHelp') { From 1b4b16c2614e6d0e477f876e0e293e5d6017ca94 Mon Sep 17 00:00:00 2001 From: Reid Barber Date: Wed, 5 Aug 2026 18:22:04 -0500 Subject: [PATCH 2/2] fix(ActionBar): fix icon color in close button in emphasized ActionBar (#10429) * fix icon color in static color CloseButton * add chromatic --- .../s2/chromatic/ActionBar.stories.tsx | 61 +++++++++++++++++++ .../@react-spectrum/s2/src/CloseButton.tsx | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 packages/@react-spectrum/s2/chromatic/ActionBar.stories.tsx diff --git a/packages/@react-spectrum/s2/chromatic/ActionBar.stories.tsx b/packages/@react-spectrum/s2/chromatic/ActionBar.stories.tsx new file mode 100644 index 00000000000..c9ddfc476b9 --- /dev/null +++ b/packages/@react-spectrum/s2/chromatic/ActionBar.stories.tsx @@ -0,0 +1,61 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {ActionBar, ActionBarProps} from '../src/ActionBar'; +import {ActionButton} from '../src/ActionButton'; +import {generatePowerset} from '@react-spectrum/story-utils'; +import type {Meta, StoryObj} from '@storybook/react'; +import {ReactNode} from 'react'; +import {shortName} from './utils'; +import {style} from '../style' with {type: 'macro'}; + +const meta: Meta = { + component: ActionBar, + parameters: { + chromaticProvider: {disableAnimations: true} + }, + title: 'S2 Chromatic/ActionBar' +}; + +export default meta; + +type Story = StoryObj; + +let states = [{isEmphasized: [false, true]}]; +let combinations = generatePowerset(states); + +const Template = (args: ActionBarProps): ReactNode => { + return ( +
+ {combinations.map(c => { + let key = + Object.keys(c) + .map(k => shortName(k, c[k])) + .join(' ') || 'default'; + + return ( +
+ + Edit + Copy + Delete + +
+ ); + })} +
+ ); +}; + +export const Default: Story = { + render: args =>