-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change subcategory format (#1026)
* fix: change subcategory format * Fix sidebars * Refactor * Fix implementation * Change format
- Loading branch information
Showing
19 changed files
with
499 additions
and
15,053 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
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
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
29 changes: 22 additions & 7 deletions
29
v1/lib/server/__tests__/__fixtures__/sidebar-subcategories.js
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 |
---|---|---|
@@ -1,11 +1,26 @@ | ||
module.exports = { | ||
docs: { | ||
'First Category': { | ||
'Sub Cat One': ['doc2', 'doc1'], | ||
'Sub Cat Two': ['doc3', 'doc5'], | ||
}, | ||
'Second Category': { | ||
Hello: ['doc4'], | ||
}, | ||
'First Category': ['doc1', 'doc2'], | ||
'Second Category': [ | ||
'doc3', | ||
{ | ||
type: 'subcategory', | ||
label: 'First Subcategory', | ||
ids: ['doc4'], | ||
}, | ||
'doc5', | ||
], | ||
'Third Category': [ | ||
{ | ||
type: 'subcategory', | ||
label: 'Second Subcategory', | ||
ids: ['doc6', 'doc7'], | ||
}, | ||
{ | ||
type: 'subcategory', | ||
label: 'Third Subcategory', | ||
ids: ['doc8'], | ||
}, | ||
], | ||
}, | ||
}; |
Oops, something went wrong.