Skip to content

Refactor components and stories #2852

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

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
de20f0e
refactor(Autocomplete): moved story
agreenberry Feb 1, 2023
df8c56c
test: update snapshot
agreenberry Feb 1, 2023
1c7f885
refactor(ActionMenu): part 1
agreenberry Feb 1, 2023
080d0cf
refactor(ActionMenu): collect files
agreenberry Feb 1, 2023
587088c
refactor: moved private variables into folder
agreenberry Feb 1, 2023
e11b180
refactor(AvatarStack): consolidate into folder
agreenberry Feb 1, 2023
b440e6c
refactor: dangling private refactor
agreenberry Feb 1, 2023
0acc991
refactor(AnchoredOverlay): consolidate in folder
agreenberry Feb 1, 2023
6ae0a21
refactor(ToggleSwitch): consolidated into folder
agreenberry Feb 1, 2023
9e5a565
refactor(RadioGroup): consolidated into folder
agreenberry Feb 1, 2023
3c0415e
refactor(CheckboxGroup): consolidate to folder
agreenberry Feb 1, 2023
cc97a2f
Update generated/components.json
green6erry Feb 1, 2023
c2b7d78
refactor(Pagination): moved tests
agreenberry Feb 1, 2023
8958896
Merge branch 'refactor-components-and-stories' of github.com:primer/r…
agreenberry Feb 1, 2023
9f373d3
refactor(ActionList): move test
agreenberry Feb 1, 2023
c658def
refactor(ActionMenu): move test
agreenberry Feb 1, 2023
22f931d
refactor(AnchoredOverlay): move test
agreenberry Feb 1, 2023
295f02f
refactor(hooks): move test
agreenberry Feb 1, 2023
931ae4e
refactor(hooks): move test
agreenberry Feb 1, 2023
595543e
refactor(Pagination): remove old snapshot
agreenberry Feb 1, 2023
c134b4b
refactor: moved mostly stories into individual component folder
agreenberry Feb 2, 2023
82181e8
refactor: moves tests into individual component folders
agreenberry Feb 2, 2023
ca1b31a
chore: added changeset
agreenberry Feb 2, 2023
1ecd858
Merge remote-tracking branch 'origin/main' into refactor-components-a…
agreenberry Feb 2, 2023
dde93c4
Update generated/components.json
green6erry Feb 2, 2023
f41aeea
chore: update snapshots
agreenberry Feb 2, 2023
b6a9522
Merge branch 'refactor-components-and-stories' of github.com:primer/r…
agreenberry Feb 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/little-pillows-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Refactores stories and tests into folders
2 changes: 1 addition & 1 deletion docs/content/drafts/InlineAutocomplete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ storybook: '/react/storybook?path=/story/components-forms-inlineautocomplete--de
import data from '../../../src/drafts/InlineAutocomplete/InlineAutocomplete.docs.json'

```js
import {InlineAutocomplete} from '@primer/react/drafts'
import {InlineAutocomplete} from '@primer/react/src/drafts'
```

The `InlineAutocomplete` component extends an `Input` or `Textarea` component to provide inline suggestions, similar to those provided by a code editor.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/drafts/MarkdownEditor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ storybook: '/react/storybook?path=/story/components-forms-markdowneditor--defaul
import data from '../../../src/drafts/MarkdownEditor/MarkdownEditor.docs.json'

```js
import {MarkdownEditor} from '@primer/react/drafts'
import {MarkdownEditor} from '@primer/react/src/drafts'
```

`MarkdownEditor` is a full-featured editor for GitHub Flavored Markdown, with support for:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/drafts/MarkdownViewer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Displays rendered Markdown and facilitates interaction.
import data from '../../../src/drafts/MarkdownViewer/MarkdownViewer.docs.json'

```js
import {MarkdownViewer} from '@primer/react/drafts'
import {MarkdownViewer} from '@primer/react/src/drafts'
```

The `MarkdownViewer` displays rendered Markdown and handles interaction (link clicking and checkbox checking/unchecking) with that content.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/drafts/PageHeader.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ source: https://github.com/primer/react/tree/main/src/PageHeader
storybook: '/react/storybook/?path=/story/drafts-components-pageheader--playground'
---

import data from '../../../src/PageHeader/PageHeader.docs.json'
import data from '@primer/react/src/PageHeader/PageHeader.docs.json'

```js
import {PageHeader} from '@primer/react/drafts'
import {PageHeader} from '@primer/react/src/PageHeader'
```

## Examples
Expand Down
8 changes: 4 additions & 4 deletions docs/content/drafts/UnderlineNav2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ source: https://github.com/primer/react/tree/main/src/UnderlineNav2
storybook: '/react/storybook/?path=/story/drafts-components-underlinenav--playground'
---

import data from '../../../src/UnderlineNav2/UnderlineNav2.docs.json'
import data from '@primer/react/src/UnderlineNav2/UnderlineNav2.docs.json'

```js
import {UnderlineNav} from '@primer/react/drafts'
import {UnderlineNav} from '@@primer/react/src/UnderlineNav2'
```

## Examples
Expand Down Expand Up @@ -107,7 +107,7 @@ render(<Navigation />)

```jsx
import {Link, useMatch, useResolvedPath} from 'react-router-dom'
import {UnderlineNav} from '@primer/react/drafts'
import {UnderlineNav} from '@primer/react/src/UnderlineNav2'

function UnderlineNavItem({to, children, ...rest}) {
const resolved = useResolvedPath(to)
Expand Down Expand Up @@ -139,7 +139,7 @@ const Navigation = () => {
```jsx
import {useRouter} from 'next/router'
import Link from 'next/link'
import {UnderlineNav} from '@primer/react/drafts'
import {UnderlineNav} from '@primer/react/src/UnderlineNav2'

function UnderlineNavItem({href, children, ...rest}) {
const router = useRouter()
Expand Down
Loading