Skip to content

Commit

Permalink
docs(core): collapse concepts and recipes (#23219)
Browse files Browse the repository at this point in the history
Collapse the concepts and recipes sections by default

![Screenshot 2024-05-07 at 11 34
05 AM](https://github.com/nrwl/nx/assets/861504/1428c5e9-9c46-4001-b9dc-d06e2efa086d)

(cherry picked from commit f13a960)
  • Loading branch information
isaacplmann authored and FrozenPandaz committed May 9, 2024
1 parent 544a909 commit 3367cc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nx-dev/data-access-menu/src/lib/menu.utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { MenuItem, MenuSection } from '@nx/nx-dev/models-menu';

const COLLAPSIBLE_SECTIONS = ['concepts', 'recipes'];

export function getBasicNxSection(items: MenuItem[]): MenuSection {
return {
id: 'basic',
Expand All @@ -19,7 +21,9 @@ export function getBasicNxSection(items: MenuItem[]): MenuSection {
.map((m) => {
return {
...m,
disableCollapsible: !m.id.endsWith('tutorial'),
disableCollapsible: !COLLAPSIBLE_SECTIONS.some((collapsibleSection) =>
m.id.endsWith(collapsibleSection)
),
};
}),
};
Expand Down

0 comments on commit 3367cc9

Please sign in to comment.