Skip to content

reactifying visualization - #16425

Merged
ppisljar merged 12 commits into
elastic:masterfrom
ppisljar:fix/visualizationReact
Jun 27, 2018
Merged

ppisljar merged 12 commits into
elastic:masterfrom
ppisljar:fix/visualizationReact

Conversation

@ppisljar

@ppisljar ppisljar commented Jan 31, 2018 •

Copy link
Copy Markdown
Contributor

moves from angular to react

this is based on top of #16249 and requires the new inspector panel (spy panel replacement) @timroes is working on before it can be merged

huge thanks to @timroes for helping me out with this 👍

@ppisljar ppisljar added review WIP Work in progress Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v7.0.0 v6.3.0 labels Jan 31, 2018
@ppisljar ppisljar changed the title reactifying <visualization> reactifying visualization Jan 31, 2018
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from df4d11f to 820ffb6 Compare February 6, 2018 15:43
@thomasneirynck

Copy link
Copy Markdown
Contributor

I removed the 6.3 label for now, it's unlikely this'll make it I think.

@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from 820ffb6 to 4902023 Compare April 4, 2018 16:33
@thomasneirynck
thomasneirynck removed their request for review April 16, 2018 13:59
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from 4902023 to c641470 Compare April 26, 2018 12:25
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from c641470 to 7b6ec7f Compare June 6, 2018 15:33
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@elastic elastic deleted a comment from elasticmachine Jun 6, 2018
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch 3 times, most recently from 997af7c to cf5b74b Compare June 7, 2018 15:47
@ppisljar

Copy link
Copy Markdown
Contributor Author

inspector needs to be merged before this can proceed

@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from 30439c6 to bbb1e50 Compare June 20, 2018 13:14
@ppisljar ppisljar removed the blocked label Jun 20, 2018
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from bbb1e50 to e3582df Compare June 20, 2018 13:30
@ppisljar ppisljar removed the WIP Work in progress label Jun 20, 2018
@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from 7566373 to b7dd087 Compare June 27, 2018 04:34
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@ppisljar
ppisljar force-pushed the fix/visualizationReact branch from b7dd087 to ef2a599 Compare June 27, 2018 05:53
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Comment thread src/ui/public/visualize/loader/index.js Outdated

export * from './loader';
export * from './visualize_loader';
export * from './visualization_loader';

@timroes timroes Jun 27, 2018 •

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.

Since we don't want to make this a public API that third party plugins consume, could we perhaps not export this via the index.js file, so that we rather import from ui/visualize/loader/visualization_loader, and not having it in the same file that users import the visualize loader from, which we consider public? Maybe even rename that file to _visualization_loader just to make clear, that's nothing you should import outside of visualization code?

@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.

Some minor points.

I would really prefer if we make visualization loader more "invisible" so people not accidentally start using it.

this.forceUpdate();
};

static getDerivedStateFromProps(props, prevState) {

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.

Could we potentially move the static method to top (or less preferred by me: bottom), to not have it sitting somewhere in the middle?

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.

i think it makes more sense to order the methods in lifecycle order, but whatever ... this is a real nity pick by the way :)

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.

I know. That's why I didn't explicitly state it - I though you'll figure it out anyway :D

}));
setupAndTeardownInjectorStub();

describe('', () => {

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.

Missing title

}

render() {
renderPromise = new Promise((resolve) => {

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.

We could actually shorten this method to:

async render() {
  this.el.innerText = this.vis.params.markdown;
}

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.

but then we won't be able to wait for this renderPromise to be resolved

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.

That's true. Sorry haven't noticed that! Forget that comment.

@ppisljar

Copy link
Copy Markdown
Contributor Author

@timroes we re not hidding any other code we don't want 3rd party developers to use ? i think that's a bad concept.

@ppisljar
ppisljar merged commit 58cd7c8 into elastic:master Jun 27, 2018
ppisljar added a commit to ppisljar/kibana that referenced this pull request Jun 27, 2018
@timroes

timroes commented Jun 27, 2018

Copy link
Copy Markdown
Contributor

Yeah I know we don't do that in a lot of places (though we have some places where we use the _filename for private files), I am just a bit worried, since the visualize loader is actually one of the only APIs we really consider an API at the moment, and that it might just tend people start using the other (also since it's not obvious what visualize vs visualization is). But I also don't have too strong feelings, so go with your best judgment there :)

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

ppisljar added a commit that referenced this pull request Jun 27, 2018
@ppisljar
ppisljar deleted the fix/visualizationReact branch June 27, 2018 15:35
mattapperson pushed a commit that referenced this pull request Jun 28, 2018
@ppisljar
ppisljar restored the fix/visualizationReact branch September 26, 2018 10:06
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 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants