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

Move panel placement register to dashboard start contract #182571

Merged
merged 8 commits into from
May 6, 2024

Conversation

nickpeihl
Copy link
Member

@nickpeihl nickpeihl commented May 3, 2024

Part of #182585

Summary

Puts the registerDashboardPanelPlacementSetting function on the Dashboard start contract.

Rather than importing the module directly, consumers will need to include dashboard in their plugin's start dependencies.

@nickpeihl
Copy link
Member Author

/ci

}
return { width: 12, height: 8 };
}
);
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved this to the start lifecycle since the method is provided by DashboardStart.

@nickpeihl nickpeihl marked this pull request as ready for review May 3, 2024 15:59
@nickpeihl nickpeihl requested review from a team as code owners May 3, 2024 15:59
@nickpeihl nickpeihl added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team labels May 3, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

kibana-presentation changes LGTM
code review only

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label May 3, 2024
@nickpeihl
Copy link
Member Author

/ci

@nickpeihl nickpeihl requested a review from mgiota May 3, 2024 20:54
@@ -159,6 +149,16 @@ export class SloPlugin
const kibanaVersion = this.initContext.env.packageInfo.version;
const { ruleTypeRegistry, actionTypeRegistry } = pluginsStart.triggersActionsUi;

pluginsStart.dashboard.registerDashboardPanelPlacementSetting(
Copy link
Contributor

@mgiota mgiota May 6, 2024

Choose a reason for hiding this comment

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

@nickpeihl The SLO feature is only for users with platinum license and above. Can you check for proper license here? Let me know if you want me to do the change and push directly to your branch

Copy link
Contributor

@mgiota mgiota May 6, 2024

Choose a reason for hiding this comment

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

@nickpeihl I was now checking a draft PR by @ThomThomson and I noticed he didn't move the registration to the start method. He kept things in the setup method.

In his case he changed to pluginsSetup.embeddable.registerReactEmbeddableFactory. So maybe you want to try doing something similar pluginsSetup.dashboard.registerDashboardPanelPlacementSetting, instead of moving the whole thing in the start method and having to do the platinum check ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, you're right. I was misunderstanding the lifecycle. DashboardStart is available in the plugins' Setup lifecycle via the core.getStartServices method. Fixed in 79d8d9c.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok looks good! Let me quickly try it out locally, and then I'll happily approve

Copy link
Contributor

Choose a reason for hiding this comment

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

@nickpeihl I tested it and I verify that all works well!

Screenshot 2024-05-06 at 21 53 17

@nickpeihl nickpeihl requested a review from mgiota May 6, 2024 15:07
@kibana-ci
Copy link
Collaborator

kibana-ci commented May 6, 2024

💚 Build Succeeded

Metrics [docs]

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
dashboard 109 113 +4
slo 62 63 +1
total +5

Async chunks

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

id before after diff
dashboard 399.2KB 396.8KB -2.3KB
slo 764.4KB 764.4KB -5.0B
total -2.3KB

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5407 +5407
total size - 8.8MB +8.8MB

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
dashboard 12 13 +1

Page load bundle

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

id before after diff
dashboard 40.7KB 43.3KB +2.6KB
links 33.8KB 33.8KB +6.0B
slo 23.1KB 22.9KB -169.0B
total +2.5KB
Unknown metric groups

API count

id before after diff
dashboard 112 116 +4
slo 62 63 +1
total +5

History

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

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Thank you for doing this! LGTM!

@nickpeihl nickpeihl merged commit 0c0cf0a into elastic:main May 6, 2024
19 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project project:embeddableRebuild release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants