pandorga 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "project-specimen/icon plate without a thumbnail (PLT-AC-13)",
3
+ "block": "renderProjectSpecimen",
4
+ "args": [
5
+ {
6
+ "slug": "bossa",
7
+ "front_matter": {
8
+ "project": "Bossa",
9
+ "icon": "music_note",
10
+ "tagline": "Edge nodes for street ensembles."
11
+ }
12
+ },
13
+ {
14
+ "href": "/projects/bossa/"
15
+ }
16
+ ],
17
+ "selectors": [
18
+ "div.home-specimen-figure",
19
+ "projects-plate--mark",
20
+ "h3.ledger-card-title"
21
+ ],
22
+ "forbidden": [
23
+ "ledger-poster",
24
+ "home-specimen-badge",
25
+ "home-specimen-strip",
26
+ "home-specimen-open"
27
+ ],
28
+ "contains": [
29
+ ">music_note<",
30
+ ">Bossa<"
31
+ ]
32
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "project-specimen/initial badge on a thumbnail without an icon (PLT-AC-18)",
3
+ "block": "renderProjectSpecimen",
4
+ "args": [
5
+ {
6
+ "slug": "arco",
7
+ "front_matter": {
8
+ "project": "ARCO",
9
+ "thumbnail": "/media/projects/arco.png"
10
+ }
11
+ },
12
+ {
13
+ "href": "/projects/arco/"
14
+ }
15
+ ],
16
+ "selectors": [
17
+ "ledger-poster",
18
+ "span.home-specimen-badge",
19
+ "is-initial"
20
+ ],
21
+ "forbidden": [
22
+ "projects-plate",
23
+ "material-symbols-outlined"
24
+ ],
25
+ "contains": [
26
+ "aria-hidden=\"true\">A</span>"
27
+ ],
28
+ "counts": {
29
+ "home-specimen-badge": 1
30
+ }
31
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "project-specimen/initial plate without a thumbnail or icon (PLT-AC-18)",
3
+ "block": "renderProjectSpecimen",
4
+ "args": [
5
+ {
6
+ "slug": "bossa",
7
+ "front_matter": {
8
+ "project": "bossa",
9
+ "tagline": "Edge nodes for street ensembles."
10
+ }
11
+ },
12
+ {
13
+ "href": "/projects/bossa/"
14
+ }
15
+ ],
16
+ "selectors": [
17
+ "div.home-specimen-figure",
18
+ "projects-plate--mark",
19
+ "span.is-initial",
20
+ "projects-plate-glyph",
21
+ "h3.ledger-card-title"
22
+ ],
23
+ "forbidden": [
24
+ "ledger-poster",
25
+ "material-symbols-outlined",
26
+ "home-specimen-badge"
27
+ ],
28
+ "contains": [
29
+ ">B</span></div>",
30
+ ">bossa<"
31
+ ]
32
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "project-specimen/full (PLT-AC-13)",
3
+ "block": "renderProjectSpecimen",
4
+ "args": [
5
+ {
6
+ "slug": "arco",
7
+ "front_matter": {
8
+ "project": "ARCO",
9
+ "thumbnail": "/media/projects/arco.png",
10
+ "icon": "route",
11
+ "label": "Simulation",
12
+ "status": "Ongoing",
13
+ "start_date": "2024-03-01",
14
+ "tagline": "A city-scale race replayed from telemetry.",
15
+ "tags": [
16
+ "Systems",
17
+ "Rust"
18
+ ],
19
+ "github": "https://github.com/example/arco",
20
+ "article_url": "/articles/arco/",
21
+ "external_url": "https://arco.example"
22
+ }
23
+ },
24
+ {
25
+ "href": "/projects/arco/",
26
+ "folio": 1,
27
+ "openLabel": "Open project"
28
+ }
29
+ ],
30
+ "selectors": [
31
+ "article.ledger-system-card",
32
+ "article.home-project-specimen",
33
+ "div.home-specimen-strip",
34
+ "div.ledger-meta",
35
+ "span.ledger-status",
36
+ "div.home-specimen-figure",
37
+ "div.ledger-poster",
38
+ "img",
39
+ "span.home-specimen-badge",
40
+ "h3.ledger-card-title",
41
+ "a.ledger-card-stretch",
42
+ "p.ledger-card-copy",
43
+ "div.ledger-chip-row",
44
+ "div.ledger-card-links",
45
+ "span.home-specimen-open"
46
+ ],
47
+ "forbidden": [
48
+ "projects-plate"
49
+ ],
50
+ "contains": [
51
+ ">#01<",
52
+ ">Simulation<",
53
+ ">2024<",
54
+ ">Ongoing<",
55
+ ">ARCO<",
56
+ ">Repository<",
57
+ ">Article<",
58
+ ">Visit<",
59
+ ">Open project<",
60
+ "href=\"/projects/arco/\""
61
+ ],
62
+ "counts": {
63
+ "ledger-card-stretch": 1,
64
+ "ledger-cta": 4,
65
+ "ledger-cta-icon": 3,
66
+ "ledger-chip": 2,
67
+ "ledger-meta-sep": 2
68
+ }
69
+ }
@@ -214,6 +214,46 @@ omits(
214
214
 
215
215
  separatorCount('renderSystemCard / label without status drops the separator', ['Simulation', ''], 0);
216
216
 
217
+ // PLT-AC-14: the home specimen and its rack card carry only what the project
218
+ // declares. A project that is only a name is its initial plate (PLT-AC-18)
219
+ // and a title, nothing else.
220
+ omits(
221
+ 'renderProjectSpecimen / project with no media, meta, tags, or links',
222
+ 'renderProjectSpecimen',
223
+ [{ front_matter: { project: 'Bossa' } }, { href: '/projects/bossa/' }],
224
+ [
225
+ 'ledger-poster',
226
+ 'material-symbols-outlined',
227
+ 'home-specimen-badge',
228
+ 'home-specimen-strip',
229
+ 'ledger-meta',
230
+ 'ledger-status',
231
+ 'ledger-card-copy',
232
+ 'ledger-chip-row',
233
+ 'ledger-card-foot'
234
+ ]
235
+ );
236
+
237
+ omits(
238
+ 'renderProjectSpecimen / a start_date with no year renders no year',
239
+ 'renderProjectSpecimen',
240
+ [{ front_matter: { project: 'Bossa', start_date: 'someday' } }, { href: '/projects/bossa/' }],
241
+ ['home-specimen-strip', 'ledger-meta']
242
+ );
243
+
244
+ omits(
245
+ 'renderProjectInventoryRow / project with no index, label, status, or tagline',
246
+ 'renderProjectInventoryRow',
247
+ [{ slug: 'bossa', front_matter: { project: 'Bossa' } }, { selectable: true }],
248
+ [
249
+ 'home-project-inventory-code',
250
+ 'home-project-inventory-index',
251
+ 'ledger-status',
252
+ 'home-project-inventory-copy',
253
+ 'ledger-poster'
254
+ ]
255
+ );
256
+
217
257
  // The listing preview is derived from description, then excerpt, then body.
218
258
  // With all three absent there is nothing to say, so there is no paragraph.
219
259
  omits(
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "open3"
5
+ require "pathname"
6
+
7
+ ROOT = Pathname.new(__dir__).join("..", "..").expand_path
8
+ FIXTURE_DIR = Pathname.new(__dir__).join("render-parity", "blocks")
9
+ RUNNER = Pathname.new(__dir__).join("render-parity", "run-block-fixture.mjs")
10
+
11
+ # The block half of test-content-render-parity, without its Markdown half.
12
+ # That gate needs `marked` from scripts/node_modules, which CI never installs,
13
+ # so it stays off validate.sh; the ledger blocks fall back cleanly without it.
14
+
15
+ def check!(condition, message = "condition was false")
16
+ raise "Assertion failed: #{message}" unless condition
17
+ end
18
+
19
+ puts "Testing ledger block fixtures..."
20
+
21
+ paths = Dir.glob(FIXTURE_DIR.join("*.json")).sort
22
+ check! paths.any?, "no ledger block fixtures found"
23
+
24
+ paths.each do |fixture_path|
25
+ stdout, stderr, status = Open3.capture3(
26
+ "node", RUNNER.to_s, fixture_path, chdir: ROOT.join("scripts").to_s
27
+ )
28
+ check! status.success?, "#{File.basename(fixture_path)} failed:\n#{stderr}\n#{stdout}"
29
+ puts " #{stdout.strip}"
30
+ end
31
+
32
+ puts "All ledger block fixtures passed."
data/scripts/validate.sh CHANGED
@@ -49,6 +49,7 @@ TESTS=(
49
49
  scripts/test/test-math-row-breaks.rb
50
50
  scripts/test/test-detail-render-parity.rb
51
51
  scripts/test/test-absent-field-absent-element.rb
52
+ scripts/test/test-ledger-blocks.rb
52
53
  scripts/test/test-home-band-art.rb
53
54
  scripts/test/test-r2-json-sync.rb
54
55
  scripts/test/test-writing-slug-limits.rb
@@ -32,6 +32,42 @@ Optional: `title`, `nav`, `home` (default limit 4).
32
32
  home: { limit: 4 }
33
33
  ```
34
34
 
35
+ ## Home band
36
+
37
+ The home band is a specimen bench: one featured project card beside a
38
+ filing rack of selectable project cards. Every element is backed by a
39
+ collection field; a missing field means a missing element.
40
+
41
+ - `PLT-AC-13` When the band renders, the specimen card shall carry a strip
42
+ with the project's folio, `label`, `start_date` year and `status`; a 16:9
43
+ plate, the `thumbnail` with the `icon` as a badge (or the `icon` plate),
44
+ with the title always below it; the `tagline`; the `tags`; and the
45
+ outbound `github`, `article_url` and `external_url` links. The title is
46
+ its only link to the project page.
47
+ - `PLT-AC-14` When a project lacks `thumbnail`, `label`, `status`,
48
+ `start_date`, `tagline`, `tags` or outbound links, the specimen card and its
49
+ rack card shall render no element for that field. A missing `icon` is
50
+ covered by `PLT-AC-18`.
51
+ - `PLT-AC-15` When the viewport is at least 900px wide, the specimen shall
52
+ take half the band and the rack a narrower column beside it, leaving the
53
+ rest blank. Each project shall appear in the rack as a card with its folio,
54
+ `label`, `status`, title, `tagline` and a 16:9 `thumbnail` (or `icon`, or
55
+ initial) mark. Selecting a card shall swap the specimen in place and mark
56
+ that card `aria-pressed="true"`.
57
+ - `PLT-AC-16` Withdrawn: the tape of previous and next arrows was removed;
58
+ the rack is the only way to change the specimen.
59
+ - `PLT-AC-17` When the viewport is narrower than 900px, the rack shall be a
60
+ strip of icon buttons above the specimen, one per project (up to six), that
61
+ together span the band's width.
62
+ - `PLT-AC-18` When a project lacks `icon`, the first letter of its name shall
63
+ stand in for it wherever the icon would appear: the specimen badge, the
64
+ specimen plate, the rack mark and the strip button. The elements and the
65
+ behavior shall be those of a project with an icon.
66
+
67
+ `PLT-AC-13`, `-14` and `-18` are covered by the block fixtures under
68
+ `scripts/test/render-parity/blocks/` and by the absent-field gate; `-15` and
69
+ `-17` are layout behavior verified in the browser.
70
+
35
71
  ## Package layout
36
72
 
37
73
  - `template.yml` — slots, detail route, export fields
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandorga
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Pandorga contributors
@@ -339,6 +339,12 @@ files:
339
339
  - scripts/test/render-parity/blocks/meta-strip.json
340
340
  - scripts/test/render-parity/blocks/poster-media-image.json
341
341
  - scripts/test/render-parity/blocks/poster-media-video.json
342
+ - scripts/test/render-parity/blocks/project-inventory-row-icon.json
343
+ - scripts/test/render-parity/blocks/project-inventory-row.json
344
+ - scripts/test/render-parity/blocks/project-specimen-glyph.json
345
+ - scripts/test/render-parity/blocks/project-specimen-initial-badge.json
346
+ - scripts/test/render-parity/blocks/project-specimen-initial.json
347
+ - scripts/test/render-parity/blocks/project-specimen.json
342
348
  - scripts/test/render-parity/blocks/section-banner.json
343
349
  - scripts/test/render-parity/blocks/system-card-custom-meta.json
344
350
  - scripts/test/render-parity/blocks/system-card.json
@@ -389,6 +395,7 @@ files:
389
395
  - scripts/test/test-home-band-art.rb
390
396
  - scripts/test/test-install-functions.rb
391
397
  - scripts/test/test-language-export.rb
398
+ - scripts/test/test-ledger-blocks.rb
392
399
  - scripts/test/test-listing-filter-contract.rb
393
400
  - scripts/test/test-math-row-breaks.mjs
394
401
  - scripts/test/test-math-row-breaks.rb