Skip to content

Use one responsive search surface in Aliki - #1804

Open
st0012 wants to merge 1 commit into
ruby:masterfrom
st0012:codex/unify-aliki-search
Open

Use one responsive search surface in Aliki#1804
st0012 wants to merge 1 commit into
ruby:masterfrom
st0012:codex/unify-aliki-search

Conversation

@st0012

@st0012 st0012 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Aliki had two separate search problems on compact layouts:

  • Pressing / focused the hidden desktop field instead of opening the visible search surface.
  • Search result cards looked clickable, but only the title text was a link. Clicking the badge, snippet, or card padding did nothing.

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

@st0012
st0012 requested a deployment to fork-preview-protection August 31, 2026 14:29 — with GitHub Actions Waiting
@st0012 st0012 added the bug label Aug 31, 2026
@st0012

st0012 commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

@codex review

Comment thread test/rdoc/generator/aliki_test.rb Outdated
html += `<span class="search-type search-type-${this.escapeHTML(typeClass)}">${typeLabel}</span>`;
}

html += '</p>';

@st0012 st0012 Aug 31, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated fix that doesn't affect user behaviour.

@st0012
st0012 force-pushed the codex/unify-aliki-search branch from fb76f22 to 90f7141 Compare August 31, 2026 15:37
@st0012
st0012 requested a deployment to fork-preview-protection August 31, 2026 15:37 — with GitHub Actions Waiting
@st0012
st0012 force-pushed the codex/unify-aliki-search branch from 90f7141 to 4e29cdc Compare August 31, 2026 17:54
@st0012
st0012 requested a deployment to fork-preview-protection August 31, 2026 17:54 — with GitHub Actions Waiting
@st0012
st0012 marked this pull request as ready for review August 31, 2026 18:32
Copilot AI balanced review requested due to automatic review settings August 31, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +12 to +13
<div class="search-backdrop" data-search-close></div>
<div id="search-surface" class="search-surface">
Copilot AI review requested due to automatic review settings August 31, 2026 18:36
@st0012
st0012 force-pushed the codex/unify-aliki-search branch from 4e29cdc to 671dc73 Compare August 31, 2026 18:36
@st0012
st0012 deployed to fork-preview-protection August 31, 2026 18:36 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">

@matzbot

matzbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

🚀 Preview deployment available at: https://0b38709c.rdoc-6cd.pages.dev (commit: 671dc73)

Copilot AI review requested due to automatic review settings September 1, 2026 10:42
@st0012
st0012 force-pushed the codex/unify-aliki-search branch from 671dc73 to dcf0379 Compare September 1, 2026 10:42
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Documentation preview

View the preview

Commit: dcf0379

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-modal supplied role="dialog" and aria-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">

Comment on lines +110 to +114
const openSearch = () => {
focusBeforeOpen = document.activeElement;
showSearchSurface();
input.focus({ preventScroll: true });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants