-
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
[Vis: Default editor] Create vis_options_react_wrapper #41746
Conversation
Pinging @elastic/kibana-app |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
Checked out and tested, LGTM
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.
LGTM, tested locally (Chrome, Mac)
sinon.assert.calledOnce(stageEditorParams); | ||
sinon.assert.calledWith(stageEditorParams, sinon.match(expectedParams)); | ||
}); | ||
expect(component).toMatchSnapshot(); // eslint-disable-line |
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.
Why is this line disabled for eslint?
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.
Seems something legacy and could be removed.
Will be removed in the next pr
* Add vis_options_react_wrapper * Update jest tests * Fix plugin functional test
💚 Build Succeeded |
Summary
A part of #38273.
This includes next changes:
vis-options-react-wrapper
directive which handles React.Component editors (using ngReact);VisOptionsReactWrapper
as a HOC for rendering thecomponent
prop;input_control_vis
editors due to updated props;input_control_vis
editors test cases;Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers
Dev Docs
API change of React visualization editor
The properties that get passed into a React visualization editor have slightly been changed:
editorState.params
→stateParams
stageEditorParams(newParams)
→setValue(paramName: string, paramValue: unknown)
(meaning that you can now set individual parameters in the editor without needing to copy over the previous params.scope
has been removed, which gave direct access to an Angular scope.vis
has been added to the properties to access the underlyingVis
object directly.You can check the custom visualization sample plugin for an always up to date example of building custom visualizations.