Use one responsive search surface in Aliki - #1804
Conversation
|
@codex review |
| html += `<span class="search-type search-type-${this.escapeHTML(typeClass)}">${typeLabel}</span>`; | ||
| } | ||
|
|
||
| html += '</p>'; |
There was a problem hiding this comment.
This is an unrelated fix that doesn't affect user behaviour.
fb76f22 to
90f7141
Compare
90f7141 to
4e29cdc
Compare
There was a problem hiding this comment.
Pull request overview
Unifies Aliki search across responsive layouts and makes complete result cards clickable.
Changes:
- Uses one search form and result list across layouts.
- Adds responsive overlay behavior and full-card link targets.
- Tests
/shortcut focus behavior and updates design documentation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/rdoc/generator/aliki/search_test.rb |
Tests shared search opening via /. |
lib/rdoc/generator/template/aliki/js/aliki.js |
Unifies search interaction and lifecycle logic. |
lib/rdoc/generator/template/aliki/DESIGN.md |
Documents responsive shared search. |
lib/rdoc/generator/template/aliki/css/rdoc.css |
Adds compact overlay and card-wide links. |
lib/rdoc/generator/template/aliki/_sidebar_search.rhtml |
Adopts shared result identifiers. |
lib/rdoc/generator/template/aliki/_header.rhtml |
Replaces separate forms with shared markup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div class="search-backdrop" data-search-close></div> | ||
| <div id="search-surface" class="search-surface"> |
4e29cdc to
671dc73
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lib/rdoc/generator/template/aliki/_header.rhtml:13
- On compact layouts this element becomes a modal overlay and the page is scroll-locked, but the previous
role="dialog"/aria-modal="true"semantics were removed. Assistive technology will treat it as an ordinary header region rather than announce a modal search surface. Please apply dialog semantics while the compact surface is open (and remove them in the desktop presentation), restoring them on close.
<div id="search-surface" class="search-surface">
|
🚀 Preview deployment available at: https://0b38709c.rdoc-6cd.pages.dev (commit: 671dc73) |
671dc73 to
dcf0379
Compare
Documentation previewCommit: |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
lib/rdoc/generator/template/aliki/_header.rhtml:13
- On compact layouts this element becomes a modal overlay, but the previous
#search-modalsuppliedrole="dialog"andaria-modal="true"; the replacement supplies neither and leaves the obscured page keyboard-focusable. As a result, Tab can leave the overlay for controls behind the backdrop and assistive technology is not told that interaction is modal. Apply dialog semantics only while the compact surface is open and contain focus (or make the rest of the page inert), restoring the prior state when it closes.
<div id="search-surface" class="search-surface">
| const openSearch = () => { | ||
| focusBeforeOpen = document.activeElement; | ||
| showSearchSurface(); | ||
| input.focus({ preventScroll: true }); | ||
| }; |
Aliki had two separate search problems on compact layouts:
/focused the hidden desktop field instead of opening the visible search surface.The first problem came from rendering separate desktop and compact search forms. Aliki now renders one search form and one result list. CSS presents the same markup inline on larger screens and as an overlay on smaller screens, so the search logic no longer needs separate paths.
Each result anchor now covers its full card. This makes the entire result clickable while preserving standard link actions.
aliki-search-after.mp4