Skip to content

Commit b593514

Browse files
docs: add some documentation
1 parent 4c8c328 commit b593514

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

src/lib/components/composites/paper-components/paper-view/cards/PaperCard.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- Use PaperCardContent elements as children with values according to the tabs props -->
2020
<!--
2121
@component
22-
Paper Card used in the Paper View component.
22+
Paper Card used in the `PaperView` component.
2323
2424
For each tab in the tabs prop, a tab is created with the label and value of the tab.
2525
The children of the PaperCard component are rendered in the content of the tab.

src/lib/components/composites/paper-components/paper-view/cards/PaperCardContent.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<!-- flex cannot be applied to the Tabs.Content element directly, which is why the content is wrapped in another div -->
1414
<!--
1515
@component
16-
Card content used in the Paper Card component.
16+
Card content used in the `PaperCard` component.
1717
1818
Usage:
1919
```svelte

src/lib/components/composites/paper-components/paper-view/cards/PaperDetailsCard.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
<!--
8888
@component
89-
Paper Card for paper details in the Paper View component.
89+
`PaperCard` for displaying the details of a paper in the `PaperView` component.
9090
9191
Usage:
9292
```svelte

src/lib/components/composites/paper-components/paper-view/cards/PaperResearchContextCard.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<!--
2626
@component
27-
Paper Card for review information of a paper in the Paper View component.
27+
`PaperCard` for displaying the review information and forward/backward references of a paper in the `PaperView` component.
2828
2929
Usage:
3030
```svelte

src/lib/components/composites/paper-components/paper-view/cards/ReferencesAndCitationsCardContent.svelte

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
}
3333
</script>
3434

35+
<!--
36+
@component
37+
Card Content for references and citations of a paper, used by `PaperResearchContextCard`.
38+
39+
Usage:
40+
```svelte
41+
<ReferencesAndCitationsCardContent {backwardReferencedPapers} {forwardReferencedPapers} />
42+
```
43+
-->
3544
<section class="flex flex-col h-full gap-5">
3645
<div class="flex h-full overflow-hidden flex-[1_1_0]">
3746
<NamedList

src/lib/components/composites/search-bar/SearchBar.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ so if no further handling exist, all elements are retrieved
5555
by the search.
5656
5757
To limit the amount of calls (if used with backend calls), the search only starts after a
58-
specified timout in which no other events occur. The default for this is 500 ms.
58+
specified timeout in which no other events occur. The default timeout is 500 ms.
5959
6060
Usage:
6161
```svelte

src/lib/filters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { User } from "./model/api/user";
1212
* @returns List of items that match the search text
1313
*/
1414
function filter<T>(items: T[], selector: (item: T) => string, searchText: string) {
15-
// Here we case the items to string[] and selector to Selector<string> because we can't just use a selector
15+
// Here we cast the items to string[] and selector to Selector<string> because we can't just use a selector
1616
// with a generic type. This is weird but it's the only way to make it work.
1717
const fzf = new Fzf(items as string[], {
1818
selector: selector as Selector<string>,

src/lib/model/general.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ function asPaper(paper: Project_Paper | Paper): Paper {
4747
}
4848

4949
export type { ValidationResult, ApiError, ProjectListEntryInterface, PaperListEntryInterface };
50-
export { isProjectPaper, asPaper };
50+
export { asPaper };

0 commit comments

Comments
 (0)