Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v35 component doc page fixes #1942

Merged
merged 59 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fdd6915
prepare integration branch
rezrah Feb 21, 2022
4a0cc23
Merge branch 'main' into next/v35.0.0
siddharthkp Feb 23, 2022
ff7da70
Merge branch 'main' into next/v35.0.0
colebemis Feb 23, 2022
94034e3
Merge branch 'main' into next/v35.0.0
rezrah Feb 23, 2022
8cd1243
Move deprecated components to deprecated folder (#1881)
pksjce Feb 24, 2022
310e655
Prefix component with types exported from ActionList2 and ActionMenu2…
siddharthkp Feb 24, 2022
df75752
Export PageLayout from main bundle (#1882)
colebemis Feb 24, 2022
6fc788f
Merge branch 'main' into next/v35.0.0
colebemis Feb 24, 2022
14bd580
Update release notes and add deprecation notices for SelectMenu and D…
rezrah Feb 25, 2022
f366604
Deprecate ActionMenu v1 & Promote drafts/ActionMenu v2 (#1895)
siddharthkp Feb 25, 2022
c5c4b92
Revert "Deprecate ActionMenu v1 & Promote drafts/ActionMenu v2 (#189…
siddharthkp Feb 25, 2022
17ef5ef
Deprecate ActionList v1 & Promote drafts/ActionList v2 (#1893)
siddharthkp Feb 25, 2022
d402357
Deprecate ActionMenu v1 & Promote drafts/ActionMenu v2 (#1897)
siddharthkp Feb 25, 2022
09f87c5
Merge branch 'main' into next/v35.0.0
siddharthkp Feb 25, 2022
87889b5
Merge branch 'main' of github.com:primer/react into next/v35.0.0
rezrah Feb 28, 2022
d6d1ca4
Deprecate DropdownMenu v1 + Remove DropdownMenu v2 (#1898)
siddharthkp Feb 28, 2022
64b8f88
Fix code examples in changeset (#1901)
siddharthkp Feb 28, 2022
05e54ca
Merge remote-tracking branch 'origin/main' into next-major
colebemis Feb 28, 2022
b51ea3b
Update .changeset/deprecate-actionlistv1-promote-actionlistv2.md
colebemis Feb 28, 2022
a8a3de1
Add linebreaks to changesets
colebemis Feb 28, 2022
61404ae
Button deprecation (#1908)
pksjce Mar 1, 2022
f94dcd3
Deprecate components replaced by FormControl (#1888)
mperrotti Mar 1, 2022
363bb07
fix merge conflicts with main
rezrah Mar 1, 2022
4babf20
Revert "fix merge conflicts with main"
rezrah Mar 1, 2022
d61b28a
Deprecate ChoiceFieldset and ChoiceInputField (#1900)
mperrotti Mar 1, 2022
e9b81fa
Deprecate legacy Label component (#1889)
mperrotti Mar 1, 2022
5b18a97
Move remaining deprecated components to src/deprecated (#1917)
siddharthkp Mar 2, 2022
4d4163c
Various fixes for v35 (#1916)
rezrah Mar 2, 2022
6cc86b2
Create changeset-for-1917.md (#1919)
siddharthkp Mar 2, 2022
561aad8
Add align prop on ActionMenu.Overlay to pass through to AnchoredOverl…
siddharthkp Mar 7, 2022
b1d7b8c
ActionMenu.Button: Fix spacing between text and caret (#1922)
siddharthkp Mar 7, 2022
a88749a
Update ActionMenu docs (#1931)
siddharthkp Mar 7, 2022
a98091c
Button: Update active styles + use them for aria-expanded (#1915)
siddharthkp Mar 8, 2022
1c38f84
merge main and resolve conflicts
rezrah Mar 8, 2022
41dd547
fix broken test following main merging conflict resolution
rezrah Mar 8, 2022
33da6a0
Fixes for v35 (#1934)
rezrah Mar 8, 2022
f235c3c
v35: Remove type aliases for ActionList (#1937)
siddharthkp Mar 8, 2022
7d3021e
Next major changeset edits (#1939)
colebemis Mar 9, 2022
8959aeb
Fixes for v35 (#1938)
rezrah Mar 9, 2022
2868c21
Merge branch 'main' into next-major
rezrah Mar 9, 2022
002e9cf
add missing fragments to changesets (#1940)
rezrah Mar 9, 2022
16a5d17
Update changeset examples (#1941)
colebemis Mar 9, 2022
4f07696
Fix table in changeset
colebemis Mar 9, 2022
6bb44c4
Add missing comma
colebemis Mar 9, 2022
f69a6d0
Fix grid changeset
colebemis Mar 9, 2022
8675cd8
Update button changeset
colebemis Mar 9, 2022
71cdb3f
rms deprecated components and layout tweaks
mperrotti Mar 9, 2022
bb88426
updates snaps
mperrotti Mar 9, 2022
7e43360
adds changeset
mperrotti Mar 9, 2022
287cebb
Merge branch 'main' into mp/fix-v35-broken-docs
mperrotti Mar 9, 2022
06a87c3
Merge branch 'main' into mp/fix-v35-broken-docs
colebemis Mar 9, 2022
8deef5d
Update title and componentId of deprecated components
colebemis Mar 9, 2022
130f534
Add missing component ids
colebemis Mar 9, 2022
c32203f
Remove link button docs
colebemis Mar 9, 2022
d28372f
Update dialog props
colebemis Mar 9, 2022
2b1073f
Update nav.yml
colebemis Mar 9, 2022
d762c89
Update live code scope
colebemis Mar 9, 2022
721cbb2
Merge branch 'main' into mp/fix-v35-broken-docs
mperrotti Mar 15, 2022
1c9e349
Merge branch 'main' into mp/fix-v35-broken-docs
mperrotti Mar 16, 2022
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
5 changes: 5 additions & 0 deletions .changeset/seven-hornets-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Adds button element selector to FilteredSearch button styles
1 change: 1 addition & 0 deletions docs/content/CheckboxGroup.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: CheckboxGroup
componentId: checkbox_group
description: Renders a set of checkboxes to let users make one or more selections from a short list of options
status: Alpha
source: https://github.com/primer/react/blob/main/src/CheckboxGroup/CheckboxGroup.tsx
Expand Down
7 changes: 4 additions & 3 deletions docs/content/Dialog2.mdx → docs/content/Dialog.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Dialog v2
title: Dialog
componentId: dialog
status: Alpha
---

Expand Down Expand Up @@ -53,7 +54,7 @@ By default, the Dialog component implements the design and interactions defined
<>
<Button onClick={openDialog}>Open</Button>
{isOpen && (
<Dialog2
<Dialog
title="Dialog example"
subtitle={
<>
Expand All @@ -64,7 +65,7 @@ By default, the Dialog component implements the design and interactions defined
onClose={closeDialog}
>
<Text fontFamily="sans-serif">Some content</Text>
</Dialog2>
</Dialog>
)}
</>
)
Expand Down
18 changes: 10 additions & 8 deletions docs/content/FilteredSearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ The FilteredSearch component helps style a Dropdown and a TextInput side-by-side

```jsx live
<FilteredSearch>
<Dropdown>
<Dropdown.Button>Filter</Dropdown.Button>
<Dropdown.Menu direction="sw">
<Dropdown.Item>Item 1</Dropdown.Item>
<Dropdown.Item>Item 2</Dropdown.Item>
<Dropdown.Item>Item 3</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<ActionMenu>
<ActionMenu.Button as="summary">Filter</ActionMenu.Button>
<ActionMenu.Overlay>
<ActionList direction="sw">
<ActionList.Item>Item 1</ActionList.Item>
<ActionList.Item>Item 2</ActionList.Item>
<ActionList.Item>Item 3</ActionList.Item>
</ActionList>
</ActionMenu.Overlay>
</ActionMenu>
<TextInput icon={SearchIcon} />
</FilteredSearch>
```
Expand Down
1 change: 1 addition & 0 deletions docs/content/IconButton.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: IconButton
componentId: icon_button
status: Alpha
source: https://github.com/primer/react/tree/main/src/Button2
storybook: '/react/storybook?path=/story/composite-components-button2'
Expand Down
107 changes: 0 additions & 107 deletions docs/content/LinkButton.mdx

This file was deleted.

1 change: 1 addition & 0 deletions docs/content/PageLayout.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: PageLayout
componentId: page_layout
status: Alpha
# description: TODO
source: https://github.com/primer/react/tree/main/src/PageLayout
Expand Down
6 changes: 3 additions & 3 deletions docs/content/Popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {Popover} from '@primer/react'

```jxs live
<Box position="relative">
<Text textAlign="center" display="block">
<ButtonPrimary>Hello!</ButtonPrimary>
</Text>
<Box justifyContent="center" display="flex">
<Button variant="primary">Hello!</Button>
</Box>

<Popover relative open={true} caret="top">
<Popover.Content sx={{mt: 2}}>
Expand Down
1 change: 1 addition & 0 deletions docs/content/RadioGroup.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: RadioGroup
componentId: radio_group
description: Renders a set of radio inputs to let users make a single selection from a short list of options
status: Alpha
source: https://github.com/primer/react/blob/main/src/RadioGroup/RadioGroup.tsx
Expand Down
4 changes: 2 additions & 2 deletions docs/content/SelectPanel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function DemoComponent() {
return (
<SelectPanel
renderAnchor={({children, 'aria-labelledby': ariaLabelledBy, ...anchorProps}) => (
<DropdownButton aria-labelledby={` ${ariaLabelledBy}`} {...anchorProps}>
<Button trailingIcon={TriangleDownIcon} aria-labelledby={` ${ariaLabelledBy}`} {...anchorProps}>
{children || 'Select Labels'}
</DropdownButton>
</Button>
)}
placeholderText="Filter Labels"
open={open}
Expand Down
30 changes: 16 additions & 14 deletions docs/content/SubNav.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,22 @@ This ensures that the NavLink gets `activeClassName='selected'`
```jsx live
<SubNav aria-label="Main">
<FilteredSearch>
<Dropdown>
<Dropdown.Button>Filter</Dropdown.Button>
<Dropdown.Menu direction="sw">
<Dropdown.Item>
<a href="#">Item 1</a>
</Dropdown.Item>
<Dropdown.Item>
<a href="#">Item 2</a>
</Dropdown.Item>
<Dropdown.Item>
<a href="#">Item 3</a>
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<ActionMenu>
<ActionMenu.Button>Filter</ActionMenu.Button>
<ActionMenu.Overlay>
<ActionList direction="sw">
<ActionList.Item>
<a href="#">Item 1</a>
</ActionList.Item>
<ActionList.Item>
<a href="#">Item 2</a>
</ActionList.Item>
<ActionList.Item>
<a href="#">Item 3</a>
</ActionList.Item>
</ActionList>
</ActionMenu.Overlay>
</ActionMenu>
<TextInput type="search" icon={SearchIcon} width={320} />
</FilteredSearch>
<SubNav.Links>
Expand Down
3 changes: 1 addition & 2 deletions docs/content/deprecated/ActionList.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
componentId: action_list
title: ActionList
title: ActionList (legacy)
status: Deprecated
source: https://github.com/primer/react/tree/main/src/deprecated/ActionList
---
Expand Down
3 changes: 1 addition & 2 deletions docs/content/deprecated/ActionMenu.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
componentId: action_menu
title: ActionMenu
title: ActionMenu (legacy)
status: Deprecated
source: https://github.com/primer/react/tree/main/src/deprecated/ActionMenu.tsx
---
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/BorderBox.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: border_box
title: BorderBox
status: Deprecated
---
Expand Down
3 changes: 1 addition & 2 deletions docs/content/deprecated/Buttons.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
componentId: button
title: Button
title: Button (legacy)
status: deprecated
source: https://github.com/primer/react/blob/main/src/Button
storybook: '/react/storybook?path=/story/composite-components-button--default-button'
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/ChoiceInputField.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: choiceInputField
title: ChoiceInputField
status: Deprecated
description: The ChoiceInputField component is used to render a labelled checkbox or radio inputs with optional hint text.
Expand Down
12 changes: 5 additions & 7 deletions docs/content/deprecated/Dialog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Dialog
title: Dialog (legacy)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think using legacy will add to any confusion about which component we are talking about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If anything, I think it makes it clearer

status: Deprecated
---

## Deprecation

Use [Dialog2](/Dialog2) instead.
Use the [new version of Dialog](/Dialog) instead.

**Before**

Expand All @@ -23,7 +23,7 @@ Use [Dialog2](/Dialog2) instead.
```jsx deprecated
{
open && (
<Dialog2
<Dialog
title="Dialog example"
subtitle={
<>
Expand All @@ -34,13 +34,11 @@ Use [Dialog2](/Dialog2) instead.
onClose={() => setOpen(false)}
>
<Text fontFamily="sans-serif">Some content</Text>
</Dialog2>
</Dialog>
)
}
```

import State from '../../components/State'

The dialog component is used for all modals. It renders on top of the rest of the app with an overlay.

You'll need to manage the `isOpen` state in a wrapper component of your own and pass in a function to be used to close the Dialog. For documentation purposes only we've created a mock `State` to handle this, but you should handle the state in the component you consume `Dialog` in or in a wrapper component.
Expand Down Expand Up @@ -111,7 +109,7 @@ You can also pass any non-text content into the header:
</Text>
<Box display="flex" mt={3} justifyContent="flex-end">
<Button sx={{mr: 1}}>Cancel</Button>
<ButtonDanger>Delete</ButtonDanger>
<Button variant="danger">Delete</Button>
</Box>
</Box>
</Dialog>
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/DropdownMenu.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: dropdown_menu
title: DropdownMenu
status: Deprecated
---
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/Flex.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: flex
title: Flex
status: Deprecated
---
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/FormGroup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: form_group
title: FormGroup
status: Deprecated
---
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/Grid.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: grid
title: Grid
status: Deprecated
---
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/InputField.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: inputField
title: InputField
status: Deprecated
description: The InputField component is used to render a labelled text input and, optionally, associated validation text and hint text.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/deprecated/Label.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Label
title: Label (legacy)
description: Use Label components to add contextual metadata to a design.
status: Deprecated
source: https://github.com/primer/react/blob/main/src/Label.tsx
Expand Down
1 change: 0 additions & 1 deletion docs/content/deprecated/Position.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
componentId: position
title: Position
status: Deprecated
---
Expand Down
Loading