Skip to content

Commit

Permalink
Semantic structure dataset tab (#220)
Browse files Browse the repository at this point in the history
* Semantic structure dataset tab

* Update dataset tab

* Set const id for wrapper for all dataset sections - use in callback to build layout

* Undelete dataset tab code
  • Loading branch information
tilen1976 authored Mar 13, 2024
1 parent c1d9646 commit 262cf17
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/datadoc/frontend/components/dataset_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import dash_bootstrap_components as dbc
import ssb_dash_components as ssb
from dash import html

from datadoc.frontend.components.builders import build_ssb_styled_tab
Expand All @@ -12,6 +13,7 @@
from datadoc.frontend.fields.display_dataset import DisplayDatasetMetadata

DATASET_METADATA_INPUT = "dataset-metadata-input"
SECTION_WRAPPER_ID = "section-wrapper-id"


def build_dataset_metadata_accordion_item(
Expand Down Expand Up @@ -89,3 +91,29 @@ def build_dataset_tab() -> dbc.Tab:
],
),
)


def build_new_dataset_tab() -> dbc.Tab:
"""Build the Dataset metadata tab."""
return build_ssb_styled_tab(
"Datasett",
html.Article(
[
html.Header(
[
ssb.Title(
"Datasett detaljer",
size=2,
className="dataset-title",
),
],
className="dataset-header",
),
html.Article(
id=SECTION_WRAPPER_ID,
className="main-content",
),
],
className="dataset-page-wrapper",
),
)

0 comments on commit 262cf17

Please sign in to comment.