-
Notifications
You must be signed in to change notification settings - Fork 90
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
Search: Query string syntax help #1828
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1828 +/- ##
=======================================
Coverage 89.49% 89.49%
=======================================
Files 62 62
Lines 7233 7233
=======================================
Hits 6473 6473
Misses 760 760
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
'@keyframes appear': { | ||
'0%': { | ||
transform: 'translateY(-10px)', | ||
}, | ||
'100%': { | ||
transform: 'translateY(0)', | ||
}, | ||
}, |
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.
Can replace it by <M.Slide />
or remove it completely, of course
@@ -0,0 +1,87 @@ | |||
{ |
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.
It's a lot of text, so I decided to move it outside of component
I didn't move the close button from SearchBox to dropdown yet. The close button purpose now is to collapse SearchBox and reset the input query. We can't collapse SearchBox on blur in this implementation, because click on the dropdown triggers a blur event. |
catalog/app/translations/en.json
Outdated
"searchQuerySyntax.objectAndPackage": " (objects & packages)", | ||
"searchQuerySyntax.operators.and.title": "Conjunction", | ||
"searchQuerySyntax.operators.exists.example": "_exists_:content", | ||
"searchQuerySyntax.operators.exists.title": "Has any non-null value for keyword", |
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.
"searchQuerySyntax.operators.exists.title": "Has any non-null value for keyword", | |
"searchQuerySyntax.operators.exists.title": "Matches any non-null value for the given field", |
catalog/app/translations/en.json
Outdated
"searchQuerySyntax.operators.and.title": "Conjunction", | ||
"searchQuerySyntax.operators.exists.example": "_exists_:content", | ||
"searchQuerySyntax.operators.exists.title": "Has any non-null value for keyword", | ||
"searchQuerySyntax.operators.group.title": "Group items", |
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.
"searchQuerySyntax.operators.group.title": "Group items", | |
"searchQuerySyntax.operators.group.title": "Group terms", |
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.
Simplified help text
Co-authored-by: Aneesh Karve <[email protected]>
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.
@@ -0,0 +1,313 @@ | |||
import cx from 'classnames' | |||
import * as Lab from '@material-ui/lab' |
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.
lab
should come after core
(A-Z) and scoped packages should come after non-scoped
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.
Fixed. I think that sorting rule should be operated by eslint https://eslint.org/docs/rules/sort-imports
setExpanded(false) | ||
setHelpOpened(false) | ||
if (onBlur) onBlur() | ||
}) |
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.
add onBlur
to deps
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.
I've added 'react-hooks/exhaustive-deps': 2
to .eslintrc
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.
some more inline comments
Resloved them all but one about import sorting.
a suboptimal ux... twitchy
I removed slide animation then. If animation is not smooth, I think it shouldn't be there. This dropdown has a lot of things, and it's heavy. I can improve performance by caching its content later
inconsistent margin / border
I don't recognize it unfortunately. Can you elaborate? Can I fix it as bug in another PR?
@@ -0,0 +1,313 @@ | |||
import cx from 'classnames' | |||
import * as Lab from '@material-ui/lab' |
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.
Fixed. I think that sorting rule should be operated by eslint https://eslint.org/docs/rules/sort-imports
setExpanded(false) | ||
setHelpOpened(false) | ||
if (onBlur) onBlur() | ||
}) |
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.
I've added 'react-hooks/exhaustive-deps': 2
to .eslintrc
@@ -3,20 +3,33 @@ import { push } from 'connected-react-router/esm/immutable' | |||
import * as React from 'react' | |||
import * as redux from 'react-redux' | |||
import * as M from '@material-ui/core' | |||
import * as Lab from '@material-ui/lab' |
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.
It is already. Did I miss something?
…ch-fields-query-string
done
I removed animation for now. But will fix it with another PR: will delay dropdown animation for sure, and try something more to make it smoother
Will fix border issues in another PR. I will play with margins too |
@@ -72,6 +69,7 @@ module.exports = { | |||
'react-hooks/rules-of-hooks': 'error', | |||
'redux-saga/no-yield-in-race': 2, | |||
'redux-saga/yield-effects': 2, | |||
'react-hooks/exhaustive-deps': 2, |
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.
@fiskus this is nice, but i think we should keep the A-Z order for consistency
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.
Got it. Will fix in the next PR
Description
Added
react-intl
for textMay pay attention to