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

[App Search] Set up Curations routes & complete 'Edit Query' action in Analytics tables #91052

Merged
merged 7 commits into from
Feb 16, 2021

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Feb 10, 2021

Summary

This PR is sort of a half-and-half for setting up Curations and finishing Analytics.

  • Curations - 7b62f3a & c353437 & 7f8724a
    • Sets up the CurationsRouter (with TODOs)
    • Updates EngineRouter & EngineNav
    • Sets up a single server API route
  • Analytics - dbdde94 & 188b931 & d78e8a0
    • Adds missing TODO onClick functionality to the Edit Query action button/icon
    • Refactors tests for AnalyticsTable & RecentQueriesTable to call a DRY'd out set of test suites for the actions column (so they should run the same tests each per-file, without duplicating tests)

QA

Checklist

@cee-chen cee-chen added Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.12.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Feb 10, 2021
@cee-chen cee-chen requested review from JasonStoltz, byronhulcher and a team February 10, 2021 22:13
- to call find_or_create curation API & navigate to curation page

+ fix copy string, only just noticed this :doh:
- Refactor out into a single shared test helper file that both AnalyticsTable and RecentQueriesTable simply calls & runs (instead of copying and pasting the same tests twice into 2 diff files)
- note: test file can't be `.test.tsx` or Jest tries to automatically run it, which we don't want
@cee-chen cee-chen force-pushed the analytics-curations-bridge branch from d78e8a0 to 308291d Compare February 10, 2021 22:15

import { nextTick } from '@kbn/test/jest';

export const runActionColumnTests = (wrapper: ReactWrapper) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if I could export a reusable function that ran a set of tests and was super excited to find out that I could :) this DRY's out a huge amount of copied and pasted tests between the RecentQueriesTable and AnalyticsTable components.

Copy link
Member

@JasonStoltz JasonStoltz left a comment

Choose a reason for hiding this comment

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

Left some optional feedback. LGTM.

@JasonStoltz
Copy link
Member

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1214 1215 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.9MB 1.9MB +3.0KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cee-chen cee-chen merged commit f2e4cce into elastic:master Feb 16, 2021
@cee-chen cee-chen deleted the analytics-curations-bridge branch February 16, 2021 18:00
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 16, 2021
…n Analytics tables (elastic#91052)

* Set up Curations routes

* Update EngineRouter/Nav with Curations

* Set up Curations find_or_create API

* [bug] Fix view action not working correctly for "" query

* Add Edit query action
- to call find_or_create curation API & navigate to curation page

+ fix copy string, only just noticed this :doh:

* Add/update unit tests for action column

- Refactor out into a single shared test helper file that both AnalyticsTable and RecentQueriesTable simply calls & runs (instead of copying and pasting the same tests twice into 2 diff files)
- note: test file can't be `.test.tsx` or Jest tries to automatically run it, which we don't want

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #91528

Successful backport PRs will be merged automatically after passing CI.

@cee-chen
Copy link
Contributor Author

auto-backport label is awesome!

kibanamachine added a commit that referenced this pull request Feb 16, 2021
…n Analytics tables (#91052) (#91528)

* Set up Curations routes

* Update EngineRouter/Nav with Curations

* Set up Curations find_or_create API

* [bug] Fix view action not working correctly for "" query

* Add Edit query action
- to call find_or_create curation API & navigate to curation page

+ fix copy string, only just noticed this :doh:

* Add/update unit tests for action column

- Refactor out into a single shared test helper file that both AnalyticsTable and RecentQueriesTable simply calls & runs (instead of copying and pasting the same tests twice into 2 diff files)
- note: test file can't be `.test.tsx` or Jest tries to automatically run it, which we don't want

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants