[App Search] Added a History tab to the Automated Curation detail view#115090
[App Search] Added a History tab to the Automated Curation detail view#115090JasonStoltz merged 4 commits intoelastic:masterfrom
Conversation
537cfc0 to
4e210bd
Compare
4e210bd to
ad6340a
Compare
byronhulcher
left a comment
There was a problem hiding this comment.
I think the column names for the log stream need to be i18n-ized, but I don't want to hold up merging any longer than necessary so I'm approving for now 👍
| { | ||
| type: 'field', | ||
| field: 'appsearch.search_relevance_suggestions.query', | ||
| header: 'Query', |
There was a problem hiding this comment.
Do these headers need to be i18n-ized?
There was a problem hiding this comment.
They do! This PR is in draft right now, so I'm just waiting on the finalized list of columns to show.
There was a problem hiding this comment.
This are all gone, using OOTB headers now: 81a0904
| const { engineName } = useValues(EngineLogic); | ||
| const [selectedPageTab, setSelectedPageTab] = useState(PROMOTED); | ||
|
|
||
| // This tab group is meant to visually mirror the dynamic group of tags in the ManualCuration component |
There was a problem hiding this comment.
This comment can get removed now that this tab group is no longer static
|
|
||
| expect(wrapper.find(PromotedDocuments)).toHaveLength(1); | ||
| expect(wrapper.find(OrganicDocuments)).toHaveLength(1); | ||
| expect(wrapper.find(History)).toHaveLength(0); |
There was a problem hiding this comment.
When I'm writing jest tests for React components, I try to avoid using events like clicks to modify the local state. In the manual_curation.test.tsx file you can see an example of how I'd write this kind of test
You don't have to change it here or how you do it in the future but wanted to present how I've been handling it
There was a problem hiding this comment.
Hmm, I think it's a little different. You are using Kea, I'm using local state. Using local state, I think I have to use a click to modify the local state.
There was a problem hiding this comment.
I think I have a way to mock useState, similar to how we mock useValues/useActions. I'll post in Slack
|
@byronhulcher This PR is finalized if you want to have a second look! |
|
|
||
| expect(wrapper.find(PromotedDocuments)).toHaveLength(1); | ||
| expect(wrapper.find(OrganicDocuments)).toHaveLength(1); | ||
| expect(wrapper.find(History)).toHaveLength(0); |
There was a problem hiding this comment.
I think I have a way to mock useState, similar to how we mock useValues/useActions. I'll post in Slack
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
|
Backported in #115650 |
Summary
Closes https://github.com/elastic/app-search-team/issues/1945
This adds a log stream to the history tab of the automated curations section.
If you want to test this, simply create an automated suggestion and then check out the History tab.
Checklist
Delete any items that are not applicable to this PR.
For maintainers