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][Labs] Integrate Labs Service into Canvas #96920

Merged
merged 13 commits into from
Apr 27, 2021

Conversation

clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Apr 13, 2021

Summary

This PR builds on #95435 by:

  • adding an Advanced Setting to show/hide the Canvas Labs button;
  • adding a menu control to trigger the flyout;
  • adding a check for the ability to set Advanced Settings, (and disabling the Kibana switch if the ability isn't available);
  • fixing a few bugs around the React.lazy loader.

Apr-12-2021 23-03-33

Screen Shot 2021-04-12 at 11 08 56 PM

I fully expect @ryankeairns and @poffdeluxe to have some feedback/improvements around the menu item. I considered having a menu popover with some explanation text, a button to open labs, etc... perhaps even a small table of which projects have an override? Pulls accepted!

We'll also need to decide whether this change should be backported to 7.13 or planned for 7.14.

@clintandrewhall clintandrewhall added review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small 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 release_note:feature Makes this part of the condensed release notes labels Apr 13, 2021
@clintandrewhall clintandrewhall requested a review from a team as a code owner April 13, 2021 04:06
@elasticmachine
Copy link
Contributor

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

@clintandrewhall
Copy link
Contributor Author

@elasticmachine merge upstream

@ryankeairns
Copy link
Contributor

ryankeairns commented Apr 13, 2021

@clintandrewhall just so that I'm clear, we're checking the interaction and UI, but the actual changing of the toolbar is not all hooked up, correct? (i.e. I don't see the toolbar change after refresh)

I'll keep poking at it, but I generally like the menu link approach you've taken here and the badge/count is nice.

@clintandrewhall
Copy link
Contributor Author

@ryankeairns That's correct, there's no actual project at the moment, it's just there more as a placeholder. This PR is all about the UI and interaction... we'll create real projects shortly thereafter.

@ryankeairns
Copy link
Contributor

@clintandrewhall here's a quick design PR with some minor adjustments that align closer to other parts of Kibana. I probably missed an i18n translation 😬

👉 clintandrewhall#21

Project list item (top) / aligns to Advanced settings design (bottom)

Screen Shot 2021-04-13 at 5 04 58 PM

Screen Shot 2021-04-13 at 5 06 42 PM

Close link added to footer

Screen Shot 2021-04-13 at 5 05 10 PM

@clintandrewhall
Copy link
Contributor Author

Thank you @ryankeairns !!

Align design to adv settings, copy updates
@clintandrewhall clintandrewhall requested a review from a team as a code owner April 14, 2021 01:54
@clintandrewhall clintandrewhall requested review from a team as code owners April 14, 2021 02:16
@clintandrewhall
Copy link
Contributor Author

@elasticmachine merge upstream

@ryankeairns
Copy link
Contributor

@clintandrewhall regarding the text to describe what Labs is - I would place that in the flyout header just below the Labs projects title. This seems like a natural fit/is a common pattern and means a single menu click still opens the flyout.

It would look something like this...
Screen Shot 2021-04-14 at 7 52 25 AM

...and can be achieved doing this...

        <EuiFlyoutHeader hasBorder>
          <EuiTitle size="m">
            <h2>
              <EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}>
                <EuiFlexItem grow={false}>
                  <EuiIcon type="beaker" size="l" />
                </EuiFlexItem>
                <EuiFlexItem>{strings.getTitleLabel()}</EuiFlexItem>
              </EuiFlexGroup>
            </h2>
          </EuiTitle>
          <EuiSpacer size="s" />
          <EuiText size="s" color="subdued">
            <p>Text description about the Labs feature and how it is used. Might link to the advanced setting for toggling this off/on.</p>
          </EuiText>
        </EuiFlyoutHeader>

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

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

I love it! I tested this out locally and couldn't find any issues

@clintandrewhall
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@cqliu1 cqliu1 left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I've just got a couple questions that don't block merging this PR.

Should we remove the unified toolbar setting for now and then reintroduce it when my Canvas toolbar stuff goes in?

Do we want to move this Labs button to the global nav along with the other WorkpadHeader buttons once I move that stuff to the global nav?

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.

Telemetry changes LGTM!

@clintandrewhall
Copy link
Contributor Author

@elasticmachine merge upstream

@clintandrewhall
Copy link
Contributor Author

Should we remove the unified toolbar setting for now and then reintroduce it when my Canvas toolbar stuff goes in?

Yeah, I'll remove it. I left it there for testing purposes.

Do we want to move this Labs button to the global nav along with the other WorkpadHeader buttons once I move that stuff to the global nav?

Yes indeed!

@clintandrewhall
Copy link
Contributor Author

@elasticmachine merge upstream

@clintandrewhall
Copy link
Contributor Author

clintandrewhall commented Apr 26, 2021

@ryankeairns 🚀 Opted to avoid the link, for now, since each solution will have a different advanced setting to show/hide Labs projects... we can do something more robust if it's adopted more broadly.

Screen Shot 2021-04-26 at 5 03 51 PM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1086 1089 +3
presentationUtil 96 98 +2
total +5

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
canvas 3 5 +2
presentationUtil 68 85 +17
total +19

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.3MB +1.8KB
presentationUtil 53.3KB 59.5KB +6.1KB
total +7.9KB

Page load bundle

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

id before after diff
canvas 518.4KB 518.9KB +520.0B
presentationUtil 37.7KB 40.3KB +2.5KB
total +3.1KB
Unknown metric groups

API count

id before after diff
canvas 4 6 +2
presentationUtil 70 87 +17
total +19

History

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 27, 2021
kibanamachine added a commit that referenced this pull request Apr 27, 2021
@clintandrewhall clintandrewhall deleted the canvas/labs branch May 28, 2021 04:43
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. loe:small Small Level of Effort release_note:feature Makes this part of the condensed release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants