Skip to content

fix(search): SearchPanel Enter keyboard not work regression#2775

Merged
SoonIter merged 4 commits intomainfrom
syt/fix-brand-new-color
Nov 18, 2025
Merged

fix(search): SearchPanel Enter keyboard not work regression#2775
SoonIter merged 4 commits intomainfrom
syt/fix-brand-new-color

Conversation

@SoonIter
Copy link
Member

@SoonIter SoonIter commented Nov 18, 2025

Summary

fix(search): Enter keyboard should work

image

Related Issue

introduced in #2586

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 18, 2025 06:53
@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 20aeaac
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/691c23725cc1890007ad1297
😎 Deploy Preview https://deploy-preview-2775--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter SoonIter changed the title fix(search): Enter keyboard should work fix(search): Enter keyboard should work regression Nov 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where the Enter key wasn't working properly in the search panel due to incorrect usage of Object.values() on a Map object, and adds comprehensive e2e tests for keyboard navigation in search.

  • Changed Object.values() to Array.from().values() to correctly extract values from a Map object
  • Added e2e test suite covering keyboard navigation (ArrowUp/Down, Enter, Escape, Cmd+K/Ctrl+K)
  • Created new test fixture for search functionality testing

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/core/src/theme/components/Search/SearchPanel.tsx Fixed bug where Object.values() was incorrectly used on a Map object; changed to Array.from().values() to properly extract Map values
e2e/fixtures/search/index.test.ts Added comprehensive e2e tests for keyboard navigation in search panel
e2e/fixtures/search/package.json Added package configuration for the new search test fixture
e2e/fixtures/search/rspress.config.ts Added rspress configuration for the search test fixture
e2e/fixtures/search/tsconfig.json Added TypeScript configuration for the search test fixture
e2e/fixtures/search/doc/index.mdx Added test content page for search testing
e2e/fixtures/search/doc/foo.mdx Added test content page with "Foo" keyword for search testing
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

Rsdoctor Bundle Diff Analysis

📁 web

Path: website/doc_build/web/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 14.3 MB - -
📄 JavaScript 13.7 MB - -
🎨 CSS 109.0 KB - -
🌐 HTML 0 B - -
📁 Other Assets 496.7 KB - -

Generated by Rsdoctor GitHub Action

SoonIter and others added 2 commits November 18, 2025 15:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SoonIter SoonIter changed the title fix(search): Enter keyboard should work regression fix(search): SearchPanel Enter keyboard not work regression Nov 18, 2025
@SoonIter SoonIter merged commit 187dab0 into main Nov 18, 2025
9 checks passed
@SoonIter SoonIter deleted the syt/fix-brand-new-color branch November 18, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants