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 Suggestion to Contribute a Word When Search Yields No Results #68

Open
babblebey opened this issue May 23, 2024 · 2 comments · May be fixed by #98
Open

Add Suggestion to Contribute a Word When Search Yields No Results #68

babblebey opened this issue May 23, 2024 · 2 comments · May be fixed by #98
Assignees
Labels
↗️ medium priority This issue is crucial ✨ enhancement New feature or request

Comments

@babblebey
Copy link
Member

babblebey commented May 23, 2024

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 babblebey added ✨ enhancement New feature or request ↗️ medium priority This issue is crucial labels May 23, 2024
@DevYoma
Copy link
Contributor

DevYoma commented Sep 9, 2024

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

@babblebey
Copy link
Member Author

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 😁

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

Successfully merging a pull request may close this issue.

2 participants