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

[Pipeline Viewer] Refactor collapsible statement component to wrap props.children #20252

Conversation

justinkambic
Copy link
Contributor

Changes

The goal here is to decouple the CollapsibleStatement component from whatever type of plugin/branch body it will contain. To that end, we've moved the rendering of its children outside of the component, and refactored it to rely on props.children.

Resolves #19844

Testing this PR

There aren't any functional changes in this PR, so simply smoke testing the components should be sufficient.

  1. Start up a logstash pipeline with at least one if...else branch, with X-Pack Monitoring enabled.
  2. Open the monitoring view, access your pipeline.
  3. Ensure that:
    a. Pipeline Viewer loads
    b. You are able to use Detail Drawer
    c. You can collapse/expand branches

@justinkambic
Copy link
Contributor Author

@ycombinator sorry to ping you again, but I decided to ask for your review since this PR was based on a suggestion you had in a previous review for this component. Feel free to take as long as you need to get to this.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

statement,
statement: { vertex },
onShowVertexDetails
}) {
Copy link
Contributor

@ycombinator ycombinator Jun 28, 2018

Choose a reason for hiding this comment

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

Why does this function take one argument that's an object vs. multiple arguments corresponding to the values in the object? Not saying it's right/wrong, just that it seems inconsistent with the other functions in this module and functions elsewhere in general. I'm guessing I'm just missing something that's unique to this function or these particular parameters, maybe?

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'm guessing I'm just missing something that's unique to this function or these particular parameters, maybe?

I think you make a good point actually. There's no reason for these keys to not just be their own params.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ycombinator: a5dbb98

I like this a lot better actually, it simplifies everything and removes some unnecessary abstraction. WDYT?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM

@justinkambic justinkambic merged commit f763c3e into elastic:master Jul 2, 2018
justinkambic added a commit that referenced this pull request Jul 2, 2018
…ops.children (#20252)

* Rename config view to PipelineViewer.

* Decouple CollapsibleStatement from if/else using props.children.

* Modify function to take params instead of single object.
@justinkambic
Copy link
Contributor Author

Backported to:
6.x/6.4.0 08ba05e

@justinkambic justinkambic deleted the monitoring/collapsible-component-wrapper-class-refactor branch July 2, 2018 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants