Skip to content

Commit

Permalink
refactor: make content collapsable
Browse files Browse the repository at this point in the history
ING-3963
  • Loading branch information
morch23mj authored and Kate-Lyndegaard committed Sep 19, 2023
1 parent 9a5e9cd commit 6420941
Show file tree
Hide file tree
Showing 4 changed files with 4,951 additions and 12 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ When new documents are added, they won't appear in the sidebar until they are ad
### Generate Translations
When new content is added, whether in `docs` folder or elsewhere, run `npm run docusaurus write-translations -- --locale [locale]` to generate translation entries from the new content. Fill those generated entries with the correct translations for that given locale.

### Useful Components
#### Collapsable Sections
Any content can be made collapsable with the help of the `details` HTML element. Wrap whatever content as follows:

```
<details>
<summary>Title for the collapsed section</summary>
[content goes here]
</details>
```
Note: the feature was discovered through a SO post [here](https://stackoverflow.com/questions/60827828/docusaurus-v2-collapsible-section-in-markdown). ([demo here](https://gist.github.com/joyrexus/16041f2426450e73f5df9391f7f7ae5f))

<hr/>

# Technical Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ Every category has a list of field objects. Every field object describes how the
* **enumValues** The field contains the values that can be entered via a dropdown menu for that metadata field.
* **targets:** This is a list with mapping rules to external services, such as metadata catalogues. By default, there should always be at least a ```bsp``` target defined. ```bsp``` is what hale»connect needs in order to publish services

The following paths can be used for the ```name``` and ```target``` fields, the xpaths to the metadata elements are provided here for reference:
The following paths can be used for the ```name``` and ```target``` fields. The xpaths to the metadata elements are provided here for reference:

<details>
<summary>XPath references</summary>

* md-dataset.citation.title
<br/>XPATH /gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString
Expand Down Expand Up @@ -196,9 +199,65 @@ The following paths can be used for the ```name``` and ```target``` fields, the
* md-dataset.referenceSystemInfoCode
<br/>XPATH /gmd:MD_Metadata/gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString

</details>

<details>
<summary>Example configuration excerpt</summary>

```json

[
{
"categoryName": "general",
"title": "Allgemeine Angaben",
"name": "general",
"fields": [
{
"name": "md-dataset.citation.title",
"required": true,
"minOccurs": 1,
"maxOccurs": 1,
"comment": "ISO 3.2.1 #360",
"label": "Datensatz-Titel",
"description": "Bezeichnung, unter der der Datensatz bekannt ist",
"type": "string",
"schema": null,
"defaultValue": null,
"autofillRule": "{{dataset.name}}",
"editable": true,
"targets": {
"bsp": "md-dataset.citation.title"
}
},
{
"name": "md-dataset.identification.abstract",
"required": true,
"minOccurs": 1,
"maxOccurs": 1,
"comment": "ISO B2.2.1 #24",
"label": "Kurzbeschreibung Datensatz",
"description": "kurze, beschreibende Zusammenfassung des Datensatzes",
"type": "string",
"schema": null,
"defaultValue": null,
"autofillRule": null,
"editable": true,
"targets": {
"bsp": "md-dataset.identification.abstract"
}
}
]
}
]

```

</details>

#### Example configuration excerpt
<details>
<summary>Example configuration (detailed)</summary>

```json
[
{
"categoryName": "dataset_general",
Expand Down Expand Up @@ -2531,6 +2590,8 @@ The following paths can be used for the ```name``` and ```target``` fields, the
]
}
]
```
</details>


### Working with Enumeration Fields
Expand Down
Loading

0 comments on commit 6420941

Please sign in to comment.