markdowndocs 0.11.2 → 0.11.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28f9775decd9995a54bf22809d3ef0a27cb5c684e4aa068a42592f7723c7ebd8
4
- data.tar.gz: 5f1b6adc6bd424e4ef1c872432d11c6d93ea5c18fe1cc25dd389deea7c1c3a5e
3
+ metadata.gz: 1f1cb7d3191ecb664710cd650b934dc133ba887db48cfd49ec9c7758fbcfaf69
4
+ data.tar.gz: 7a236c92a2b4d755c882b3c257b2b52b900ceae73312989433ff6ab93d35a1bd
5
5
  SHA512:
6
- metadata.gz: aca1b149e1727df52bf8ab922291cf9148e0c70867098674e11e5d4d092c278c800bf96017267c43763e1e3b009f998a87ecd4ee7800514d5087770ee33c65b2
7
- data.tar.gz: 3f06f7c533c897094139c6d7ea90484314a1a3531fd64c56a9e615896599057ebb2c6165a138d17ba0f85089c10f0e68e259cd6c004e7466035f4bbd225e24ab
6
+ metadata.gz: '028f7855c0d94dc53fd363f2f8ac34d13c8e417a64f20753fa42aa9b3f07534f9d62f91ba7f1af137cbb9787ed28f5b4680d467fcf4850d30562e7ecca4ae79b'
7
+ data.tar.gz: 948e320c78060772faf7b4cba7ce6ee66936af28e71d702694d433f801937c872439a7e6becff8dd78c7d6a7573b1097df64b57ed19faf936951ed575bb8a1e2
data/CHANGELOG.md CHANGED
@@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [0.11.4] - 2026-09-23
11
+
12
+ Two search fixes. Neither changes an API, but the second one asks something of
13
+ apps that have overridden the docs index template.
14
+
15
+ ### Fixed
16
+
17
+ - **A query typed before the search index arrives is no longer dropped.**
18
+ `performSearch` returns through `showAll()` while `miniSearch` is still null,
19
+ and nothing re-read the input once the fetch resolved — so on a slow
20
+ connection the filter looked dead to anyone who started typing straight away.
21
+ The controller now re-runs the search as soon as the index is usable. Proved
22
+ by a browser spec in a host app rather than here: this repo has no
23
+ JavaScript test harness, and standing one up is tracked separately.
24
+
25
+ - **The docs index filter no longer hides every card.** `search_index` keys each
26
+ entry on `path_slug`, but the index template tagged each card with the bare
27
+ `slug`, and `docs_search_controller` matches a card by comparing the two. A
28
+ mode-scoped document therefore never matched its own index entry, so any query
29
+ emptied the page. Cards now carry `path_slug`. Apps that copied
30
+ `docs/index.html.erb` into their own `app/views/markdowndocs/docs/` need the
31
+ same change locally — a gem upgrade does not reach an override.
32
+
33
+ ## [0.11.3] - 2026-09-03
34
+
35
+ ### Accessibility
36
+
37
+ - **The doc page emits one `main` landmark, not two.** `docs/show` wrapped its
38
+ content column in `<main>`, nesting a second landmark inside the one the host
39
+ layout (or this engine's own, standalone) already provides. axe reports it as
40
+ `landmark-no-duplicate-main` and `landmark-main-is-top-level`, and screen
41
+ readers get two competing "main" destinations on every `/docs/*` page. The
42
+ column is now a `<div>`; the `<article>` inside still carries the content
43
+ semantics.
44
+
8
45
  ## [0.11.2] - 2026-07-15
9
46
 
10
47
  ### Accessibility
@@ -32,6 +32,12 @@ export default class extends Controller {
32
32
  }
33
33
  })
34
34
  this.miniSearch.addAll(docs)
35
+
36
+ // A query typed while the index was still loading was dropped:
37
+ // performSearch returns through showAll() while miniSearch is null, and
38
+ // nothing re-read the input once the fetch resolved, so the filter looked
39
+ // dead to anyone who started typing straight away (#42).
40
+ if (this.hasInputTarget && this.inputTarget.value.trim()) this.performSearch()
35
41
  } catch (e) {
36
42
  console.warn("Markdowndocs: failed to load search index", e)
37
43
  }
@@ -56,7 +56,12 @@
56
56
  md:grid-cols-2
57
57
  lg:grid-cols-3">
58
58
  <% docs.each do |doc| %>
59
- <div <% if @search_enabled %>data-docs-search-target="card" data-slug="<%= doc.slug %>"<% end %>>
59
+ <%# path_slug, NOT the bare slug: search_index keys every entry on
60
+ path_slug, and docs_search_controller matches a card by testing
61
+ this attribute against those ids. A mode-scoped document tagged
62
+ with its bare slug matches nothing, which hid every card on
63
+ every query (#40). %>
64
+ <div <% if @search_enabled %>data-docs-search-target="card" data-slug="<%= doc.path_slug %>"<% end %>>
60
65
  <%= render "markdowndocs/docs/card", doc: doc %>
61
66
  </div>
62
67
  <% end %>
@@ -68,8 +68,10 @@
68
68
  <!-- Two-column layout -->
69
69
  <div class="grid grid-cols-1 gap-8
70
70
  lg:grid-cols-12">
71
- <!-- Main content -->
72
- <main class="lg:col-span-8">
71
+ <!-- Main content. A grid column, not a landmark: the page's `main` is the
72
+ host layout's (or this engine's own, when standalone), and a second
73
+ one nested inside it is a duplicate landmark. -->
74
+ <div class="lg:col-span-8">
73
75
  <article
74
76
  tabindex="-1"
75
77
  autofocus
@@ -78,7 +80,7 @@
78
80
  <%= raw @rendered_content %>
79
81
  </div>
80
82
  </article>
81
- </main>
83
+ </div>
82
84
 
83
85
  <!-- Desktop sidebar (hidden on mobile, shown in grid on desktop) -->
84
86
  <div class="hidden lg:block lg:col-span-4">
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.11.2"
4
+ VERSION = "0.11.4"
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdowndocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-09-23 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rails
@@ -114,6 +115,7 @@ metadata:
114
115
  homepage_uri: https://github.com/dschmura/markdowndocs
115
116
  source_code_uri: https://github.com/dschmura/markdowndocs
116
117
  changelog_uri: https://github.com/dschmura/markdowndocs/blob/main/CHANGELOG.md
118
+ post_install_message:
117
119
  rdoc_options: []
118
120
  require_paths:
119
121
  - lib
@@ -128,7 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
130
  - !ruby/object:Gem::Version
129
131
  version: '0'
130
132
  requirements: []
131
- rubygems_version: 3.6.9
133
+ rubygems_version: 3.4.19
134
+ signing_key:
132
135
  specification_version: 4
133
136
  summary: A drop-in markdown documentation site for Rails apps
134
137
  test_files: []