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

[Canvas] Expression reveal image. #101987

Merged
merged 93 commits into from
Jul 1, 2021

Conversation

Kuznietsov
Copy link
Contributor

@Kuznietsov Kuznietsov commented Jun 11, 2021

Completes a part of #101377.

At this PR reveal Image expression is extracted from the canvas plugin and set up as a separate plugin.

List of required changes to be done:

  • Extract revealImage expression from canvas to a separate plugin.
  • Move it to ts and React.
  • Add a mechanism for enabling global support of legacy renderers.
  • Add support of legacy expression renderer for revealImage.
  • Add Storybook for the reveal image expression renderer.
  • Remove legacy expression from canvas plugin
  • Add fixes of errors
  • Discuss the way of registration names of expressions, elements and views for canvas on the setup step in expression_* plugins via calling the canvas internal API (the problem is related to restrictions of zones (oss and x-pack)
  • Implement ideas from the discussion

After reviews, need to make further changes:

  • Replace RendererHandlers with IInterpreterRendererHandlers
  • Change patching of shareable runtime renderers at canvas' setup to static import of renderer from plugin
  • Move elements and uiViews from expression_reveal_image back to canvas
  • Move all libs/helpers, which are reused in canvas and expression_reveal_image, to presentation_utils

Testing Notes

This moves the reveal_image expression function to a standalone plugin and refactors the code. To test, just test that the reveal_image expression in canvas continues to work as expected.

@kibanamachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@Kuznietsov Kuznietsov self-assigned this Jun 11, 2021
@Kuznietsov Kuznietsov added the WIP Work in progress label Jun 11, 2021
@Kuznietsov
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Kunzetsov

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Kunzetsov

handlers.event({ name: 'onResize', data: updateImageView });
handlers.done();
return () => {
handlers.event({ name: 'destroy' });
Copy link
Member

Choose a reason for hiding this comment

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

where is this event consumed ?

Copy link
Contributor Author

@Kuznietsov Kuznietsov Jun 29, 2021

Choose a reason for hiding this comment

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

where is this event consumed ?

src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx:31

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And you can find such a workflow in every renderer.

Copy link
Member

Choose a reason for hiding this comment

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

that's not consuming this event, onDestroy renderer is a separate thing. This event will get fired and the consumer (canvas app) would need to listen for it and react to it, renderers just won't get any information about this.

can you explain the workflow ?

Copy link
Contributor Author

@Kuznietsov Kuznietsov Jun 29, 2021

Choose a reason for hiding this comment

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

You were right. The workflow is further:

  1. For example, a user is pressing backspace after selecting the element.
    x-pack/plugins/canvas/public/components/workpad_page/workpad_interactive_page/interactive_workpad_page.js is rendering WorkpadShortcuts.
    Among them: x-pack/plugins/canvas/public/lib/element_handler_creators.ts:63. On backspace deleteNodes is executed. It is removing elements from redux state and calling rerender.
  2. After current rerender, componendWillUnmount is executed. We are writing in a functional way with hooks, so the returned function from useEffect is called at RenderWithFn component. (x-pack/plugins/canvas/public/components/render_with_fn/render_with_fn.tsx:84). It is emitting destroy on line 84.
  3. Renderer is listening to current event, by binding handlers.onDestroy(...) at src/plugins/expression_reveal_image/public/expression_renderers/reveal_image_renderer.tsx:31. On destroy it is unmounting component, which has been mounted in parent node.
  4. Component, which has been rendered by renderer is unmounting and calling event({ name: 'destroy' }). I believe, there was some idea behind it before, but now it is useless.
    Thank you, @ppisljar, for this suggestion.

@Kuznietsov
Copy link
Contributor Author

@elasticmachine merge upstream

Comment on lines 15 to 18
interface RevealImageComponentProps extends RevealImageRendererConfig {
handlers: IInterpreterRenderHandlers;
parentNode: HTMLElement;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For testability and concern separation maybe it would be useful to make this component more "presentational" and decouple it from the knowledge of "handlers".

Maybe handlers prop can be replaced by canonical React onSomething props:

Suggested change
interface RevealImageComponentProps extends RevealImageRendererConfig {
handlers: IInterpreterRenderHandlers;
parentNode: HTMLElement;
}
interface RevealImageComponentProps extends RevealImageRendererConfig {
onResize: () => void;
onLoaded: () => void;
onUnmount: () => void;
parentNode: HTMLElement;
}

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 assume, that moving from handlers to onSomething will make developers, who will extract other plugins, write a lot of boilerplate code for covering this pattern. We already have a standardized way of providing listeners and emitters from the plugin, which is calling a renderer. It is describing types, possible events, etc. And current component is locked in a scope of a renderer and not going to be used separately. I'm not really sure if it is needed.
But at the same moment, I assume, that I don't see all the map and can be out of knowledge of the whole idea. I should refer to somebody, who is more knowledgeable.

@crob611, what do you think about it? Are there any reasons for making such changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll provide such changes. Thanks for this suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -60,12 +63,15 @@ function RevealImageComponent({
}, [imgRef, handlers]);

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

this effect looks obsolete now, handlers will never change

Copy link
Contributor Author

@Kuznietsov Kuznietsov Jun 29, 2021

Choose a reason for hiding this comment

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

That code is for defining componentDidMount lifecycle. In the other words, it will execute once, on component mounting and will call destroy on unmount. That is what is expected from this useEffect block. I prefer to separate useEffect for different logical parts, based on its role.

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 removed it, because done is already calling after updating the dimensions of parentNode.

});

setLoaded(true);
handlers.done();
Copy link
Member

Choose a reason for hiding this comment

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

nit: seems this is the only handler used now, so i am also in favor of what vadim partialy suggested as well, to not pass whole handlers to this component, but rather just pass the done handler: <image_reveal onLoaded={handlers.done} which might make it easier to spot which handlers specific renderer depends upon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are we sure, that all further components will be using handlers in such a simple way? If not, we will provide a bad pattern. What would you say about it?

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 don't insist, I'm trying to imagine, what consequences it will cause.

Copy link
Member

Choose a reason for hiding this comment

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

no strong opinion on it, i think most renderers are not gonna use a lot of handlers, but some of course will.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

expression function should be registered on the server as well (and implementation if possible provided in common)

@Kuznietsov
Copy link
Contributor Author

expression function should be registered on the server as well (and implementation if possible provided in common)

@ppisljar, I've done changes, based on your suggestions.

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

app services related code LGTM

@Kuznietsov
Copy link
Contributor Author

app services related code LGTM

Thanks for the review and a lot of useful suggestions.

@Kuznietsov Kuznietsov added auto-backport Deprecated - use backport:version if exact versions are needed and removed backport labels Jun 30, 2021
@Kuznietsov Kuznietsov merged commit b352976 into elastic:master Jul 1, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 1, 2021
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1044 1032 -12
expressionRevealImage - 31 +31
presentationUtil 102 117 +15
total +34

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressionRevealImage - 4 +4
presentationUtil 113 137 +24
total +28

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
presentationUtil 1 3 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1.2MB 1.2MB +1.2KB
expressionRevealImage - 11.6KB +11.6KB
total +12.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
expressionRevealImage - 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
canvas 463.5KB 429.4KB -34.1KB
expressionRevealImage - 9.0KB +9.0KB
presentationUtil 43.9KB 74.7KB +30.8KB
savedObjects 52.4KB 52.3KB -101.0B
total +5.5KB
Unknown metric groups

API count

id before after diff
expressionRevealImage - 4 +4
presentationUtil 140 164 +24
total +28

async chunk count

id before after diff
expressionRevealImage - 1 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Kunzetsov

kibanamachine added a commit that referenced this pull request Jul 1, 2021
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Yaroslav Kuznietsov <[email protected]>
Kuznietsov added a commit to Kuznietsov/kibana that referenced this pull request Jul 1, 2021
* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>
Kuznietsov added a commit that referenced this pull request Jul 19, 2021
…3399)

* Added lazy loading of async libs to storybook.

* Refactored lazy loading of import for a storybook.

* more refactoring stuff.

* more refactoring.

* small refactor of waitFor.

* Added support of async functions.

* Types fix.

* fixed docs.

* Fixed some mistakes.

* Fixed type of tests.

* added type for async function to write dicts easier.

* Updated stories and view with async image.

* Changed all static to  async imports.

* Removed static import of `elasticLogo`. Fixed type error.

* Changed way of returning async functions in `functionWrapper`.

* fixed renderer test.

* fixed errors.

* added outline and fixed types.

* added outline everywhere.

* waitFor fixed.

* removed useless exports.

* Fixed type error.

* fixed types of dropdown_control.test.ts

* fixed `csv.test.ts` types.

* Tests fixed.

* Fixed storybooks.

* Fixed failed tests.

* [Canvas] Expression reveal image. (#101987)

* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>

* Fixed mistake of merge.

* Storybook fixed.

* Fixed a mistake that occurred while resolving merge conflicts.

* removed registerFunctionAsync and changed functionWrapper from async to sync. + RepeatImageFunction.

* Fixed async functionWrapper usage and fixed `image.test.js` to run.

* Added default value for image.

* More fixes of async.

* Fixed a lot of legacy.

* Type fixes.

* Fix of fallen tests.

* First part of suggestions completed.

* Made image required.

* Removed useless `async`

* Jest test fixed.

* Fixed code, based on nits.

* Moved to `emotion`.

* Fixed prettier error.

* replaced jsx pragma with react.

* Removed unused jsx.

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 19, 2021
…stic#103399)

* Added lazy loading of async libs to storybook.

* Refactored lazy loading of import for a storybook.

* more refactoring stuff.

* more refactoring.

* small refactor of waitFor.

* Added support of async functions.

* Types fix.

* fixed docs.

* Fixed some mistakes.

* Fixed type of tests.

* added type for async function to write dicts easier.

* Updated stories and view with async image.

* Changed all static to  async imports.

* Removed static import of `elasticLogo`. Fixed type error.

* Changed way of returning async functions in `functionWrapper`.

* fixed renderer test.

* fixed errors.

* added outline and fixed types.

* added outline everywhere.

* waitFor fixed.

* removed useless exports.

* Fixed type error.

* fixed types of dropdown_control.test.ts

* fixed `csv.test.ts` types.

* Tests fixed.

* Fixed storybooks.

* Fixed failed tests.

* [Canvas] Expression reveal image. (elastic#101987)

* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>

* Fixed mistake of merge.

* Storybook fixed.

* Fixed a mistake that occurred while resolving merge conflicts.

* removed registerFunctionAsync and changed functionWrapper from async to sync. + RepeatImageFunction.

* Fixed async functionWrapper usage and fixed `image.test.js` to run.

* Added default value for image.

* More fixes of async.

* Fixed a lot of legacy.

* Type fixes.

* Fix of fallen tests.

* First part of suggestions completed.

* Made image required.

* Removed useless `async`

* Jest test fixed.

* Fixed code, based on nits.

* Moved to `emotion`.

* Fixed prettier error.

* replaced jsx pragma with react.

* Removed unused jsx.

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit that referenced this pull request Jul 19, 2021
…3399) (#106103)

* Added lazy loading of async libs to storybook.

* Refactored lazy loading of import for a storybook.

* more refactoring stuff.

* more refactoring.

* small refactor of waitFor.

* Added support of async functions.

* Types fix.

* fixed docs.

* Fixed some mistakes.

* Fixed type of tests.

* added type for async function to write dicts easier.

* Updated stories and view with async image.

* Changed all static to  async imports.

* Removed static import of `elasticLogo`. Fixed type error.

* Changed way of returning async functions in `functionWrapper`.

* fixed renderer test.

* fixed errors.

* added outline and fixed types.

* added outline everywhere.

* waitFor fixed.

* removed useless exports.

* Fixed type error.

* fixed types of dropdown_control.test.ts

* fixed `csv.test.ts` types.

* Tests fixed.

* Fixed storybooks.

* Fixed failed tests.

* [Canvas] Expression reveal image. (#101987)

* expression_reveal_image skeleton.

* expression_functions added.

* expression_renderers added.

* Backup of daily work.

* Fixed errors.

* Added legacy support. Added button for legacy.

* Added storybook.

* Removed revealImage from canvas.

* setState while rendering error fixed.

* tsconfig.json added.

* jest.config.js added.

* Demo doc added.

* Types fixed.

* added limits.

* Removed not used imports.

* i18n namespaces fixed.

* Fixed test suite error.

* Some errors fixed.

* Fixed eslint error.

* Removed more unused translations.

* Moved UI and elements, related to expressionRevealImage from canvas.

* Fixed unused translations errors.

* Moved type of element to types.

* Fixed types and added service for representing elements, ui and supported renderers to canvas.

* Added expression registration to canvas.

* Fixed

* Fixed mutiple call of the function.

* Removed support of a legacy lib for revealImage chart.

* Removed legacy presentation_utils plugin import.

* Doc error fixed.

* Removed useless translations and tried to fix error.

* One more fix.

* Small imports fix.

* Fixed translations.

* Made fixes based on nits.

* Removed useless params.

* fix.

* Fixed errors, related to jest and __mocks__.

* Removed useless type definition.

* Replaced RendererHandlers with IInterpreterRendererHandlers.

* fixed supported_shareable.

* Moved elements back to canvas.

* Moved views to canvas, removed expression service and imported renderer to canvas.

* Fixed translations.

* Types fix.

* Moved libs to presentation utils.

* Fixed one mistake.

* removed dataurl lib.

* Fixed jest files.

* elasticLogo removed.

* Removed elastic_outline.

* removed httpurl.

* Removed missing_asset.

* removed url.

* replaced mostly all tests.

* Fixed types.

* Fixed types and removed function_wrapper.ts

* Fixed types of test helpers.

* Changed limits of presentationUtil plugin.

* Fixed imports.

* One more fix.

* Fixed huge size of bundle.

* Reduced allow limit for presentationUtil

* Updated limits for presentationUtil.

* Fixed public API.

* fixed type errors.

* Moved css to component.

* Fixed spaces at element.

* Changed order of requiredPlugins.

* Updated limits.

* Removed unused plugin.

* Added rule for allowing import from __stories__ directory.

* removed useless comment.

* Changed readme.md

* Fixed docs error.

* A possible of smoke test.

* onResize changed to useResizeObserver.

* Remove useless events and `useEffect` block.

* Changed from passing handlers to separate functions.

* `function` moved to `server`.

* Fixed eslint error.

Co-authored-by: Kibana Machine <[email protected]>

* Fixed mistake of merge.

* Storybook fixed.

* Fixed a mistake that occurred while resolving merge conflicts.

* removed registerFunctionAsync and changed functionWrapper from async to sync. + RepeatImageFunction.

* Fixed async functionWrapper usage and fixed `image.test.js` to run.

* Added default value for image.

* More fixes of async.

* Fixed a lot of legacy.

* Type fixes.

* Fix of fallen tests.

* First part of suggestions completed.

* Made image required.

* Removed useless `async`

* Jest test fixed.

* Fixed code, based on nits.

* Moved to `emotion`.

* Fixed prettier error.

* replaced jsx pragma with react.

* Removed unused jsx.

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Yaroslav Kuznietsov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants