Repository navigation
Releases: MetaSolutionsAB/dataportal-blocks
Release list
v0.6.0
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 addrecursive=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
Requires two new clicks routes to be filled in, dataservice and
datasetSeries. No block, parameter or esb* class changes.
Added
- Two new
clicksroutes,dataserviceanddatasetSeries. Left empty,
the example link renders but links nowhere.dataserviceis 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
examplespecVanitylinks can be a data service or a dataset series, but the
link still followed thedatasetroute. It now followsdataserviceor
datasetSeriesby the example'srdf:type, falling back todataset.
v0.5.6
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
specVanitycounts 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 whatconformantDatasetSearchlists.- 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.0conformance no longer marks a descriptor as
the application profile; onlyinspec:SHACLdoes. Without it,
specInspectAPButtonrenders nothing andapViewrenders no profile.
Fixed
- The diagram and the application profile load from the descriptor's
prof:hasArtifact, falling back to the descriptor's URI.diagramImageand
apViewwere given the descriptor'surn:uuid:instead of the file, and
window.esbBlocks.diagramnow resolvesurito the file as well.
v0.5.5
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, thespecVanity
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.specViewembeds the panel, so it shows the
button too. - A new
clicksroute,conformantDatasetSearch: the dataset search that
button reaches. Like the*Searchroutes it has to arrive filtered on the
specification, so it is normally written as anesb:template over the
specification's resource URI. Left empty, the button still renders but links
nowhere. Allclicksare described insrc/README.md.
v0.5.4
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 mountingdiagramImage. It resolves with{ entry, uri }, or
nullwhen there is no diagram. A block has to resolve it, so a page mounting
none ofdiagramImage,specInspectAPButtonorapViewleaves it pending.
Described under "Host-facing JS API" insrc/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) andtocControls
(true) —data-entryscape-margin-flaganddata-entryscape-toc-controlsat
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.
tocControlsdefaults to what the renderer already did;marginFlagdoes not
(below).
Changed
- The application profile page hides the renderer's corner flag.
apView
passesmarginFlagnow, defaulting tofalse, 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!importantthere vetoesmarginFlag="true". - The eight heading strings carry markup. They were plain text; each now
holds theesbCountspan, in both languages. A host overriding one in
config.nlshas to carry the span along, and one reusing it elsewhere has to
render it through a triple-stache —{{nls}}andesb_nls:escape the markup
and print the tag as text, with no error. The keys are named insrc/nls.js;
the wording is unchanged.
v0.5.3
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
clicksroutes,classLookup,propertyLookupand
terminologyLookup: where the application profile page sends a reader who
follows a referenced class, property or terminology. They stand apart from
class,propertyandterminologybecause 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
namedclicklink arrives withesc_entry/esc_context. Allclicksare
described insrc/README.md.
Changed
- The application profile page's click-throughs resolve on those three
routes, rather than on theclass,propertyandterminologyroutes
namedclickshares. 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
shaperoute is dropped. It was reserved for linking between
application profiles, and nothing read it — rdforms-specs does not emit those
links. AshapeLookuproute 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
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">— therdforms-specsroot, the header,
the diagram, and the two elements the renderer fills. Parameters:hl(heading
level of the title, default1),standAlone(show the back-to-specification
link, defaultfalse),tocIdandcontentId(ids of the elements the
renderer fills, defaulting tordforms-specs-tocandrdforms-specs-content).
Changed
apViewis the application profile page's entrypoint. The page was
assembled in the host's own markup —loadApalongsideapTitle,apStatus,
apDate,apHeaderMetadata,apToSpecButtonanddiagramImage, with the page
supplying a<nav>and a<main>. Those blocks still render, but they are
internal now, and the family stops atapView: there is noapMain,
apInfoboxorapVanity.- 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 frompage_language, like every other block. - Its click-through links use the merged
clicks. They resolved against the
first configuration object that declared aclicksmap, ignoring every later
contribution and the!clicksreplacement convention; they now use the same
merged mapnamedclickresolves against. - Its "usage note" label is translatable. It was a fixed English/Swedish pair
inside the bundle; it isap.usageNoteinconfig.nlsnow.
v0.5.1
Changed
- Every disclosure on the specification page starts open. The "Reused" section
was the one<details>left closed; it now carriesopenlike the other three. A
host relying ondetails: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 anowl: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 aninspec:PROFbut tagged its AP resource
inspec:SHACLstill got a button. The specification itself must now conform to
inspec:PROFas well.
v0.5.0
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.cssgives
.esbHeadingInSummarydisplay: 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
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 asdtContent. - New
esb*classes:esbResourceUri,esbExtLinkandesbTerminologyLink.
All three are described in the README. - A new parameter,
standAlone, onspecMainandspecView(above).
Removed
relatedLink'sclassparameter, renamedlinkClass(above). At a mount
point that isdata-entryscape-link-class.
Fixed
- The concept infobox's terminology link carries an
esb*class. It emitted a
bareterminologyLink, outside the convention and undocumented; it is
esbTerminologyLinknow, the class the header's parent link also uses.