Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
83 changes: 81 additions & 2 deletions .changeset/smooth-cameras-prove.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
---
"@primer/react": major
'@primer/react': major
---

Move deprecated components to deprecated folder
## ⚠️ Deprecations

### SelectMenu

`SelectMenu` has been deprecated. Please use `ActionMenu` instead.

<table>
<tr>
<th> Before </th> <th> After </th>
</tr>
<tr>
<td valign="top">

```jsx
// import {SelectMenu} from '@primer/react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are imports intentionally commented out?


<SelectMenu>
<Button as="summary">Projects</Button>
<SelectMenu.Modal>
<SelectMenu.Header>Projects</SelectMenu.Header>
<SelectMenu.List>
<SelectMenu.Item href="#">Primer React bugs</SelectMenu.Item>
<SelectMenu.Item href="#">Primer React roadmap</SelectMenu.Item>
<SelectMenu.Item href="#">Project 3</SelectMenu.Item>
<SelectMenu.Item href="#">Project 4</SelectMenu.Item>
</SelectMenu.List>
</SelectMenu.Modal>
</SelectMenu>
```

</td>
<td valign="top">

```jsx
// import {ActionMenu, ActionList} from '@primer/react';

<ActionMenu>
<ActionMenu.Button>Projects</ActionMenu.Button>
<ActionMenu.Overlay>
<ActionList showDividers>
<ActionList.Group title="Projects">
<ActionList.Item>Primer React bugs</ActionList.Item>
<ActionList.Item>Primer React roadmap</ActionList.Item>
<ActionList.Item>Project three</ActionList.Item>
<ActionList.Item>Project four</ActionList.Item>
</ActionList.Group>
</ActionList>
</ActionMenu.Overlay>
</ActionMenu>
```

</td>
</tr>
</table>

See [https://primer.style/react/ActionMenu](https://primer.style/react/ActionMenu) for more migration examples.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointing at the old ActionMenu for now, but once this is merged, this should be the correct one 🤞


### Dropdown

TODO

### Flex

TODO

### Grid

TODO

### BorderBox

TODO

### BorderBox

TODO

### Position

TODO
2 changes: 1 addition & 1 deletion docs/content/deprecated/Dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ status: Deprecated

## Deprecation

Use [DropdownMenu](/DropdownMenu) instead.
Use [ActionMenu](/ActionMenu) instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


---

Expand Down
6 changes: 6 additions & 0 deletions docs/content/deprecated/SelectMenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ title: SelectMenu
status: Deprecated
---

## Deprecation

Use [ActionMenu](/ActionMenu) instead.

---

The `SelectMenu` components are a suite of components which can be combined together to make several different variations of our GitHub select menu. At it's most basic form, a select menu is comprised of a `SelectMenu` wrapper, which contains a `summary` component of your choice and a `Select.Modal` which contains the select menu content. Use `SelectMenu.List` to wrap items in the select menu, and `SelectMenu.Item` to wrap each item.

Several additional components exist to provide even more functionality: `SelectMenu.Header`, `SelectMenu.Filter`, `SelectMenu.Tabs`, `SelectMenu.TabPanel` `SelectMenu.Footer` and `SelectMenu.Divider`.
Expand Down
Loading