Skip to content

Commit 8dc316a

Browse files
committed
remove isPublic indication in components in uilib docs
1 parent f1462c6 commit 8dc316a

File tree

3 files changed

+29
-32
lines changed

3 files changed

+29
-32
lines changed

uilib-docs/gatsby-config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ module.exports = {
1515
path: `${__dirname}/../src/components/`
1616
}
1717
},
18-
{
19-
resolve: 'gatsby-source-filesystem',
20-
options: {
21-
path: `${__dirname}/../src/incubator/`
22-
}
23-
},
18+
// {
19+
// resolve: 'gatsby-source-filesystem',
20+
// options: {
21+
// path: `${__dirname}/../src/incubator/`
22+
// }
23+
// },
2424
{
2525
resolve: `gatsby-source-filesystem`,
2626
options: {

uilib-docs/gatsby-node.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ exports.createPages = ({graphql, boundActionCreators}) => {
2020
edges {
2121
node {
2222
displayName
23-
isPublic
2423
docblock
2524
description {
2625
text
@@ -53,7 +52,7 @@ exports.createPages = ({graphql, boundActionCreators}) => {
5352

5453
result.data.allComponentMetadata.edges.map(({node}) => {
5554
createPage({
56-
path: `/docs/${node.isPublic ? 'public/' : ''}${node.displayName}`,
55+
path: `/docs/${node.displayName}`,
5756
component: path.resolve('./src/templates/component.js'),
5857
context: {
5958
// Data passed to context is available in page queries as GraphQL variables.
@@ -67,26 +66,27 @@ exports.createPages = ({graphql, boundActionCreators}) => {
6766
});
6867
};
6968

70-
exports.setFieldsOnGraphQLNodeType = ({type}) => {
71-
if (type.name === 'ComponentMetadata') {
72-
const componentsByGroups = _.groupBy(type.nodes, 'displayName');
73-
_.forEach(componentsByGroups, group => {
74-
// has public origin
75-
if (group.length === 2) {
76-
publicComponentsIds.push(_.last(group).id);
77-
}
78-
});
69+
// We don't need this in public docs
70+
// exports.setFieldsOnGraphQLNodeType = ({type}) => {
71+
// if (type.name === 'ComponentMetadata') {
72+
// const componentsByGroups = _.groupBy(type.nodes, 'displayName');
73+
// _.forEach(componentsByGroups, group => {
74+
// // has public origin
75+
// if (group.length === 2) {
76+
// publicComponentsIds.push(_.last(group).id);
77+
// }
78+
// });
7979

80-
return {
81-
isPublic: {
82-
type: GraphQLBoolean,
80+
// return {
81+
// isPublic: {
82+
// type: GraphQLBoolean,
8383

84-
resolve: source => {
85-
return _.includes(publicComponentsIds, source.id);
86-
},
87-
},
88-
};
89-
}
84+
// resolve: source => {
85+
// return _.includes(publicComponentsIds, source.id);
86+
// },
87+
// },
88+
// };
89+
// }
9090

91-
return {};
92-
};
91+
// return {};
92+
// };

uilib-docs/src/components/Navbar.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ class Navbar extends Component {
5555
<li key={index}>
5656
<Link
5757
key={component.node.displayName}
58-
to={`/docs/${component.node.isPublic ? 'public/' : ''}${
59-
component.node.displayName
60-
}/`}
58+
to={`/docs/${component.node.displayName}/`}
6159
>
6260
{component.node.displayName}
6361
{component.node.isPublic && <span className="public">public</span>}
@@ -79,7 +77,6 @@ class Navbar extends Component {
7977
edges {
8078
node {
8179
displayName
82-
isPublic
8380
}
8481
}
8582
}

0 commit comments

Comments
 (0)