jargons.dev icon indicating copy to clipboard operation
jargons.dev copied to clipboard

Add Suggestion to Contribute a Word When Search Yields No Results

Open babblebey opened this issue 1 year ago • 2 comments

To encourage user contributions and enhance our dictionary, we would like to add a message suggesting users contribute a word to the dictionary when a search yields no results. This message should be displayed in the search dialog to prompt users to add new words that are not currently in the dictionary.

Current Implementation

When a search is performed and no matching words are found, the search dialog currently displays a message indicating that no results were found. Below is a screenshot of the current implementation:

image

Desired Implementation

In addition to the current message, we want to include a suggestion for users to contribute the missing word to the dictionary. This will be done within the components/islands/search.jsx island.

Implementation Details

  1. Check for No Results: When a search query returns no results, display the current "no results found" message.
  2. Add Contribution Suggestion: Enhance the message to include a suggestion for users to contribute the missing word to the dictionary. Provide a link or call-to-action that guides them to the Jargons Editor for easy contribution.

Example Message

When no results are found, display the following message:

"No results found for [search term]. Would you like to contribute this word to our dictionary? [Contribute Here]"

You could look to work with our currently existing "Contribution CTA" component (see #69 for component related info)

image

Acceptance Criteria

  • When a search query yields no results, the search dialog displays a suggestion to contribute the missing word.
  • The suggestion includes a link or call-to-action that directs users to the Jargons Editor for contribution.
  • The implementation is done in the components/islands/search.jsx island.
  • 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 user engagement and expand our dictionary through community contributions.

babblebey avatar May 23 '24 20:05 babblebey

Hi @babblebey, I would like to take this I'm thinking of making another component very similar to the structure of the ContributionCTA component but in react, then passing in the searchTerm as a prop to the react component.

image

The image is just to show you how I plan to implement it

DevYoma avatar Sep 09 '24 13:09 DevYoma

Sure thing @DevYoma,

Kindly proceed!

You can just create component within the same search island file (take notice of how the other sub-components are done in there 😉) no need to extract to another.

Can't wait for the PR 😁

babblebey avatar Sep 10 '24 10:09 babblebey

This issue will now be close following the introduction of feat: implement search with ✨jAI

This feature introduces a guardrail for cases where results for a word isn't found in the dictionary introducing the ability to search for the word with ✨jAI

We are however looking to implement AI Prompted Word Contribution with ✨jAI - https://github.com/jargonsdev/roadmap/issues/9 which takes the word whose meaning was generated by AI because it wasn't in the dictionary, acts and suggests for such word to be contributed to the dictionary.

babblebey avatar Sep 30 '25 23:09 babblebey