Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d6a2dfc
initial s2 release notes
yihuiliao Feb 28, 2025
56660f5
initial v3/rac releaes notes
yihuiliao Feb 28, 2025
baf5124
Merge branch 'main' into march-release-notes
yihuiliao Feb 28, 2025
b6e9b2c
update release notes
yihuiliao Feb 28, 2025
b39713a
Merge branch 'main' into march-release-notes
yihuiliao Mar 3, 2025
a20020d
update
yihuiliao Mar 3, 2025
b069230
keep aria-current on button
yihuiliao Mar 3, 2025
4cd5699
Merge branch 'main' of github.com:adobe/react-spectrum into march-rel…
devongovett Mar 4, 2025
fd60e00
Add intro
devongovett Mar 4, 2025
703f8c4
Update S2 docs for CSS change
devongovett Mar 5, 2025
683be17
Add datepicker RTL image
devongovett Mar 5, 2025
ea9fb60
add migrating docs
yihuiliao Mar 5, 2025
772a66e
Merge branch 'main' into march-release-notes
yihuiliao Mar 5, 2025
a34fccd
add commits, update release date
yihuiliao Mar 5, 2025
f9f3262
Merge branch 'main' into march-release-notes
yihuiliao Mar 5, 2025
2c512f8
add description
yihuiliao Mar 5, 2025
05ff9de
autocomplete docs updates
snowystinger Mar 5, 2025
d72b52a
Merge branch 'march-release-notes' of github.com:adobe/react-spectrum…
snowystinger Mar 5, 2025
2fbea07
import components
snowystinger Mar 5, 2025
a4adee7
add anatomy
snowystinger Mar 5, 2025
c97f096
add note for TreeView changes
LFDanLu Mar 5, 2025
fd535f7
Merge branch 'march-release-notes' of github.com:adobe/react-spectrum…
LFDanLu Mar 5, 2025
f689cd0
remove non ready anatomy
snowystinger Mar 5, 2025
0ad6f6a
Merge branch 'march-release-notes' of github.com:adobe/react-spectrum…
snowystinger Mar 5, 2025
38a097b
add more info to migrating
yihuiliao Mar 5, 2025
857021f
delete aria/accordion and types/accordion since it has been deprecated
LFDanLu Mar 6, 2025
29dc933
Update packages/dev/docs/pages/releases/2025-03-05.mdx
LFDanLu Mar 6, 2025
5913489
Revert "delete aria/accordion and types/accordion since it has been d…
LFDanLu Mar 6, 2025
f59848c
Add versions
devongovett Mar 6, 2025
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
10 changes: 8 additions & 2 deletions .storybook-s2/docs/Intro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ function App() {
<Provider background="base">
{/* your app */}
</Provider>`)}</Pre>
<H3>Usage with older React Spectrum versions</H3>
<P>See Adobe internal documentation.</P>
<H2>Styling</H2>
<P>React Spectrum v3 supported a limited set of <Link href="https://react-spectrum.adobe.com/react-spectrum/styling.html" target="_blank">style props</Link> for layout and positioning using Spectrum-defined values. In Spectrum 2, we’re improving on this by offering a much more flexible style macro. This offers additional Spectrum tokens, improves performance by generating CSS at build time rather than runtime, and works with any DOM element for use in custom components.</P>
<P><Link href="https://parceljs.org/features/macros/" target="_blank">Macros</Link> are a new bundler feature that enable functions to run at build time. The React Spectrum <Code>style</Code> macro uses this to generate CSS that can be applied to any DOM element or component. Import the <Code>style</Code> macro using the with <Code>{`{type: 'macro'}`}</Code> <Link href="https://github.com/tc39/proposal-import-attributes" target="_blank">import attribute</Link>, and pass the result to the <Code>styles</Code> prop of any React Spectrum component to provide it with styles.</P>
Expand Down Expand Up @@ -238,8 +240,12 @@ function YourComponent() {
<Pre>{highlight(`/* YourComponent.css */
.your-unsafe-class {
background: red;
}
`, 'CSS')}</Pre>
}`, 'CSS')}</Pre>
<H3>CSS Resets</H3>
<P>CSS resets are strongly discouraged. Global CSS selectors can unintentionally affect elements that were not intended, leading to style clashes. Since Spectrum 2 uses <Link href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_layers" target="_blank">CSS cascade layers</Link>, global CSS outside a <Code>@layer</Code> will override S2's CSS. Therefore, if you cannot remove your CSS reset, it must be placed in a lower layer. This can be done by declaring your reset layer before the <Code>_</Code> layer used by S2.</P>
<Pre>{highlight(`/* App.css */
@layer reset, _;
@import "reset.css" layer(reset);`)}</Pre>
</main>
</div>
)
Expand Down
6 changes: 6 additions & 0 deletions .storybook-s2/docs/Migrating.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,12 @@ export function Migrating() {
<li className={style({font: 'body', marginY: 8})}>Update placement prop to be have one value (i.e. Update <Code>placement="bottom left"</Code> to be <Code>placement="bottom"</Code>)</li>
</ul>

<H3>TreeView</H3>
<P>If migrating from TreeView version 3.0.0-beta.3 or before, please do the following. Otherwise, no updates needed.</P>
<ul className="sb-unstyled">
<li className={style({font: 'body', marginY: 8})}> Update content within <Code>TreeViewItem</Code> to be wrapped in <Code>TreeViewContentItem</Code></li>
</ul>

<H3>View</H3>
<ul className="sb-unstyled">
<li className={style({font: 'body', marginY: 8})}>Update <Code>View</Code> to be a <Code>div</Code> and apply styles using the style macro</li>
Expand Down
29 changes: 29 additions & 0 deletions .storybook-s2/docs/Release Notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ export default MDXLayout;

# Release Notes

## v0.7.0

### New Components

* [TreeView](?path=/docs/treeview--docs)

### Updates

* [Badge](?path=/docs/badge--docs): Add `overflowMode` prop, fix icon alignment, update typo from `variant="charteuse"` to `variant="chartreuse"`
* [CardView](?path=/docs/cardview--docs): Fix styling when using `renderActionBar`
* Image: Add `fetchPriority` prop
* [Menu](?path=/docs/menu--docs): Fix menu item's focus rings from exceeding popover boundaries
* [Tabs](?path=/docs/tabs--docs): Add collapse behavior
* Remove `all: revert-layer` from style macro generated CSS to fix Safari issues
* Remove references to CSS `flex` shorthand. Please use `flexGrow`, `flexBasis`, and `flexShrink` instead.

### Codemods

* Update S2 icon migration map
* Handle margin/padding shorthands in style props codemod

### Important CSS update

In this release, we have made significant changes to the way our Style Macro generates CSS in order to fix issues with Safari. The Style Macro uses [CSS Cascade Layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers) to avoid CSS specificity and ordering issues. However, this means global CSS declared outside a `@layer`, such as CSS resets, will take precedence over S2's CSS. To avoid this, we previously used [all: revert-layer](https://developer.mozilla.org/en-US/docs/Web/CSS/revert-layer). Unfortunately, due to numerous bugs in Safari 18, this caused rendering issues in our components.

To fix these Safari issues, we have removed `all: revert-layer` in this release. This means that global CSS will now take precedence over S2's styles. **If you are using a CSS reset on the same page as S2 components, you will need to remove it** or put it in a `@layer` of its own. See [the docs](?path=/docs/intro--docs#css-resets) for more information.

**If you are using a version older than React Spectrum v3 on the same page, you must update to the latest version.** See the Adobe internal documentation for more details.

## v0.6.0

### New Components
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-aria/autocomplete/docs/useAutocomplete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {InlineAlert, Content, Heading} from '@adobe/react-spectrum';
---
category: Pickers
keywords: [autocomplete, autosuggest, typeahead, search, aria]
after_version: 3.0.0
preRelease: beta
---

# useAutocomplete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ export default Layout;
import docs from 'docs:@react-stately/autocomplete';
import {ClassAPI, HeaderInfo, FunctionAPI, PageDescription} from '@react-spectrum/docs';
import packageData from '@react-stately/autocomplete/package.json';
import {InlineAlert, Content, Heading} from '@adobe/react-spectrum';

---
category: Pickers
keywords: [autocomplete, state]
after_version: 3.0.0-alpha.0
preRelease: beta
---

# useAutocompleteState
Expand All @@ -28,6 +29,11 @@ after_version: 3.0.0-alpha.0
packageData={packageData}
componentNames={['useAutocompleteState']} />

<InlineAlert variant="notice" marginTop={60}>
<Heading>Under construction</Heading>
<Content>This hook is in <strong>beta</strong>. More documentation is coming soon!</Content>
</InlineAlert>

## API

<FunctionAPI function={docs.exports.useAutocompleteState} links={docs.links} />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading