Commit graph

9 commits

Author SHA1 Message Date
Luke Elmers
b6287708f6
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic
License 2.0, AGPL 3.0, or SSPL 1.0.
2024-09-06 19:02:41 -06:00
Nathan Reese
1616c3c22f
Move react controls into controls plugin (#190166)
Move react_controls from examples plugin to controls plugin. This PR
does not effect user facing features since it does not effect the legacy
control group implementation or its usage. Future PRs will integrate the
new control group with dashboard and ControlGroupRenderer and then
remove the legacy control group implementation.

PR increases page load bundle size because of new action registration
and the control group react embeddable registration. This will be a
temporary increase as removing the legacy control group will remove the
legacy embeddable factory registration, which is larger then react
embeddable registration.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-09 12:29:40 -06:00
Hannah Mudge
a1fe300a03
[Embeddable Rebuild] [Controls] Refactor options list control (#186655)
Closes https://github.com/elastic/kibana/issues/184374

## Summary

> [!NOTE]
> This PR has **no** user-facing changes - all work is contained in the
`examples` plugin.

### Design reviewers
The `options_list.scss` file in this PR is just a cleaned up /
simplified copy of
https://github.com/elastic/kibana/blob/main/src/plugins/controls/public/options_list/components/options_list.scss.
We are migrating the controls in the examples folder. Once all controls
are migrated, we will replace the embeddable controls with the migrated
controls from the examples



### Presentation reviewers

This PR refactors the options list control to the new React control
framework.




https://github.com/user-attachments/assets/2fcff028-4408-427e-aa19-7d1e4eaf1e76





### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-01 14:02:18 -05:00
Nathan Reese
b40fc62979
[controls] migrate range slider control to new controls framework (#186195)
Closes https://github.com/elastic/kibana/issues/184375

### Design reviewers
scss is just a copy from
https://github.com/elastic/kibana/blob/main/src/plugins/controls/public/range_slider/components/range_slider.scss.
We are migrating the controls in the examples folder. Once all controls
are migrated, we will replace the embeddable controls with the migrated
controls from the examples

### Presentation reviewers
Run range slider control in controls example application
<img width="600" alt="Screenshot 2024-06-25 at 1 07 51 PM"
src="f57b7cec-923b-4ec3-8ba5-e53d92bc3e49">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-07-01 15:21:25 -06:00
Nathan Reese
ee03a1a6ba
Migrate time slider control (#184958)
Closes https://github.com/elastic/kibana/issues/184376

### Note for design review
index.scss file is just copy of
https://github.com/elastic/kibana/blob/main/src/plugins/controls/public/time_slider/components/index.scss.
We are migrating controls in the examples folder and then will migrate
these back into src folder once the migration is complete

### Changes

Changes to ControlGroupApi
* Implement timeslice$ API
* Implement autoApplySelections$
* Runtime state `autoApplySelections` is inverse of serialized state
`showApplySelections`

<img width="1000" alt="Screenshot 2024-06-11 at 12 56 45 PM"
src="dc27e3e3-6c25-4d5a-ab25-bfcc9bb38178">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <hannah.wright@elastic.co>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
2024-06-20 14:05:54 -06:00
Hannah Mudge
36f2ff409f
[Embeddable Rebuild] [Controls] Add control registry + example React control (#182842)
Closes https://github.com/elastic/kibana/issues/184373

## Summary

This PR marks the first step of the control group migration to the new
React embeddable system. A few notes about this:
- In the new system, each individual control will no longer be an
"embeddable" - instead, we are creating a **new** control-specific
registry for all controls. This is **modelled** after the embeddable
registry, but it is locked down and much more controls-specific.
- Most of the work accomplished in this PR is hidden away in the
`examples` plugin - that way, user-facing code is not impacted. After
some discussion, we decided to do it this way because refactoring the
control group to work with both legacy and new controls (like we did for
the dashboard container) felt like a very large undertaking for minimal
benefit. Instead, all work will be contained in the example plugin
(including building out the existing control types with the new
framework) and we will do a final "swap" of the legacy control group
with the new React control group as part of
https://github.com/elastic/kibana/issues/174961
- This PR does **not** contain a fully functional control group
embeddable - instead, the main point of this PR is to introduce the
control registry and an example control. The current control group
embeddable is provided just to give the **bare minimum** of
functionality.
- In order to find the new Search control example, navigate to Developer
Examples > Controls > Register a new React control
- The example search control only works on text fields. See
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
and
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html
for information on the two search techniques.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-05 08:51:37 -06:00
Sébastien Loix
9db8d2558c
[Core] Deprecate nav link status (#176383) 2024-02-16 11:06:33 -07:00
Nathan Reese
b5d3a63516
[controls] add filters, query, and timeRange props to ControlGroupRenderer and create search example (#147581)
Part of https://github.com/elastic/kibana/issues/145428

PR makes the following changes:
1) updates ControlGroupRenderer component with declarative properties
for filters, query, and timeRange.
2) creates a search example showing how to use controls to narrow
results
3) Updates redux example to use web logs sample data set
4) Updates existing uses of ControlGroupRenderer to use new props.

<img width="600" alt="Screen Shot 2022-12-14 at 4 29 58 PM"
src="https://user-images.githubusercontent.com/373691/207719012-28771203-27c3-45c0-a8ac-2bf96c10f641.png">

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-19 13:44:39 -05:00
Hannah Mudge
bb91749f0c
[Controls] [Portable Dashboards] Add control group renderer example plugin (#146189)
Closes https://github.com/elastic/kibana/issues/145429

## Summary

This PR expands on the control group building block by 
1. Replacing the old `input` declarative API and replacing it with a
`getCreationOptions` callback
2. Exposing the redux embeddable tools to the consumer

As part of this, I created an example plugin to demonstrate some of the
new functionality 👍

![Nov-23-2022
10-27-08](https://user-images.githubusercontent.com/8698078/203611035-a9633929-2a49-4d06-b38f-fcf90d8fa885.gif)


Also, to avoid some code duplication, I had to move some code to the
generic `control_group_helpers.tsx` so that both the controls plugin and
the new example plugin could use it.

### Checklist

- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2022-11-24 14:00:49 -07:00