diff --git a/src/lib/components/composites/input/ToggleableInput.svelte b/src/lib/components/composites/input/ToggleableInput.svelte new file mode 100644 index 00000000..6fc53aab --- /dev/null +++ b/src/lib/components/composites/input/ToggleableInput.svelte @@ -0,0 +1,23 @@ + + +
+ {value} +
+ diff --git a/src/lib/components/composites/paper-components/PaperInfo.svelte b/src/lib/components/composites/paper-components/PaperInfo.svelte index c7697640..e60285bb 100644 --- a/src/lib/components/composites/paper-components/PaperInfo.svelte +++ b/src/lib/components/composites/paper-components/PaperInfo.svelte @@ -1,5 +1,6 @@ @@ -41,17 +45,24 @@ Additonally, there are buttons to navigate to the previous or next paper. - when `userConfig.isReviewMode` is false, then no decision buttons are shown - when `userConfig.showMaybeButton` is false, then the maybe button is not shown +Edit Mode: +- in the edit mode, the user can edit the paper details. When the mode is turned off, the details are displayed as read-only. +- when `allowEditModeToggle` is true, then the user can toggle the edit mode +- when `startInEditMode` is true, then the paper details can be edited from the start + Usage: ```svelte ``` --> @@ -61,7 +72,7 @@ Usage:
- +
{#if showButtonBar} diff --git a/src/lib/components/composites/paper-components/paper-view/cards/PaperCard.svelte b/src/lib/components/composites/paper-components/paper-view/cards/PaperCard.svelte index ba997146..a19918ee 100644 --- a/src/lib/components/composites/paper-components/paper-view/cards/PaperCard.svelte +++ b/src/lib/components/composites/paper-components/paper-view/cards/PaperCard.svelte @@ -33,10 +33,10 @@ Usage: ``` --> -
- +
+ - + {@render children()} diff --git a/src/lib/components/composites/paper-components/paper-view/cards/PaperCardContent.svelte b/src/lib/components/composites/paper-components/paper-view/cards/PaperCardContent.svelte index ceff443a..99d7ef6c 100644 --- a/src/lib/components/composites/paper-components/paper-view/cards/PaperCardContent.svelte +++ b/src/lib/components/composites/paper-components/paper-view/cards/PaperCardContent.svelte @@ -22,8 +22,8 @@ Usage: ``` --> - -
+ +
{@render children()}
diff --git a/src/lib/components/composites/paper-components/paper-view/cards/PaperDetailsCard.svelte b/src/lib/components/composites/paper-components/paper-view/cards/PaperDetailsCard.svelte index 01a9b6cf..8bcacb94 100644 --- a/src/lib/components/composites/paper-components/paper-view/cards/PaperDetailsCard.svelte +++ b/src/lib/components/composites/paper-components/paper-view/cards/PaperDetailsCard.svelte @@ -1,11 +1,38 @@ - Will be implemented in #41. +
+

General Information

+ + + {#each infoList as { label, value }} + + + + + {/each} + +
{label} + +
+
+
+

Abstract

+
+ +
+
- Will be implemented in #98. + + Will be implemented in + + #98 + + . +
diff --git a/src/lib/utils.ts b/src/lib/utils.ts index e6447944..5cc360bc 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,6 +1,11 @@ import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; +import type { Author } from "./model/backend"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } + +export function displayAuthors(authors: Author[]) { + return authors.map((author) => `${author.firstName} ${author.lastName}`).join(", "); +} diff --git a/src/routes/paper/[paperId]/+page.svelte b/src/routes/paper/[paperId]/+page.svelte index 8d14d36d..c3fd7e64 100644 --- a/src/routes/paper/[paperId]/+page.svelte +++ b/src/routes/paper/[paperId]/+page.svelte @@ -11,7 +11,7 @@ diff --git a/src/routes/paper/[paperId]/+page.ts b/src/routes/paper/[paperId]/+page.ts index 1179faae..3b801179 100644 --- a/src/routes/paper/[paperId]/+page.ts +++ b/src/routes/paper/[paperId]/+page.ts @@ -10,7 +10,9 @@ export const load: PageLoad = ({ params }) => { doi: "Doi", id: paperId, title: "Field-Sensitive Pointer Analysis for Static Dataflow in the R Programming Language", - abstrakt: "Abstrakt", + abstrakt: `Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent research and experience show, that many of these scripts contain problems. From being hard to comprehend by combining several analyses and plots into a single source file to being non-reproducible, with a lack of analysis tools supporting the writing of correct and maintainable code. Objective In this work, we address the problem of comprehending and maintaining R scripts by proposing flowR, a program slicer and static dataflow analyzer for the R programming language, which can be integrated directly into Visual Studio Code. Given a set of variables of interest, like the generation of a single figure in a script, flowR automatically reduces the program to the parts relevant for the output of interest, like the value of a variable. Method First, we use static program analysis to construct a detailed dataflow graph of the R script. The analysis supports loops, function calls, side effects, sourcing external files, and even redefinitions of R's primitive constructs. Subsequently, we calculate the program slice by solving a reachability problem on the graph, collecting all required parts and presenting them to the user. Results Providing several interactive ways of slicing the program, we require an average of 16 ms to calculate the slice on a given dataflow graph, reducing the code by around 94% of tokens. + +The demonstration video is available at https://youtu.be/Zgq6rnbvvhk. For the full source code and extensive documentation, refer to https://github.com/Code-Inspect/flowr. To try the docker image, use docker run -rm -it eagleoutice/flowr.`, year: 2015, type: "Paper", authors: [ diff --git a/src/routes/project/[projectId]/paper/[paperId]/+page.svelte b/src/routes/project/[projectId]/paper/[paperId]/+page.svelte index 75da62fd..19138851 100644 --- a/src/routes/project/[projectId]/paper/[paperId]/+page.svelte +++ b/src/routes/project/[projectId]/paper/[paperId]/+page.svelte @@ -11,7 +11,8 @@ diff --git a/src/routes/project/[projectId]/paper/[paperId]/+page.ts b/src/routes/project/[projectId]/paper/[paperId]/+page.ts index d6f31cf2..eeb8daa2 100644 --- a/src/routes/project/[projectId]/paper/[paperId]/+page.ts +++ b/src/routes/project/[projectId]/paper/[paperId]/+page.ts @@ -10,7 +10,9 @@ export const load: PageLoad = ({ params }) => { doi: "Doi", id: paperId, title: "Field-Sensitive Pointer Analysis for Static Dataflow in the R Programming Language", - abstrakt: "Abstrakt", + abstrakt: `Context Many researchers rely on the R programming language to perform their statistical analyses and visualizations in the form of R scripts. However, recent research and experience show, that many of these scripts contain problems. From being hard to comprehend by combining several analyses and plots into a single source file to being non-reproducible, with a lack of analysis tools supporting the writing of correct and maintainable code. Objective In this work, we address the problem of comprehending and maintaining R scripts by proposing flowR, a program slicer and static dataflow analyzer for the R programming language, which can be integrated directly into Visual Studio Code. Given a set of variables of interest, like the generation of a single figure in a script, flowR automatically reduces the program to the parts relevant for the output of interest, like the value of a variable. Method First, we use static program analysis to construct a detailed dataflow graph of the R script. The analysis supports loops, function calls, side effects, sourcing external files, and even redefinitions of R's primitive constructs. Subsequently, we calculate the program slice by solving a reachability problem on the graph, collecting all required parts and presenting them to the user. Results Providing several interactive ways of slicing the program, we require an average of 16 ms to calculate the slice on a given dataflow graph, reducing the code by around 94% of tokens. + +The demonstration video is available at https://youtu.be/Zgq6rnbvvhk. For the full source code and extensive documentation, refer to https://github.com/Code-Inspect/flowr. To try the docker image, use docker run -rm -it eagleoutice/flowr.`, year: 2015, type: "Paper", authors: [