Skip to content

refactoring vis uiState - #15709

Merged
ppisljar merged 5 commits into
elastic:masterfrom
ppisljar:fix/uiState
Jan 4, 2018
Merged

ppisljar merged 5 commits into
elastic:masterfrom
ppisljar:fix/uiState

Conversation

@ppisljar

Copy link
Copy Markdown
Contributor

resolves #15703

  • the clone method was removed from Vis as its no longer used
  • the uiState parameter was removed from Vis constructor as it was only used by clone method
  • the watch on uiState was removed from visualize as the uiState should not change
  • setting of uiState on vis needs to happen in visualize as well as in visualization

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what if vis has a uiState before this gets called ?
what if $scope.uiState is different from the one set on vis ? which one should prevail ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(currently the one set on visualize/visualization will override the one set on Vis)

@ppisljar ppisljar added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) WIP Work in progress labels Dec 20, 2017
@timroes
timroes self-requested a review December 20, 2017 17:05

@timroes timroes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code itself looks good to me. The test failures though seem to be related to the change. If the tests pass, this is a LGTM.

@ppisljar

Copy link
Copy Markdown
Contributor Author

jenkins, test this

Comment thread src/ui/public/vis/vis.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/**
 * This is an internal method only meant to be used inside the visualization code.
 * You shouldn't call it when working with the `vis` class.
 * You should rely on the visualization code you are using (loader, <visualize/>, <visualization/>)
 * to use and set the uiState, that you passed to it.
 */

Comment thread src/ui/public/vis/vis.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well that didn't quite work as expected 😛

@ppisljar
ppisljar force-pushed the fix/uiState branch 2 times, most recently from f0bab53 to b0e783c Compare January 3, 2018 17:04
@ppisljar
ppisljar force-pushed the fix/uiState branch 2 times, most recently from 2cfa721 to 464283a Compare January 4, 2018 13:02
@ppisljar ppisljar added review v6.2.0 v7.0.0 and removed WIP Work in progress labels Jan 4, 2018
@ppisljar

ppisljar commented Jan 4, 2018

Copy link
Copy Markdown
Contributor Author

selenium tests failed (seems unrelated table test)

jenkins, test this

@thomasneirynck
thomasneirynck self-requested a review January 4, 2018 15:32
@ppisljar
ppisljar merged commit f7e79da into elastic:master Jan 4, 2018
ppisljar added a commit to ppisljar/kibana that referenced this pull request Jan 4, 2018
ppisljar added a commit that referenced this pull request Jan 5, 2018
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review v6.2.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vis.uiStateVal() doesn't update state in React Visualization

3 participants