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

Highlight the search term on no results #28644

Closed
wants to merge 2 commits into from

Conversation

TSI-kavitasonawane
Copy link
Contributor

NMC-464: We applied a strong tag for user input on the "no results" screen within the search function.

@@ -76,7 +76,7 @@
<SearchResultPlaceholders v-if="isLoading" />

<EmptyContent v-else-if="isValidQuery" icon="icon-search">
{{ t('core', 'No results for {query}', {query}) }}
{{ t('core', 'No results for') }} <strong>{{ t('query', query) }}</strong>
Copy link
Member

Choose a reason for hiding this comment

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

This approach might not work with all languages. The query parameter should stay part of the translate t() function so it can be embedded into the translated sentence as needed in the target language. Also the content in your strong tag would always just print "query" instead of the actual search term.

In order to highlight something within a full text string, you can use the Highlight component from our shared components library. https://nextcloud-vue-components.netlify.app/#/Components/Highlight

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@juliushaertl I have done the changes as you mentioned in the comment. Please check it.

@juliusknorr juliusknorr changed the title NMC-464 Highlight the search term on no results Aug 30, 2021
@Salvador1313

This comment has been minimized.

@Salvador1313

This comment has been minimized.

@juliusknorr

This comment has been minimized.

@juliusknorr
Copy link
Member

Please also make sure here to only include the required commit in the branch without the unrelated s3 changes

Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
@skjnldsv
Copy link
Member

skjnldsv commented Sep 1, 2021

I wanted to push a fix, but you disabled users from editing your pull request @TSI-kavitasonawane
You will find the fix for this in this pull request: #28682

Feel free to close this one

Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
@szaimen
Copy link
Contributor

szaimen commented Sep 1, 2021

Done in #28682

@szaimen szaimen closed this Sep 1, 2021
@tsdicloud tsdicloud deleted the NMC-464 branch July 14, 2023 12:37
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.

5 participants