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

Allow plugins get vis embeddable to show in flyouts #4250

Conversation

lezzago
Copy link
Member

@lezzago lezzago commented Jun 6, 2023

Description

Allow plugins get vis embeddable to show in flyouts.
This prevents plugins from using the current embeddable object to show in the flyout as the breaks functionality in the main dashboard visualization.

Issues Resolved

This prevents plugins from using the current embeddable object to show in the flyout as the breaks functionality in the main dashboard visualization.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
await embeddable.populateVisLayers();

const embeddable = await fetchVisEmbeddable(savedObjectId);
setTimeRange(embeddable.timeRange);
Copy link
Member

Choose a reason for hiding this comment

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

For consistency, could we force this to be the same as it was before?

setTimeRange(getQueryService().timefilter.timefilter.getTime());

this means we don't have to make the private field public in embeddable as well. Plus if we move away from embeddables altogether, we will inevitably have to make this change.

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #4250 (70e9cb5) into feature/feature-anywhere (b05c633) will not change coverage.
The diff coverage is n/a.

@@                    Coverage Diff                    @@
##           feature/feature-anywhere    #4250   +/-   ##
=========================================================
  Coverage                     26.39%   26.39%           
=========================================================
  Files                           150      150           
  Lines                          3554     3554           
  Branches                        407      407           
=========================================================
  Hits                            938      938           
  Misses                         2592     2592           
  Partials                         24       24           
Flag Coverage Δ
Windows 26.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

}

embeddable.updateInput({
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

nit - all @ts-ignore statements should have explanatory comments. I'm also curious why it's necessary here - is it because you're just passing a partial input?

Copy link
Member

Choose a reason for hiding this comment

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

This was existing code moved here. The reason for the ignore here is that the embeddable is within a dashboard container that controls a refreshConfig field - this isn't included as part of the default embeddableInput that it resolves to, so IDEs complain about it

Copy link
Member

Choose a reason for hiding this comment

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

can you either add that to a comment or open an issue?

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