Skip to content

Commit

Permalink
add support for ignored events
Browse files Browse the repository at this point in the history
  • Loading branch information
indirectlylit committed Apr 22, 2021
1 parent 91c16b7 commit 0ec8b53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The `DocsPageTemplate` component takes an optional Boolean prop called `apiDocs`

To make updates to this content, modify the library component directly. We support a combination of Markdown and JSDocs inside the components.

JSDocs functionality is provided by the [`vue-docgen-api`](https://www.npmjs.com/package/vue-docgen-api) package. For more information, see [Documenting components](https://vue-styleguidist.github.io/docs/Documenting.html)
JSDocs functionality is primarily provided by the [`vue-docgen-api`](https://www.npmjs.com/package/vue-docgen-api) package. For more information, see [Documenting components](https://vue-styleguidist.github.io/docs/Documenting.html). Note that we leverage a specific subset of the functionality described there. Documenting this is an [open issue](https://github.com/learningequality/kolibri-design-system/issues/222).


### Adding dependencies
Expand Down
12 changes: 11 additions & 1 deletion docs/common/DocsPageTemplate/jsdocs/EventsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(event, i) in api" :key="i">
<tr v-for="(event, i) in publicApi" :key="i">
<td class="first-col">
<code>{{ event.name }}</code>
<DocsAnchorTarget :anchor="`#event:${event.name}`" />
Expand All @@ -36,6 +36,16 @@
required: true,
},
},
computed: {
publicApi() {
return this.api.filter(docItem => {
if (!docItem['tags']) {
return true;
}
return !docItem['tags'].some(tagObj => tagObj['title'] === 'ignore');
});
},
},
};
</script>
Expand Down

0 comments on commit 0ec8b53

Please sign in to comment.