kibana/examples
Marta Bondyra f5b185a28f
[kbn-grid-layout][dashboard] Basic keyboard interaction (#208286)
## Summary
Adds keyboard navigation for drag-and-drop interactions
Fixes https://github.com/elastic/kibana/issues/211925
Fixes https://github.com/elastic/kibana/issues/190448

### Supported features 
1. Resize panels


https://github.com/user-attachments/assets/ba7add16-a0c6-4f15-9f3b-0f8ef7caf8ac

2. Drag panels within the same section (dragging between sections is
pending)


https://github.com/user-attachments/assets/a1fd80af-63ca-4fa2-bded-3db9968a8366

3. Move rows up/down


https://github.com/user-attachments/assets/8d7e8d7d-b1bf-4abe-9cc2-28eeea9b43f8

### Interaction Flow

1. Start interaction with `Space` or `Enter`
2. Move using arrow keys
3. Finish by confirming (`Enter`/`Space`) or canceling (`Escape`)
(blurring also confirms the changes)

### Scrolling Behavior:
* Default browser scrolling is disabled in interaction mode to avoid
unexpected behavior and edge cases that would overcomplicate this simple
implementation.
* Scrolling occurs when the user reaches the edge of the screen while
resizing or dragging, allowing them to continue the interaction
smoothly.
* When the operation is confirmed, we also scroll to the element to make
sure it's in view.

### Missing (planned for another PR):
* A11y announcements 
* Dragging between sections
* This feature is not well unit-tested, but it's very difficult to do it
without mocking the crucial pieces of functionality. I'd vote to leave
it for now and add a few functional tests once we decide a strategy for
it, since drag and drop interactions are anyway quite difficult to
unit-test reliably anyway.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 11:29:02 +02:00
..
content_management_examples [Dashboard] Remove mSearch from content management (#210709) 2025-03-03 11:31:09 -05:00
controls_example [embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960) 2025-03-04 09:05:23 -07:00
data_view_field_editor_example Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
developer_examples [Discover][Tabs] New tabs package and initial implementation of components (#210674) 2025-02-21 14:00:40 +01:00
discover_customization_examples [Discover] Support state updates across tabs (#215620) 2025-03-31 15:41:59 -03:00
embeddable_examples [kbn-grid-layout] Add ability to create, edit, and delete rows (#209193) 2025-02-24 18:29:00 +00:00
error_boundary Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
eso_model_version_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
esql_ast_inspector Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
esql_validation_example Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-esql (#202722) 2024-12-09 11:33:55 +01:00
expressions_explorer SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
feature_control_examples [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
feature_flags_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
field_formats_example Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
files_example Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
grid_example [kbn-grid-layout][dashboard] Basic keyboard interaction (#208286) 2025-04-01 11:29:02 +02:00
guided_onboarding_example [Search] remove app search guided onboarding (#206670) 2025-01-24 09:46:05 -06:00
hello_world Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
locator_examples Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
locator_explorer SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
partial_results_example Upgrade EUI to v101.0.1 (#215698) 2025-03-28 19:29:23 +01:00
portable_dashboards_example [embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960) 2025-03-04 09:05:23 -07:00
preboot_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
resizable_layout_examples Preparation for High Contrast Mode, Analytics Experience domains (#202608) 2024-12-12 13:16:07 -06:00
response_stream [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
routing_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
screenshot_mode_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
search_examples [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
share_examples [Reporting] fix dashboard "Copy Post URL" action (#192530) 2024-10-08 01:54:21 +02:00
sse_example [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
state_containers_examples [Saved Queries] Rework saved query privileges (#202863) 2025-01-29 17:34:58 -04:00
ui_action_examples Preparation for High Contrast Mode, Core/SharedUX domains (#202606) 2024-12-05 08:26:41 -07:00
ui_actions_explorer SKA: Update broken references and URLs (#206836) 2025-01-28 03:32:48 +00:00
unified_doc_viewer Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
unified_field_list_examples Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-data-discovery (#203152) 2024-12-30 13:23:47 +01:00
unified_tabs_examples [Discover Session][Tabs] Tab preview (#214090) 2025-03-20 14:10:56 +02:00
user_profile_examples [Authz] Migrated routes with access tags to security config (#209756) 2025-02-11 21:36:38 +07:00
v8_profiler_examples [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
README.asciidoc Adds run without basepath configured to examples readme (#173086) 2023-12-12 11:22:02 -07:00

[[example-plugins]]
== Example plugins

This folder contains example plugins.  To run the plugins in this folder, use the `--run-examples` flag (without a basepath), via

[source,bash]
----
yarn start --run-examples
----