Skip to content

Releases: MetaSolutionsAB/dataportal-blocks

v0.6.0

Choose a tag to compare

@lokal-profil lokal-profil released this 02 Oct 09:07

Requires an EntryScape Blocks runtime 1.19.1 or later. The metadata
download links are built from mergedMetadataURI, which earlier runtimes do not
provide. No block, parameter or esb* class changes.

Changed

  • The metadata download links serve merged metadata. The RDF/XML, Turtle,
    N-Triples and JSON-LD links in all six infoboxes now include the entry's
    cached external metadata alongside its local metadata.
  • The specification and terminology downloads are recursive. The
    specification infobox's links add recursive=prof, so the download includes
    the specification's resource descriptors; the terminology infobox's add
    recursive=conceptscheme, so it includes the terminology's concepts.

Fixed

  • The terminology infobox's concept count shows only the number. The rest
    of the underlying list, its body and status region, rendered alongside it.

v0.5.7

Choose a tag to compare

@lokal-profil lokal-profil released this 29 Sep 11:51

Requires two new clicks routes to be filled in, dataservice and
datasetSeries. No block, parameter or esb* class changes.

Added

  • Two new clicks routes, dataservice and datasetSeries. Left empty,
    the example link renders but links nowhere. dataservice is the name the
    opendata extension already links data services with, so one host route serves
    both bundles.

Fixed

  • The vanity panel's grunddata example links by its type. Since 0.5.6 the
    example specVanity links can be a data service or a dataset series, but the
    link still followed the dataset route. It now follows dataservice or
    datasetSeries by the example's rdf:type, falling back to dataset.

v0.5.6

Choose a tag to compare

@lokal-profil lokal-profil released this 29 Sep 11:05

The diagram and the application profile's SHACL are now read from their
resource descriptors' prof:hasArtifact. A specification whose SHACL descriptor
conforms only to the legacy SHACL-INSPEC/1.0 URI loses its application
profile until its data is updated. No block, parameter or esb* class changes.

Changed

  • specVanity counts data services and dataset series too, and leaves out
    datasets that belong to a series, so a series counts once. The count can
    therefore differ from what conformantDatasetSearch lists.
  • Reworded NLS strings: spec.conformanceNumberInfo ("Data eller API:er /
    Data och API:er följer denna specifikation.") and
    spec.grunddataConformanceNumberInfo ("nationell grunddata").

Removed

  • The legacy SHACL-INSPEC/1.0 conformance no longer marks a descriptor as
    the application profile; only inspec:SHACL does. Without it,
    specInspectAPButton renders nothing and apView renders no profile.

Fixed

  • The diagram and the application profile load from the descriptor's
    prof:hasArtifact
    , falling back to the descriptor's URI. diagramImage and
    apView were given the descriptor's urn:uuid: instead of the file, and
    window.esbBlocks.diagram now resolves uri to the file as well.

v0.5.5

Choose a tag to compare

@lokal-profil lokal-profil released this 23 Sep 14:44

Requires one new clicks route to be filled in, conformantDatasetSearch, for
the specification page's new link to its conforming datasets. No block or
parameter is renamed or removed, no esb* class is added, and no existing
selector stops matching.

Added

  • A button from the specification's vanity panel to its conforming
    datasets.
    When any dataset conforms to the specification, the specVanity
    panel ends with a "Visa hela listan" / "Show the whole list" link carrying
    esbLinkButton esbShowAllLink, the same classes as the show-all buttons under
    the terminology and data vocabulary lists. With no conforming datasets the
    panel renders as before, without it. The label is the new NLS key
    spec.allConformantDatasets. specView embeds the panel, so it shows the
    button too.
  • A new clicks route, conformantDatasetSearch: the dataset search that
    button reaches. Like the *Search routes it has to arrive filtered on the
    specification, so it is normally written as an esb: template over the
    specification's resource URI. Left empty, the button still renders but links
    nowhere. All clicks are described in src/README.md.

v0.5.4

Choose a tag to compare

@lokal-profil lokal-profil released this 10 Sep 05:50

Adds one esb* class, esbCount, inside the eight section headings that carry
a count, and the bundle's first host-facing JavaScript,
window.esbBlocks.diagram. No block or parameter is renamed or removed, and no
existing selector stops matching; the one visible change is that the application
profile page no longer draws the renderer's corner flag.

Added

  • The specification diagram is published as a promise,
    window.esbBlocks.diagram(specURI), for a host that renders the diagram itself
    rather than mounting diagramImage. It resolves with { entry, uri }, or
    null when there is no diagram. A block has to resolve it, so a page mounting
    none of diagramImage, specInspectAPButton or apView leaves it pending.
    Described under "Host-facing JS API" in src/README.md.
  • A new esb* class, esbCount: a <span> around the count in the eight
    section headings that carry one, across the terminology, data vocabulary and
    specification pages. It holds the bare number in the specification's four
    headings, the whole count phrase in the other four.
  • Two new parameters on apView, marginFlag (false) and tocControls
    (true) — data-entryscape-margin-flag and data-entryscape-toc-controls at
    the mount point. They reach the rdforms-specs renderer's corner flag and its
    ToC hide/jump controls, neither reachable from the mount node before.
    tocControls defaults to what the renderer already did; marginFlag does not
    (below).

Changed

  • The application profile page hides the renderer's corner flag. apView
    passes marginFlag now, defaulting to false, where 0.5.3 passed nothing and
    the renderer drew it; data-entryscape-margin-flag="true" brings it back. A
    host hiding the flag in its own CSS should drop that rule: it left the 26px
    gutter reserved, and an !important there vetoes marginFlag="true".
  • The eight heading strings carry markup. They were plain text; each now
    holds the esbCount span, in both languages. A host overriding one in
    config.nls has to carry the span along, and one reusing it elsewhere has to
    render it through a triple-stache — {{nls}} and esb_nls: escape the markup
    and print the tag as text, with no error. The keys are named in src/nls.js;
    the wording is unchanged.

v0.5.3

Choose a tag to compare

@lokal-profil lokal-profil released this 03 Sep 13:29

Requires three new clicks routes to be filled in: the application profile
page's click-through links no longer resolve on class, property and
terminology. Nothing here changes a DOM shape or an esb* class, and no block
or parameter is renamed or removed.

Added

  • Three new clicks routes, classLookup, propertyLookup and
    terminologyLookup: where the application profile page sends a reader who
    follows a referenced class, property or terminology. They stand apart from
    class, property and terminology because the renderer knows only the
    referenced resource's URI, never its entry — it appends ?esc_uri=<uri>,
    so each has to reach a page that resolves an entry from a URI, where a
    namedclick link arrives with esc_entry/esc_context. All clicks are
    described in src/README.md.

Changed

  • The application profile page's click-throughs resolve on those three
    routes
    , rather than on the class, property and terminology routes
    namedclick shares. A host has to fill the new ones in; left empty, each link
    falls back to the referenced resource's own URI instead of reaching the
    portal's page for it.
  • The shape route is dropped. It was reserved for linking between
    application profiles, and nothing read it — rdforms-specs does not emit those
    links. A shapeLookup route takes its place when support lands.

Fixed

  • An unfilled click route on the application profile page no longer renders
    href="undefined".
    The renderer writes whatever it is handed straight into
    the attribute, so a route left empty produced a link to the relative URL
    undefined; such links now carry the referenced resource's own URI.

v0.5.2

Choose a tag to compare

@lokal-profil lokal-profil released this 01 Sep 21:33

Requires rdforms-specs 1.7.0 or later: the application profile page now renders
into an element it hands the renderer rather than into the page's own <main>.
Nothing here changes a DOM shape or an esb* class, and no block or parameter is
renamed or removed.

Added

  • A new block, apView: the whole application profile page as one mount
    point, <div data-entryscape="apView"> — the rdforms-specs root, the header,
    the diagram, and the two elements the renderer fills. Parameters: hl (heading
    level of the title, default 1), standAlone (show the back-to-specification
    link, default false), tocId and contentId (ids of the elements the
    renderer fills, defaulting to rdforms-specs-toc and rdforms-specs-content).

Changed

  • apView is the application profile page's entrypoint. The page was
    assembled in the host's own markup — loadAp alongside apTitle, apStatus,
    apDate, apHeaderMetadata, apToSpecButton and diagramImage, with the page
    supplying a <nav> and a <main>. Those blocks still render, but they are
    internal now, and the family stops at apView: there is no apMain,
    apInfobox or apVanity.
  • The renderer is told which elements to fill, rather than taking the first
    <nav> and the first <main> in the document — which on a page carrying its
    own site navigation took that over instead. A page mounted the 0.5.1 way is
    unaffected: with nothing matching the ids, the renderer still falls back to
    searching by tag.

Fixed

  • The application profile page follows the page language. It read
    document.targetLanguage, a global the page had to set for itself; it now uses
    the language the runtime resolved from page_language, like every other block.
  • Its click-through links use the merged clicks. They resolved against the
    first configuration object that declared a clicks map, ignoring every later
    contribution and the !clicks replacement convention; they now use the same
    merged map namedclick resolves against.
  • Its "usage note" label is translatable. It was a fixed English/Swedish pair
    inside the bundle; it is ap.usageNote in config.nls now.

v0.5.1

Choose a tag to compare

@lokal-profil lokal-profil released this 01 Sep 06:25

Changed

  • Every disclosure on the specification page starts open. The "Reused" section
    was the one <details> left closed; it now carries open like the other three. A
    host relying on details:not([open]) to reach it needs re-checking.

Fixed

  • A page's parent link requires the parent to be of the expected type. The
    concept page now requires its terminology (skos:inScheme) to be a
    skos:ConceptScheme, and the class and property pages their data vocabulary
    (rdfs:isDefinedBy) to be an owl:Ontology — in the header and in the infobox.
    The relation resolves by target URI, and a resource descriptor may share its URI
    with the subject it describes, so the link could resolve the RD describing the
    terminology or data vocabulary instead: wrong label, wrong target.
  • The "Explore the AP" button is gated on the specification itself. It rendered
    whenever the spec had an application-profile resource descriptor, so a
    specification that is not an inspec:PROF but tagged its AP resource
    inspec:SHACL still got a button. The specification itself must now conform to
    inspec:PROF as well.

v0.5.0

Choose a tag to compare

@lokal-profil lokal-profil released this 28 Aug 10:57

Breaking: DOM changes that affect downstream selectors

Metadata download links are a row of the infobox <dl>, not a list beside it

The links sat after the <dl>, under their own heading, in an inline list:
<h3> plus <div class="esbRdfLinks esbInlineList esbInlineVerticalList"> holding
four links, each still wrapped in its placeholder <span>. They are now a row
inside the <dl>, in the shape predicateRefList and resourceUriRow already
use: <div class="esbRdfLinks"> containing a <dt> and one <dd> per
serialisation, each <dd> holding a bare <a>.

Four consequences for selectors. esbRdfLinks keeps its name but no longer carries
esbInlineList esbInlineVerticalList, and now marks a <dl> row group rather than
an inline list. The per-link placeholder <span>s are gone, since each rdfLink
is the sole child of its <dd> and mounts into it. The heading is gone from the
page outline — it is a <dt> now, and <dt> may not contain heading content, so
there is no markup-valid way to keep both the row and the heading. And on the
specification page the second <dl>, which was gated on
adms:last,adms:prev,adms:next, now renders unconditionally because it hosts this
row.

rdfLinkList loses its hl parameter accordingly; the six infoboxes no longer
pass hl=(hinc) to it.

The rdfLinks block is renamed rdfLinkList

Block names are global at runtime and are shared with the other bundles the host
page loads. dataportal.se also loads the opendata extension, which defines its own
unrelated rdfLinks (a DCAT-recursive download list), so on a page loading both,
one silently replaced the other. Mounting data-entryscape="rdfLinks" no longer
reaches this bundle's block. The emitted esbRdfLinks class is unaffected by the
rename.

The concept page's broader / narrower / related sections are no longer disclosures

Each was a <details open> whose <summary class="esbSummaryWithHeading"> carried
the section heading. Each is now a plain heading followed by its
esbConceptsInConceptContainer, so that container is a sibling of the heading
rather than a child of <details>, and those three sections no longer emit
esbSummaryWithHeading. The matching-concepts section keeps its disclosure, as do
the terminology, data vocabulary and specification pages.

esbHeadingInSummary is emitted only on headings inside a <summary>

The class was left on eight headings that are not in a <summary>: the concept
page's alternative-labels, broader, narrower and related headings, and the
"introduced in" / "reused in" headings on both the class and property pages. A host
styling .esbHeadingInSummary to reach those section headings needs a different
selector. The twelve headings that really are inside a <summary> are unchanged.

Fixed

  • Standalone section headings get their block layout back. src/style.css gives
    .esbHeadingInSummary display: inline, which is what lets a heading sit beside
    a disclosure triangle. On the eight headings above it collapsed the <hN> to an
    inline box, dropping its default vertical margins — with no other heading rules in
    play, that was the whole of their spacing.

v0.4.0

Choose a tag to compare

@lokal-profil lokal-profil released this 27 Aug 14:04

Breaking: DOM changes that affect downstream selectors

A resource's own URI is a link, not a <code> element

The first row of every *Infobox rendered <dd><code>{{resourceURI}}</code></dd>.
It now renders the URI as a link opening in a new tab, emitted by a new shared
resourceUriRow block: <dd class="esbResourceUri"><a class="esbExtLink" …>. The
<code> element is gone, so a selector reaching for it — or code relying on the
browser's default monospacing — needs .esbResourceUri instead. The link is not
assumed to stay within the portal.

The parent terminology or data vocabulary is linked from the header

Concept, class and property pages now link their parent from the page header: a
concept its terminology (skos:inScheme, esbTerminologyLink), a class or property
its data vocabulary (rdfs:isDefinedBy, esbDatavocLink). The <br/> that
separated the publisher link from the type badge in header is dropped along with
it, so a host that positioned the badge off that line break needs its own rule.
specHeader has its own template and is unaffected.

Link hooks from relatedLink sit on the <a>, not on a wrapper

relatedLink's class parameter is renamed linkClass and reaches the anchor
rather than the wrapping element. esbTerminologyLink, esbDatavocLink and
esbSpecLink previously landed twice — on the <dd> (or the mount <span>) and on
the <a> within it — doubling any ::after icon or boxed styling built on them.
Each appears once now, on the <a>, as esbOrgLink, esbClassLink and
esbConceptLink already did. A selector matching the wrapper (dd.esbDatavocLink)
has to move to the anchor. apRelated's microformats u-url moves with it, onto
the element carrying the href, where a parser expects it.

A resource descriptor's "Role" label is visually hidden

The <dt> for prof:hasRole in the esbResourcesFeatures list carries sr-only,
keeping the label for screen readers without showing it. The bundle does not define
.sr-only; the host stylesheet has to, as it already must for the runtime's own
live regions and for this block's expand-button label.

Breaking: specMain no longer renders the diagram and AP button

specMain opened with diagramImage and specInspectAPButton. Both now sit behind
a new standAlone parameter, default false, so a page that wants them has to ask:
standAlone="true" on specMain, or on specView, which forwards it. This lets a
host lay the two blocks out itself — demo/ap.html already mounts diagramImage
directly — but a host mounting specView and expecting the previous output has to
set the parameter.

Added

  • A new block, resourceUriRow: the shared first row of every *Infobox,
    taking the <dt> wording as dtContent.
  • New esb* classes: esbResourceUri, esbExtLink and esbTerminologyLink.
    All three are described in the README.
  • A new parameter, standAlone, on specMain and specView (above).

Removed

  • relatedLink's class parameter, renamed linkClass (above). At a mount
    point that is data-entryscape-link-class.

Fixed

  • The concept infobox's terminology link carries an esb* class. It emitted a
    bare terminologyLink, outside the convention and undocumented; it is
    esbTerminologyLink now, the class the header's parent link also uses.