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

[Discover] Deangularize result counter #65326

Closed
kertal opened this issue May 5, 2020 · 1 comment · Fixed by #65631
Closed

[Discover] Deangularize result counter #65326

kertal opened this issue May 5, 2020 · 1 comment · Fixed by #65631
Assignees
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kertal
Copy link
Member

kertal commented May 5, 2020

The part of Discover displaying the result count of a query, and providing a link to reset a query if a saved search is loaded is still Angular. This should be converted to React + EUI.
Bildschirmfoto 2020-05-05 um 16 43 25

It's the following part of Discover's template:

The component should be located in: /src/plugins/discover/public/application/components

The new component needs to registered as a react directive like this:

export function createNewReactComponentDirective(reactDirective: any) {
  return reactDirective(
    NewReactComponent,
    [
      ['nicePropA', watchDepth: 'value' }],
    ],
  );
}

This function needs to be registered in Discover's inner Angular like here

https://github.com/elastic/kibana/blob/master/src/plugins/discover/public/get_inner_angular.ts#L210

And can be used like this

<new-react-directive
     nice-prop-a="variableAssignedInScope"
></new-react-directive>
@kertal kertal added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels May 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants