-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tell user to reset if there are no search results #1853
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1853 +/- ##
===========================================
- Coverage 40.53% 40.52% -0.02%
===========================================
Files 365 365
Lines 11283 11285 +2
Branches 2896 2896
===========================================
- Hits 4574 4573 -1
- Misses 4408 4410 +2
- Partials 2301 2302 +1
☔ View full report in Codecov by Sentry. |
@@ -202,8 +202,6 @@ export class SearchComponent implements OnInit, OnDestroy { | |||
} | |||
}); | |||
|
|||
this.hits = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this on purpose, so that code on line 325 of search.component.html doesn't flash
I can't find a screenshot of search in dockstore/dockstore#5468, is that the correct link? |
Whoops, nope, updated the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How mortifying. Nice catch. |
dockstore/dockstore#5648 Also replaced several any with types, which helped me understand the code as I was navigating it.
Use warning styling of search term suggestion as well.
f159529
to
49bcbf7
Compare
SonarCloud Quality Gate failed. 0 Bugs 21.2% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Closing this because of some odd CircleCI behavior: https://ucsc-gi.slack.com/archives/C05EZH3RVNY/p1698784510700059. Will create a new PR. |
Description
Display a message if there are no search results.
Also replaced several
any
with types, which helped me understand the code as I was navigating it.On the facets with no selected values being displayed (see screenshot in dockstore/dockstore#5648), I decided to leave it as is. It's complicated... If you select a non-binary facet, e.g., language, author, organization, etc., we show all the values so you can see what's not selected:
But when you select a binary facet, e.g., has checker workflow, open data, etc., then we only display the number of matches. This may be a result of the behavior of the ES API, but I'm not sure.
There's a weird intersection with the 2 types of facets both selected, and after looking at hopelessly for a bit, I decided to leave it. For example, to make the language facets disappear in the case described in the bug, we'd have to not show unselected facets for languages, but that would change the behavior in general.
Review Instructions
Navigate to the "short version" described in dockstore/dockstore#5648 -- you should see no search results and you should see a message like this:
Issue
dockstore/dockstore#5648
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
npm run build
markdown-wrapper
component, which does extra sanitizationnpm audit
and ensure you are not introducing new vulnerabilities