Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/datasets/relationships.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Relationships

Datasets can store **relationships** to other entities, either other datasets in the same SciCat catalog or entities outside of it, e.g. a [SciLog](https://scilog.readthedocs.io) logbook entry, a journal article (via DOI) or an arXiv preprint. Previously, relationships could only point to other SciCat datasets; the schema was generalized to support external entities too, see [backend PR](https://github.com/SciCatProject/backend/pull/2661).
Datasets can store **relationships** to other entities, either other datasets in the same SciCat catalog or entities outside of it, e.g. a [SciLog](https://github.com/paulscherrerinstitute/scilog/blob/main/README.md) logbook entry, a journal article (via DOI) or an arXiv preprint. Previously, relationships could only point to other SciCat datasets; the schema was generalized to support external entities too, see [backend PR](https://github.com/SciCatProject/backend/pull/2661).

Relationships are displayed on the dataset detail page in a dedicated **Relationships** tab, see [frontend PR](https://github.com/SciCatProject/frontend/pull/2416).

Expand Down Expand Up @@ -28,7 +28,8 @@ If enabled, the dataset detail page shows a **Relationships** tab listing all re

![Relationships tab](img/dataset_relationships_tab.png)

The tab's visibility is controlled by the `datasetRelationshipsEnabled` frontend config key, see the [frontend configuration guide](../frontendconfig/index.md).
## Enabling in the frontend
The tab's visibility is controlled by the `datasetRelationshipsEnabled` frontend config key, see the [frontend configuration guide](../frontendconfig/index.md#dataset-tabs).

## Example usage

Expand Down
29 changes: 19 additions & 10 deletions docs/frontendconfig/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

SciCat's frontend configuration is managed in two configuration file, both served through the backend configuration:

1. Frontend Config: [frontend.config.json](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.config.json) defines the setup of the UI componets. For more information on the Frontedend Config definitions see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/frontend-config/)
1. Frontend Config: [frontend.config.json](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.config.json) defines the setup of the UI componets. For latest version of it, see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/frontend-config/)
2. Frontend Theme Config: [frontend.theme.json](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.theme.json) defines the theming (color, font color etc) of the UI components.

The two frontend configs are served through the backend API so that it can be updated with ease. Adding these configs to the frontend would require a build step everytime the configuration file changed. To find out how to add the frontend configuration files to the backend please see [here](../backendconfig/index.md/#central-configuration-of-backend-env)
The two frontend configs are served through the backend API. Adding these configs to the frontend would require a build step everytime the configuration file changed. To find out how to add the frontend configuration files to the backend please see [here](../backendconfig/index.md/#central-configuration-of-backend-env).


# Default List & Filter Configuration Pattern - Frontend Configuration Guide
## Default List & Filter Configuration Pattern - Frontend Configuration Guide

## Overview
### Overview

This guide explains how to configure the List & Side-Panel Configuration Pattern used on the frontend.
It allows customizing how list-based components (e.g., datasets, proposals) display table columns, side-panel filters, and optional query conditions.

The configuration should be defined or mounted at the location specified by the environment variable `FRONTEND_CONFIG_FILE` (default: `src/config/frontend.config.json`).

## Configuration Details
### Configuration Details

### **Columns**
#### **Dataset Columns**

Defines how each field is displayed in the list table.

Expand All @@ -35,7 +35,7 @@ Defines how each field is displayed in the list table.

---

### **Filters**
#### **Filters**

Defines which filters appear in the side panel and how they behave.

Expand All @@ -49,7 +49,7 @@ Defines which filters appear in the side panel and how they behave.

---

### **Conditions**
#### **Conditions**

Defines predefined condition filter in the side panel (currently supported only for the dataset table)

Expand All @@ -62,6 +62,15 @@ Defines predefined condition filter in the side panel (currently supported only
| `unit` | `string` | **Optional** unit for the value | `"mbar l/s/cm^2"` |
| `unitsOptions`| `string[]`| **Optional** A list of allowed units for this condition. When provided, the unit dropdown will be restricted to only these options | `["mbar l/s/cm^2", "Pa m^3/s/m^2"]`

# Dynamic Dataset Detail Component

The Dynamic Dataset Detail component can be customized to display dataset information in various templates and layouts based on your needs. It is an extra configuration file used in the Frontend Config. For more information on how to set this up please see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/dynamic-dataset-detail-component/)
## Dataset tabs

Several tabs are possible.

### Relationships
The extended relationship tab can be handled by this flag [`datasetRelationshipsEnabled`](https://github.com/SciCatProject/backend/blob/master/src/config/frontend.config.json#L14). It now enables also external references, see also [here](../datasets/relationships.md) .

## Dynamic Dataset Detail Component

The Dynamic Dataset Detail component can be customized to display dataset information in various templates and layouts based on your needs. It is an extra configuration file used in the Frontend Config. For more information on how to set this up please see [here](https://www.scicatproject.org/backend/main/frontend-config-guide/dynamic-dataset-detail-component/).