Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Recent Searched Words to Default View in Search Dialog #67

Open
babblebey opened this issue May 22, 2024 · 0 comments
Open

Add Recent Searched Words to Default View in Search Dialog #67

babblebey opened this issue May 22, 2024 · 0 comments
Labels
↗️ medium priority This issue is crucial ✨ enhancement New feature or request

Comments

@babblebey
Copy link
Member

We currently have a default view in our search dialog, which is displayed when the user opens the search without any input. To improve user experience, we would like to enhance this functionality by showing recently searched words if there have been any recent searches. This enhancement is inspired by the implementation found on the TailwindCSS documentation site.

Current Implementation

When a user opens the search dialog, a default view is displayed regardless of any previous searches. Below is a screenshot of our current default search dialog:

image

Desired Implementation

We would like to display recently searched words in place of the current default view when there have been recent searches. This change aims to make it easier for users to quickly access their recent searches.

An example of the desired implementation can be seen on the TailwindCSS documentation site. Below is a screenshot of their search dialog displaying recent searches:

image

Implementation Details

The enhancement will be implemented in the components/islands/search.jsx file. The steps to achieve this are as follows:

  1. Utilize Stored Recent Searches: Use the existing jargons.dev:recent_searches object from localStorage to fetch recent search terms.
  2. Update Default View: Modify the search dialog component to check for recent searches and display them instead of the current default view.
  3. Display Logic: Ensure that the recent searches are displayed in a user-friendly manner, similar to the TailwindCSS documentation example.

Acceptance Criteria

  • Recent searches are displayed in the search dialog when the user opens it and there have been recent searches.
  • If no recent searches are available, the current default view is displayed.
  • The implementation is done in the components/islands/search.jsx file.
  • The functionality is tested and verified for consistent behavior.

Additional Information

  • Feel free to ask for more details or clarifications if needed. This enhancement aims to improve the overall usability and efficiency of our search functionality.
@babblebey babblebey added ✨ enhancement New feature or request ↗️ medium priority This issue is crucial labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
↗️ medium priority This issue is crucial ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant