From 493096965ff758af16707da0f7b23897de58d0f3 Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Thu, 23 Jul 2026 15:10:47 +1000 Subject: [PATCH 1/2] more prose examples --- packages/@react-spectrum/ai/stories/chat.mdx | 26 +++ .../ai/stories/prose.stories.tsx | 177 +++++++++++++++++- 2 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 packages/@react-spectrum/ai/stories/chat.mdx diff --git a/packages/@react-spectrum/ai/stories/chat.mdx b/packages/@react-spectrum/ai/stories/chat.mdx new file mode 100644 index 00000000000..f975dad5280 --- /dev/null +++ b/packages/@react-spectrum/ai/stories/chat.mdx @@ -0,0 +1,26 @@ +{/* Copyright 2026 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. */} + +Let me see what the documents say about travel reimbursement rules. + + +Here are the key rules for travel reimbursement at +Adobe: + +### Booking & Payment + +1. Travel Booking: All travel must be booked through Adobe's preferred travel services provider. Booking outside of approved providers is not allowed. +2. Corporate Card Use: Employees must use their +Adobe Corporate Card for business travel expenses unless the merchant does not accept it. Personal expenses are strictly prohibited on the Corporate Card and must be reimbursed to Adobe immediately if charged. + +### Air & Rail Travel + +1. Advance Booking: Airfare should be purchased as early as possible. Tickets bought less than 7 days before travel are flagged as exceptions. +2. Class of Service: + - Domestic and international flights under 6.5 hours: Econom/Coach class onlv. diff --git a/packages/@react-spectrum/ai/stories/prose.stories.tsx b/packages/@react-spectrum/ai/stories/prose.stories.tsx index 4f008187549..a0a0dd9ec86 100644 --- a/packages/@react-spectrum/ai/stories/prose.stories.tsx +++ b/packages/@react-spectrum/ai/stories/prose.stories.tsx @@ -10,12 +10,23 @@ * governing permissions and limitations under the License. */ +import { + Chat, + PromptField, + PromptFieldSubmitButton, + PromptTokenField, + Thread, + ThreadItem, + UserMessage +} from '../exports'; +import ChatExample from './chat.mdx'; import {createPortal} from 'react-dom'; import type {Meta} from '@storybook/react'; import {prose} from '@react-spectrum/ai/style' with {type: 'macro'}; import ProseExample from './prose.mdx'; // @ts-ignore import React, {ReactNode, useRef, useState} from 'react'; +import {Slider} from '@react-spectrum/s2'; import * as spectrumTokens from '@adobe/spectrum-tokens/dist/json/variables.json'; import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; import {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect'; @@ -251,7 +262,7 @@ function BlueLine({box}: {box: MarginBox}) { <>
+
+

Heading stuff

+ +
+
+

Left Panel

+
+
+

Main Content

+
+
+
+

+ Ask AI Assistant +

+ + + {(msg: ChatMessage) => { + if (msg.type === 'user') { + return ( + + {msg.content} + + ); + } + return ( + +
+ +
+
+ ); + }} +
+ {}}> +
+ + +
+
+
+
+
+
+ ); +} +export const SidePanel = { + render: () => , + parameters: { + layout: 'fullscreen' + } +}; From 7eb01a25795f2841050d1dee833a545598983fbc Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Thu, 23 Jul 2026 15:58:07 +1000 Subject: [PATCH 2/2] add font size control --- .../ai/stories/prose.stories.tsx | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/packages/@react-spectrum/ai/stories/prose.stories.tsx b/packages/@react-spectrum/ai/stories/prose.stories.tsx index a0a0dd9ec86..de8557f60cb 100644 --- a/packages/@react-spectrum/ai/stories/prose.stories.tsx +++ b/packages/@react-spectrum/ai/stories/prose.stories.tsx @@ -38,13 +38,34 @@ const meta: Meta = { export default meta; -export const Example = () => ( - -
- -
-
-); +function ProseStory() { + let [fontSize, setFontSize] = useState(14); + return ( + +
+ +
+
+ +
+
+ ); +} + +export const Example = () => ; // Spectrum tokens applied to each prose element (see style/prose.ts). When a // font isn't specified the element inherits `body`; when a margin isn't @@ -297,7 +318,9 @@ function BlueLine({box}: {box: MarginBox}) { } function computeBoxes(root: HTMLElement): MarginBox[] { - let prose = root.querySelector('.prose') ?? root; + // Scope measurement to the prose article (tagged with data-testid) so the + // overlay ignores sibling controls like the font size slider. + let prose = root.querySelector('[data-testid="prose"]') ?? root; let scrollX = window.scrollX; let scrollY = window.scrollY; let entries: Omit[] = [];