Skip to content

Commit b47ceb1

Browse files
authored
docs: S2 docs TODOs for release (#9261)
* fix docs todos * fix SelectBoxGroup JSDoc * show asterisk for required props in props tables * fix marginStart on header logo
1 parent 02b8800 commit b47ceb1

File tree

12 files changed

+26
-34
lines changed

12 files changed

+26
-34
lines changed

packages/@react-spectrum/s2/src/SelectBoxGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export function SelectBox(props: SelectBoxProps): ReactNode {
368368
);
369369
}
370370

371-
/*
371+
/**
372372
* SelectBoxGroup allows users to select one or more options from a list.
373373
*/
374374
export const SelectBoxGroup = /*#__PURE__*/ forwardRef(function SelectBoxGroup<T extends object>(props: SelectBoxGroupProps<T>, ref: DOMRef<HTMLDivElement>) {

packages/dev/s2-docs/pages/react-aria/FocusScope.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ button mounts a FocusScope, which auto focuses the first input inside it. Once o
4242
press the <Keyboard>Tab</Keyboard> key to move within the scope, but focus is contained inside. Clicking the "Close"
4343
button unmounts the focus scope, which restores focus back to the button.
4444

45-
{/* Not implemented yet */}
46-
{/* For a full example of building a modal dialog, see [useDialog](useDialog). */}
45+
For a full example of building a modal dialog, see [useDialog](https://react-spectrum.adobe.com/react-aria/useDialog.html).
4746

4847
```tsx render
4948
'use client';

packages/dev/s2-docs/pages/react-aria/VisuallyHidden.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ let {visuallyHiddenProps} = useVisuallyHidden();
5656

5757
<PropTable links={docs.links} component={docs.exports.VisuallyHidden} />
5858

59-
{/* not implemented yet */}
60-
{/* ## Example
59+
## Example
6160

62-
See [useRadioGroup](useRadioGroup#styling) and [useCheckbox](useCheckbox#styling)
63-
for examples of using `VisuallyHidden` to hide native form elements visually. */}
61+
See [useRadioGroup](https://react-spectrum.adobe.com/react-aria/useRadioGroup.html#styling) and [useCheckbox](https://react-spectrum.adobe.com/react-aria/useCheckbox.html#styling)
62+
for examples of using `VisuallyHidden` to hide native form elements visually.

packages/dev/s2-docs/pages/react-aria/useField.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ The `useField` hook associates a form control with a label, and an optional desc
2626

2727
By default, `useField` assumes that the label is a native HTML `<label>` element. However, if you are labeling a non-native form element, be sure to use an element other than a `<label>` and set the `labelElementType` prop appropriately.
2828

29-
{/* not implemented yet */}
30-
{/* **Note**: Many other React Aria hooks such as [useTextField](useTextField), [useSelect](useSelect), and [useComboBox](useComboBox) already include support for description and error message elements. If you're using one of those hooks, there's no need to use `useField`. */}
29+
**Note**: Many other React Aria hooks such as [useTextField](https://react-spectrum.adobe.com/react-aria/useTextField.html), [useSelect](https://react-spectrum.adobe.com/react-aria/useSelect.html), and [useComboBox](https://react-spectrum.adobe.com/react-aria/useComboBox.html) already include support for description and error message elements. If you're using one of those hooks, there's no need to use `useField`.
3130

3231
## Example
3332

packages/dev/s2-docs/pages/react-aria/useFocusRing.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ If CSS classes are being used for styling, see the [FocusRing](FocusRing) compon
3434
This example shows how to use `useFocusRing` to adjust styling when keyboard focus is on a button.
3535
Specifically, the `outline` property is used to create the focus ring when `isFocusVisible` is true.
3636

37-
{/* Not implemented yet */}
38-
{/* See [useCheckbox](useCheckbox#styling), [useRadioGroup](useRadioGroup#styling), and
39-
[useSwitch](useSwitch#example) for more advanced examples of focus rings with other styling
40-
techniques. */}
37+
See [useCheckbox](https://react-spectrum.adobe.com/react-aria/useCheckbox.html#styling), [useRadioGroup](https://react-spectrum.adobe.com/react-aria/useRadioGroup.html#styling), and
38+
[useSwitch](https://react-spectrum.adobe.com/react-aria/useSwitch.html#example) for more advanced examples of focus rings with other styling
39+
techniques.
4140

4241
```tsx render
4342
'use client';

packages/dev/s2-docs/pages/react-aria/useHover.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ but `:hover` is problematic on touch devices due to mouse emulation in mobile br
3030
and device, `:hover` may never apply, or may apply continuously until the user touches another element.
3131
`useHover` only applies when the pointer is truly capable of hovering, and emulated mouse events are ignored.
3232

33-
{/* TODO: uncomment once we transfer over the blogs to new docs */}
34-
{/* Read our [blog post](/blog/building-a-button-part-2) about the complexities of hover event handling to learn more. */}
33+
Read our [blog post](blog/building-a-button-part-2) about the complexities of hover event handling to learn more.
3534

3635
## Accessibility
3736

packages/dev/s2-docs/pages/react-aria/useKeyboard.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ it can call `event.continuePropagation()` to allow parents to handle the event.
3131

3232
This example shows a simple input element that handles keyboard events with `useKeyboard` and logs them to a list below.
3333

34-
{/* TODO: Components hooks have not been written yet */}
35-
{/* **NOTE: for more advanced text field functionality, see [useTextField](useTextField).** */}
34+
**NOTE: for more advanced text field functionality, see [useTextField](https://react-spectrum.adobe.com/react-aria/useTextField.html).**
3635

3736
```tsx render
3837
"use client"

packages/dev/s2-docs/pages/react-aria/useLabel.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ By default, `useLabel` assumes that the label is a native HTML label element.
5151
However, if you are labeling a non-native form element, be sure to use an
5252
element other than a `<label>` and set the `labelElementType` prop appropriately.
5353

54-
{/* not implemented yet */}
55-
{/* See [useRadioGroup](useRadioGroup#example) and [useTextField](useTextField#example)
56-
for examples of how `useLabel` is used by components. */}
54+
See [useRadioGroup](https://react-spectrum.adobe.com/react-aria/useRadioGroup.html#example) and [useTextField](https://react-spectrum.adobe.com/react-aria/useTextField.html#example)
55+
for examples of how `useLabel` is used by components.
5756

5857
## API
5958

packages/dev/s2-docs/pages/react-aria/useLandmark.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ If an element within a landmark was previously focused before leaving that landm
3939

4040
If multiple landmarks are registered with the same role, they should have unique labels, which can be provided by aria-label or aria-labelledby.
4141

42-
{/* TODO: Not implemented yet */}
43-
{/* For an example of landmarks in use, see the [useToastRegion](useToast#anatomy) documentation. */}
42+
For an example of landmarks in use, see the [useToastRegion](https://react-spectrum.adobe.com/react-aria/useToast.html#anatomy) documentation.
4443

4544
## Example
4645

packages/dev/s2-docs/pages/react-aria/usePress.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ the visual appearance of the target. If the pointer is released over the target,
3434
* Handles canceling press interactions on scroll
3535
* Normalizes many cross browser inconsistencies
3636

37-
{/* TODO: uncomment once blog posts are transferred over */}
38-
{/* Read our [blog post](/blog/building-a-button-part-1) about the complexities of press event handling to learn more. */}
37+
Read our [blog post](blog/building-a-button-part-1) about the complexities of press event handling to learn more.
3938

4039
## Example
4140

@@ -44,8 +43,7 @@ It also uses the `isPressed` state to adjust the background color when the targe
4443
Press down on the target and drag your pointer off and over to see when the events are fired, and try focusing
4544
the target with a keyboard and pressing the <Keyboard>Enter</Keyboard> or <Keyboard>Space</Keyboard> keys to trigger events as well.
4645

47-
{/* Not implemented yet */}
48-
{/* **NOTE: for more advanced button functionality, see [useButton](useButton).** */}
46+
**NOTE: for more advanced button functionality, see [useButton](https://react-spectrum.adobe.com/react-aria/useButton.html).**
4947

5048
```tsx render
5149
"use client";

0 commit comments

Comments
 (0)