Skip to content

Creating a Labs service for Presentation Solutions - #95435

Merged
clintandrewhall merged 35 commits into
elastic:masterfrom
clintandrewhall:experiments-service
Apr 7, 2021
Merged

Creating a Labs service for Presentation Solutions#95435
clintandrewhall merged 35 commits into
elastic:masterfrom
clintandrewhall:experiments-service

Conversation

@clintandrewhall

@clintandrewhall clintandrewhall commented Mar 25, 2021

Copy link
Copy Markdown
Contributor

Summary

Branch includes pre-requisite changes from #96185

This is a first attempt at an Labs Service and enablement UI for Canvas and Dashboard.

We have a number of projects coming up that would benefit from being a part of master with a feature flag for testing and evaluation with stakeholders. While there are a number of discussions and even long-term plans for such a system globally provided within Kibana, our need is more immediate, so creating an easily replaceable/alterable service within presentation_util made sense. It's also a good way to demonstrate our needs while those discussions take place.

Mar-31-2021 23-58-24

Features

  • This system uses our abstracted service model to provide an API to the React layer.
  • The ProjectConfig allows for a number of options:
    • isActive: whether the experiment is "flipped" in master by default;
    • environments: determines where flags can be set, (see "Environments", below);
    • solutions: determines to which solutions a project applies. This is useful for constraining the list of Projects in the LabsFlyout depending on where it is shown, (see "UI Components", below).

Environments

Projects can be enabled or disabled in a number of environments:

  • isActive: in the ProjectConfig, we can make an experiment "on by default" in code. It would be expected that this "flip" would be the first step towards removal of the project and its related branches
  • kibana: this corresponds directly to a uiSetting flag.
  • browser: sets the flag in localStorage of the browser instance. This means this flag persists after the browser is closed, (but only to the specific Kibana instance).
  • session: sets the flag in sessionStorage of the browser instance. This means the flag is reset whenever the tab or window is closed.

IMPORTANT: if the project has any branched code on the server, browser and session should not be allowed in the config. We should try to avoid branching in that way, however, opting instead for clean API paths that are invoked from the client.

UI Components

I created a "starting place" for lab project management in a EUIFlyout that can be placed in any solution that has the presentation_util context enabled. There is also a starter "Beaker Button" that demonstrates how to use the flyout. There are complete Storybook implementations for testing and iteration purposes.

@clintandrewhall clintandrewhall added review discuss Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// loe:medium Medium Level of Effort v8.0.0 impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:Canvas v7.13.0 labels Mar 25, 2021
@clintandrewhall
clintandrewhall requested a review from a team as a code owner March 25, 2021 16:25
@elasticmachine

Copy link
Copy Markdown
Contributor

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

@clintandrewhall
clintandrewhall requested review from a team as code owners March 27, 2021 03:30
clintandrewhall and others added 3 commits April 3, 2021 21:51
…vironment_switch.tsx

Co-authored-by: Michail Yasonik <michail@yasonik.com>
…periment_list_item.tsx

Co-authored-by: Michail Yasonik <michail@yasonik.com>
@clintandrewhall
clintandrewhall requested a review from myasonik April 4, 2021 03:03
@clintandrewhall

Copy link
Copy Markdown
Contributor Author

@myasonik Added and tested your change feedback... please take a look and let me know if there's anything else that would make this feature more accessible... and thanks for your review!! :elasticheart:

@clintandrewhall

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@clintandrewhall

Copy link
Copy Markdown
Contributor Author

Jenkins test this

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

The a11y fixes look great - thanks!

@clintandrewhall

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

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

Very excited about this! Let's talk in today's sync about what's left before this gets merged

@clintandrewhall
clintandrewhall removed the request for review from a team April 6, 2021 16:21
@clintandrewhall clintandrewhall changed the title Creating an Experiments service for Presentation Solutions Creating a Labs service for Presentation Solutions Apr 6, 2021
@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1086 1087 +1
presentationUtil 29 50 +21
total +22

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.3MB 1.3MB +710.0B
presentationUtil 20.8KB 46.5KB +25.7KB
total +26.4KB

Page load bundle

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

id before after diff
canvas 516.8KB 517.0KB +243.0B
presentationUtil 11.3KB 15.2KB +3.8KB
total +4.1KB
Unknown metric groups

async chunk count

id before after diff
presentationUtil 2 4 +2

History

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

@clintandrewhall clintandrewhall added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 7, 2021
@clintandrewhall
clintandrewhall merged commit 43baacd into elastic:master Apr 7, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 7, 2021
@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Backport successful

7.x / #96373

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 7, 2021
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
@clintandrewhall
clintandrewhall deleted the experiments-service branch May 28, 2021 04:43
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

auto-backport Deprecated - use backport:version if exact versions are needed discuss Feature:Canvas Feature:Dashboard Dashboard related features impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:enhancement review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants