[FEATURE]: Pressing Enter after typing all orgs to search should hit explore.

已关闭 适合新手
#324 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

已经有一个关联 PR 被合并了。

  • #325 来自 @Rajvardhan-Singh-Rathore —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
79/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, react
领域
frontend

调研方向

从指定的入口开始:在 src/pages/HomePage.jsx 中处理 Enter 键,在 src/components/layout/Footer.jsx 中处理页脚徽标,在 src/components/Navbar.jsx 中处理导航徽标。阅读现有的处理器和导航模式,然后测试按 Enter 键选择组织和搜索,以及徽标的光标和导航行为;issue 中预期的行为均正常时即为完成。

由索引模型根据 Issue 内容生成。

描述

enhancement
Feature and its Use Cases

Feature Description

Instead of only clicking on explore button from mouse to search clicking Enter 2nd time should also search when the orgs are selected.

Also when hovering over the logo the cursor should be pointer so as to know that it is clickable. and the logo in footer should also navigate to / which currently is doesn't.

Adding this feature will improve the functionality of the search for analysis and multi org analysis search.

https://github.com/user-attachments/assets/bfbb05e6-fd8e-4651-89ff-32a2815f7f7a

Actual Behavior

After typing org name to search when one hits enter the org is selected but pressing enter again did not hit explore , the user has to do a manual mouse click on explore to search.

Expected Behavior

when one clicks enter again 2nd time after typing all the orgs to search explore should hit.

Steps to Reproduce

Open OrgExplorer.
Open home page (/)
type of any no. of orgs on first enter click it selects the org (yellow ui box) on second click it does not search.

Proposed Solution :
For 2nd time enter search:
  • Navigate to src/pages/HomePage.jsx
  • On line 38 we already have a function handleKey which calls addChip(input) on first enter press
  const handleKey = e => {
    if ((e.key === 'Enter' || e.key === ',') && input.trim()) {
      e.preventDefault()
      addChip(input)
    }
    if (e.key === 'Backspace' && !input && chips.length) {
      setChips(prev => prev.slice(0, -1))
    }
  }
  • add !input && chip.length when pressed enter should search i.e call go();
For cursor pointer:
  • Navigate to src/components/layout/Footer.jsx check lines 171 span add a onclick which navigates to / and on line 172 logo give it a className cursor-pointer.
  • Navigate to src/components/Navbar.jsx line 39 give it a className cursor-pointer

Impact
low- Feature works but adding this would improve user experience.

Feedback welcome from @Ri1tik @rahul-vyas-dev

Code of Conduct

I have joined the Discord server and will post updates there

I have searched existing issues to avoid duplicates

Additional Context

No response

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
主要语言
JavaScript
星标
48
派生
163
平均合并
4 天 13 小时
30 天内合并 PR
25

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/OrgExplorer 的其他 Issue

查看 AOSSIE-Org/OrgExplorer 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。