-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23520 from sookmax/prioritize-id-over-title-docs
Autodocs: Prioritize `Meta.id` over `Meta.title` for ids of docs pages
- Loading branch information
Showing
6 changed files
with
139 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
code/lib/core-server/src/utils/__mockdata__/docs-id-generation/A.stories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Stories for a component with meta.id | ||
const component = {}; | ||
export default { | ||
id: 'my-component-A', | ||
component, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export const StoryOne = {}; |
7 changes: 7 additions & 0 deletions
7
code/lib/core-server/src/utils/__mockdata__/docs-id-generation/B.docs.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as Stories from './B.stories'; | ||
|
||
<Meta of={Stories} /> | ||
|
||
# Docs with of | ||
|
||
hello docs |
8 changes: 8 additions & 0 deletions
8
code/lib/core-server/src/utils/__mockdata__/docs-id-generation/B.stories.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Stories for a component with meta.id | ||
const component = {}; | ||
export default { | ||
id: 'my-component-B', | ||
component, | ||
}; | ||
|
||
export const StoryOne = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters