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

[poc][serverless] Unified Navigation #152172

Closed

Conversation

clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Feb 27, 2023

Closing in favor of #153274

This PR sources changes from my fork of Kibana, which doesn't allow PRs opened against it to run CI and other tasks. I'm closing this PR in favor of #153274, which consolidates the changes.

Thank you to all who contributed here!

cc: @TattdCodeMonkey @semd @yuliacech @tsullivan


Summary

This POC is an application of the principles I've outlined elsewhere, using "unified navigation" as a functional example, where:

  • core changes are established as functional changes, rather than "serverless" changes;
    • e.g. chromeStyle, setSolutionNavigation
  • similarly, relevant plugins expose functional changes as APIs
    • e.g. isSidebarEnabled
  • a single serverless plugin provides APIs related to Serverless functional implementations;
    • e.g. setServerlessNavigation
  • other serverless-[project space] plugins use core, serverless and other plugins to create their Kibana configuration.

By simply enabling the serverless and serverless-* plugin, we can create a project.

Notes

  • The "stack" of commits in this PR are intentionally iterative, each laying out a part of the overall approach, hopefully making it easier to understand how some other functional change might be implemented.
  • The serverless plugin simply provides an alias to core to populate the navigation area. While anemic in this POC, it is assumed there would be much more business/functional logic here, and that we'd expect serverless-* plugins to avoid using core APIs directly, (beyond the obvious usages, e.g. basePath, etc)
  • This POC actually exposed a few bugs in plugin types regarding optional/required plugins. I'll likely split those changes out into a separate pull for clarity.
  • There are a few missing "boundary checks", like not allowing multiple plugins to call some of the new APIs multiple times, left for a production-quality implementation.

Testing

Run yarn serverless-oblt or yarn serverless-security locally.

Next Steps

The immediate next step is to coalesce the different navigation requirements into a @elastic/appex-sharedux component downstream teams could consume to create a unified experience, (@tsullivan) Look to serverless_*/public/plugin.tsx for calls to the serverless plugin to render navigation.

We've had conversations with @elastic/security-solution and @elastic/observability-ui, and we can use this POC as a "jumping-off point" to iterate on navigation schemes. We can also continue to use this to validate the UX technical approach.

@mwtyang
Copy link

mwtyang commented Feb 27, 2023

cc @sixstringcode @osmanis

@clintandrewhall clintandrewhall force-pushed the serverless/poc/navigation branch 4 times, most recently from 815e429 to 69b62cc Compare February 27, 2023 18:12
@clintandrewhall clintandrewhall force-pushed the serverless/poc/navigation branch from 69b62cc to ec92b8a Compare February 28, 2023 03:03
@clintandrewhall clintandrewhall force-pushed the serverless/poc/navigation branch from e43e5db to a1aa9cd Compare March 13, 2023 19:16
@kibana-ci
Copy link
Collaborator

kibana-ci commented Mar 16, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #3 / Export timelines Exports a custom timeline template
  • [job] [logs] Security Solution Tests #3 / Export timelines Exports a custom timeline template
  • [job] [logs] Security Solution Tests #3 / timeline flyout button the (+) button popover menu owns focus
  • [job] [logs] Security Solution Tests #3 / timeline flyout button the (+) button popover menu owns focus

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
core 415 417 +2
serverless - 10 +10
serverlessObservability - 4 +4
serverlessSearch - 5 +5
serverlessSecurity - 62 +62
total +83

Async chunks

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

id before after diff
enterpriseSearch 2.2MB 2.2MB +139.0B
management 34.0KB 34.0KB +31.0B
observability 1.1MB 1.1MB -910.0B
securitySolution 15.8MB 15.7MB -2.7KB
serverlessSecurity - 7.7KB +7.7KB
total +4.2KB

Page load bundle

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

id before after diff errors
core 350.8KB 355.7KB +4.9KB
enterpriseSearch 30.3KB 30.4KB +142.0B
fleet 125.6KB 125.6KB +8.0B
management 9.8KB 9.9KB +137.0B
observability 88.5KB 89.3KB +798.0B
security 60.7KB 60.9KB +149.0B
securitySolution 56.8KB 58.0KB +1.2KB
serverless - 4.0KB +4.0KB
serverlessObservability - 1.8KB +1.8KB
serverlessSearch - 2.5KB +2.5KB
serverlessSecurity - 29.0KB +29.0KB ❌ 12.8KB over limit
total +44.6KB
Unknown metric groups

async chunk count

id before after diff
serverlessSecurity - 1 +1

miscellaneous assets size

id before after diff
serverlessSecurity - 68.4KB +68.4KB

History

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

cc @tsullivan @rudolf @pgayvallet @lukeelmers @thomasneirynck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.