Skip to content

[Ingest Pipelines] Fix add/edit processor flyout return focus behavior#239720

Merged
damian-polewski merged 1 commit intoelastic:mainfrom
damian-polewski:ingest_pipelines/fix_add_edit_processor_flyouts_return_focus_behavior
Oct 22, 2025
Merged

[Ingest Pipelines] Fix add/edit processor flyout return focus behavior#239720
damian-polewski merged 1 commit intoelastic:mainfrom
damian-polewski:ingest_pipelines/fix_add_edit_processor_flyouts_return_focus_behavior

Conversation

@damian-polewski
Copy link
Copy Markdown
Contributor

@damian-polewski damian-polewski commented Oct 20, 2025

Summary

Closes #217956, closes #218207

This PR fixes an issue with add/edit processor flyouts not returning focus to the correct element after closure.

Changes:

  • Added a optional buttonRef property to the EditorMode that allows to pass the trigger element reference using onTreeAction or editor.setMode.
  • Added returnFocus prop to AddProcessorForm and EditProcessorForm to allow focusing of the trigger element after flyout closure.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@damian-polewski damian-polewski self-assigned this Oct 20, 2025
@damian-polewski damian-polewski requested a review from a team as a code owner October 20, 2025 12:57
@damian-polewski damian-polewski added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes Feature:Ingest Node Pipelines Ingest node pipelines management backport:all-open Backport to all branches that could still receive a release labels Oct 20, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@damian-polewski damian-polewski changed the title fix: add/edit processor flyout return focus behavior [Ingest Pipelines] Fix add/edit processor flyout return focus behavior Oct 20, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #16 / Dataset Quality Dataset quality handles user privileges User can read logs-* User cannot monitor any data stream "before all" hook for "Estimated data are not available due to underprivileged user"

Metrics [docs]

Async chunks

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

id before after diff
ingestPipelines 346.0KB 346.7KB +655.0B

cc @damian-polewski

Copy link
Copy Markdown
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

changes lgtm, tested locally. Nice job @damian-polewski 🥳

@damian-polewski damian-polewski merged commit 6526f44 into elastic:main Oct 22, 2025
22 checks passed
@damian-polewski damian-polewski deleted the ingest_pipelines/fix_add_edit_processor_flyouts_return_focus_behavior branch October 22, 2025 08:55
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2

https://github.com/elastic/kibana/actions/runs/18710834199

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 22, 2025
elastic#239720)

## Summary

Closes elastic#217956, closes elastic#218207

This PR fixes an issue with add/edit processor flyouts not returning
focus to the correct element after closure.

Changes:

- Added a optional `buttonRef` property to the `EditorMode` that allows
to pass the trigger element reference using `onTreeAction` or
`editor.setMode`.
- Added `returnFocus` prop to `AddProcessorForm` and `EditProcessorForm`
to allow focusing of the trigger element after flyout closure.

(cherry picked from commit 6526f44)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 239720

Questions ?

Please refer to the Backport tool documentation

damian-polewski added a commit to damian-polewski/kibana that referenced this pull request Oct 22, 2025
elastic#239720)

## Summary

Closes elastic#217956, closes elastic#218207

This PR fixes an issue with add/edit processor flyouts not returning
focus to the correct element after closure.

Changes:

- Added a optional `buttonRef` property to the `EditorMode` that allows
to pass the trigger element reference using `onTreeAction` or
`editor.setMode`.
- Added `returnFocus` prop to `AddProcessorForm` and `EditProcessorForm`
to allow focusing of the trigger element after flyout closure.

(cherry picked from commit 6526f44)

# Conflicts:
#	x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/add_processor_button.tsx
#	x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/processors_empty_prompt.tsx
#	x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/processors_tree/components/tree_node.tsx
@damian-polewski
Copy link
Copy Markdown
Contributor Author

💔 Some backports could not be created

Status Branch Result
9.1
8.19 Conflict resolution was aborted by the user

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 239720

Questions ?

Please refer to the Backport tool documentation

@damian-polewski
Copy link
Copy Markdown
Contributor Author

8.19 does not contain returnFocus functionality in EuiFlyout of @elastic/eui package. Thus we cannot backport this change to 8.19 without updating the @elastic/eui package.

@damian-polewski damian-polewski added backport:version Backport to applied version labels v9.2.0 v9.1.0 and removed backport:all-open Backport to all branches that could still receive a release labels Oct 22, 2025
@kibanamachine kibanamachine added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Oct 22, 2025
kibanamachine added a commit that referenced this pull request Oct 22, 2025
…ehavior (#239720) (#240030)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Ingest Pipelines] Fix add/edit processor flyout return focus
behavior (#239720)](#239720)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Damian
Polewski","email":"125268832+damian-polewski@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-10-22T08:55:12Z","message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout
closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","Feature:Ingest Node
Pipelines","backport:all-open","v9.3.0"],"title":"[Ingest Pipelines] Fix
add/edit processor flyout return focus
behavior","number":239720,"url":"https://github.com/elastic/kibana/pull/239720","mergeCommit":{"message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout
closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239720","number":239720,"mergeCommit":{"message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09"}}]}]
BACKPORT-->

Co-authored-by: Damian Polewski <125268832+damian-polewski@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
damian-polewski added a commit that referenced this pull request Oct 23, 2025
…ehavior (#239720) (#240040)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Ingest Pipelines] Fix add/edit processor flyout return focus
behavior (#239720)](#239720)

<!--- Backport version: 10.1.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Damian
Polewski","email":"125268832+damian-polewski@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-10-22T08:55:12Z","message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout
closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","Feature:Ingest Node
Pipelines","backport:all-open","v9.3.0"],"title":"[Ingest Pipelines] Fix
add/edit processor flyout return focus
behavior","number":239720,"url":"https://github.com/elastic/kibana/pull/239720","mergeCommit":{"message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout
closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239720","number":239720,"mergeCommit":{"message":"[Ingest
Pipelines] Fix add/edit processor flyout return focus behavior
(#239720)\n\n## Summary\n\nCloses #217956, closes #218207\n\nThis PR
fixes an issue with add/edit processor flyouts not returning\nfocus to
the correct element after closure.\n\nChanges:\n\n- Added a optional
`buttonRef` property to the `EditorMode` that allows\nto pass the
trigger element reference using `onTreeAction` or\n`editor.setMode`.\n-
Added `returnFocus` prop to `AddProcessorForm` and
`EditProcessorForm`\nto allow focusing of the trigger element after
flyout
closure.","sha":"6526f446cbe3a83877af3e44cb3a18832b770d09"}},{"url":"https://github.com/elastic/kibana/pull/240030","number":240030,"branch":"9.2","state":"OPEN"}]}]
BACKPORT-->

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Oct 27, 2025
elastic#239720)

## Summary

Closes elastic#217956, closes elastic#218207

This PR fixes an issue with add/edit processor flyouts not returning
focus to the correct element after closure.

Changes:

- Added a optional `buttonRef` property to the `EditorMode` that allows
to pass the trigger element reference using `onTreeAction` or
`editor.setMode`.
- Added `returnFocus` prop to `AddProcessorForm` and `EditProcessorForm`
to allow focusing of the trigger element after flyout closure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Ingest Node Pipelines Ingest node pipelines management release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.1.7 v9.2.1 v9.3.0

Projects

None yet

5 participants