-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[App Search] Added a query performance rating to the Result Settings page #96230
Conversation
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.
couple quick initial comments, need to take a break for the afternoon but will try to return
...c/applications/app_search/components/result_settings/query_performance/query_performance.tsx
Outdated
Show resolved
Hide resolved
...c/applications/app_search/components/result_settings/query_performance/query_performance.tsx
Outdated
Show resolved
Hide resolved
...c/applications/app_search/components/result_settings/query_performance/query_performance.tsx
Outdated
Show resolved
Hide resolved
...erprise_search/public/applications/app_search/components/result_settings/result_settings.tsx
Outdated
Show resolved
Hide resolved
...c/applications/app_search/components/result_settings/query_performance/query_performance.tsx
Outdated
Show resolved
Hide resolved
}; | ||
|
||
const getPerformanceRating = (score: number) => { | ||
switch (true) { |
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.
whoa TIL switch (true)
🤯
const { queryPerformanceScore } = useValues(ResultSettingsLogic); | ||
const performanceRating = getPerformanceRating(queryPerformanceScore); | ||
return ( | ||
<EuiBadge role="region" aria-live="polite" color={badgeColors[performanceRating]}> |
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.
Sweeeeet!
...se_search/public/applications/app_search/components/result_settings/result_settings.test.tsx
Outdated
Show resolved
Hide resolved
...se_search/public/applications/app_search/components/result_settings/result_settings_logic.ts
Show resolved
Hide resolved
...arch/public/applications/app_search/components/result_settings/result_settings_logic.test.ts
Show resolved
Hide resolved
@JasonStoltz BTW, it looks like this branch also needs to be merged/rebased against master to fix a merge conflict. |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
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.
Changes look fantastic, thanks Jason. Screenshot is awesome as well - it's all coming together!
…page (#96230) (#96449) Co-authored-by: Jason Stoltzfus <[email protected]>
Summary
This PR adds a "Query performance" badge to the Result Settings page.
The "Query performance" shows the current "rating" inside of a colored badge.
The "rating" shown is based on a numeric value that is calculated by summing numeric values based on the various "raw" and "snippet" settings currently selected.
The "score" is calculated as a "selector" in ResultSettingsLogic.
Based on the score, we show:
When the score is less than 6:
When the score is less than 11:
When the score is less than 21:
When the score is anything 21 or over:
Checklist
Delete any items that are not applicable to this PR.
For maintainers