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

[Security Solution] KQL query isn't visible in edit mode #203523

Closed
Tracked by #201502
maximpn opened this issue Dec 10, 2024 · 5 comments · Fixed by #208212
Closed
Tracked by #201502

[Security Solution] KQL query isn't visible in edit mode #203523

maximpn opened this issue Dec 10, 2024 · 5 comments · Fixed by #208212
Assignees
Labels
8.18 candidate bug Fixes for quality problems that affect the customer experience Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area fixed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0

Comments

@maximpn
Copy link
Contributor

maximpn commented Dec 10, 2024

Summary

KQL query bar edit component doesn't show long multiline KQL queries when KQL query is the last in the fields list. It's possible to navigate to the next line only by use Left/Right keyboard keys to reach end of line. Up/Down and scrolling navigation doesn't work. It's impossible to insert a new line symbol while many prebuilt rules have such symbols.

Steps to reproduce:

  • Prepare the environment
  • Open Rule Upgrade flyout for a Custom Query rule with KQL query field places the last, for example Possible Consent Grant Attack via Azure-Registered Application
  • Try to edit the KQL query

Expected behavior: The query is visible (many line are shown for long multiline queries) and it's possible to navigate with Up/Down keyboard keys. It's not possible to scroll down the query. There is no obstacle inserting new line symbols when necessary.

Actual behavior: The query isn't fully visible (only two lines a shown). It's not possible to navigate with Up/Down keyboard keys. It's not possible to scroll down. The component doesn't allow to insert new line symbols.

Screenshots:

Image

Setup the environment

  • Ensure the prebuiltRulesCustomizationEnabled feature flag is enabled
  • Allow internal APIs via adding server.restrictInternalApis: false to kibana.dev.yaml
  • Clear Elasticsearch data
  • Run Elasticsearch and Kibana locally (do not open Kibana in a web browser)
  • Install an outdated version of the security_detection_engine Fleet package
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 2023-10-31" -d '{"force":true}' http://localhost:5601/kbn/api/fleet/epm/packages/security_detection_engine/8.14.1
  • Install prebuilt rules
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 1" -d '{"mode":"ALL_RULES"}' http://localhost:5601/kbn/internal/detection_engine/prebuilt_rules/installation/_perform
@maximpn maximpn added bug Fixes for quality problems that affect the customer experience Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team triage_needed labels Dec 10, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@banderror banderror added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area 8.18 candidate v8.18.0 and removed triage_needed labels Dec 13, 2024
@banderror banderror assigned nikitaindik and unassigned banderror Dec 13, 2024
@banderror banderror assigned jkelas and unassigned nikitaindik Jan 3, 2025
@nikitaindik nikitaindik changed the title [Security Solution] KQL query isn't visible in edit more [Security Solution] KQL query isn't visible in edit mode Jan 23, 2025
jkelas added a commit that referenced this issue Feb 19, 2025
**Partially resolves: #203523**

## Summary

Fixing the issue of KQL query bar edit component not showing properly
long multiline KQL queries.

The query now isn't fully visible, and it's not possible to navigate
with Up/Down keyboard keys. It's also not possible to scroll down, as
the component doesn't allow to insert new line symbols.

I am fixing the behavior by:
- setting the `bubbleSubmitEvent={true}` so that the key press can
propagate to higher components and be served properly. This fixes the
problem of not allowing to enter new lines.
- I am not touching the broken behavior of Up/Down arrow keys, which
intercepts the event and instead of moving the cursor, iterates items in
the Suggestions panel, which is counterintuitive. Separate issue will be
created for the Kibana Visualization team.
- I am modifying one css style in Kibana Visualization to set height to
and adding a class to set proper alignment of buttons.

# BEFORE
- Not possible to insert new lines. 
- Arrow DOWN takes focus to Suggestions Panel, then together with Arrow
UP it is used to iterate the suggestions
- When textarea grows it gets hidden below the parent's panel


https://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9

# AFTER 
- Possible to insert new lines
- Behavior of DOWN / UP Arrows stays the same 
- When textarea grows the whole panel resizes



https://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2


https://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 19, 2025
**Partially resolves: elastic#203523**

## Summary

Fixing the issue of KQL query bar edit component not showing properly
long multiline KQL queries.

The query now isn't fully visible, and it's not possible to navigate
with Up/Down keyboard keys. It's also not possible to scroll down, as
the component doesn't allow to insert new line symbols.

I am fixing the behavior by:
- setting the `bubbleSubmitEvent={true}` so that the key press can
propagate to higher components and be served properly. This fixes the
problem of not allowing to enter new lines.
- I am not touching the broken behavior of Up/Down arrow keys, which
intercepts the event and instead of moving the cursor, iterates items in
the Suggestions panel, which is counterintuitive. Separate issue will be
created for the Kibana Visualization team.
- I am modifying one css style in Kibana Visualization to set height to
and adding a class to set proper alignment of buttons.

# BEFORE
- Not possible to insert new lines.
- Arrow DOWN takes focus to Suggestions Panel, then together with Arrow
UP it is used to iterate the suggestions
- When textarea grows it gets hidden below the parent's panel

https://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9

# AFTER
- Possible to insert new lines
- Behavior of DOWN / UP Arrows stays the same
- When textarea grows the whole panel resizes

https://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2

https://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a
(cherry picked from commit 8159319)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 19, 2025
**Partially resolves: elastic#203523**

## Summary

Fixing the issue of KQL query bar edit component not showing properly
long multiline KQL queries.

The query now isn't fully visible, and it's not possible to navigate
with Up/Down keyboard keys. It's also not possible to scroll down, as
the component doesn't allow to insert new line symbols.

I am fixing the behavior by:
- setting the `bubbleSubmitEvent={true}` so that the key press can
propagate to higher components and be served properly. This fixes the
problem of not allowing to enter new lines.
- I am not touching the broken behavior of Up/Down arrow keys, which
intercepts the event and instead of moving the cursor, iterates items in
the Suggestions panel, which is counterintuitive. Separate issue will be
created for the Kibana Visualization team.
- I am modifying one css style in Kibana Visualization to set height to
and adding a class to set proper alignment of buttons.

# BEFORE
- Not possible to insert new lines.
- Arrow DOWN takes focus to Suggestions Panel, then together with Arrow
UP it is used to iterate the suggestions
- When textarea grows it gets hidden below the parent's panel

https://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9

# AFTER
- Possible to insert new lines
- Behavior of DOWN / UP Arrows stays the same
- When textarea grows the whole panel resizes

https://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2

https://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a
(cherry picked from commit 8159319)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 19, 2025
**Partially resolves: elastic#203523**

## Summary

Fixing the issue of KQL query bar edit component not showing properly
long multiline KQL queries.

The query now isn't fully visible, and it's not possible to navigate
with Up/Down keyboard keys. It's also not possible to scroll down, as
the component doesn't allow to insert new line symbols.

I am fixing the behavior by:
- setting the `bubbleSubmitEvent={true}` so that the key press can
propagate to higher components and be served properly. This fixes the
problem of not allowing to enter new lines.
- I am not touching the broken behavior of Up/Down arrow keys, which
intercepts the event and instead of moving the cursor, iterates items in
the Suggestions panel, which is counterintuitive. Separate issue will be
created for the Kibana Visualization team.
- I am modifying one css style in Kibana Visualization to set height to
and adding a class to set proper alignment of buttons.

# BEFORE
- Not possible to insert new lines.
- Arrow DOWN takes focus to Suggestions Panel, then together with Arrow
UP it is used to iterate the suggestions
- When textarea grows it gets hidden below the parent's panel

https://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9

# AFTER
- Possible to insert new lines
- Behavior of DOWN / UP Arrows stays the same
- When textarea grows the whole panel resizes

https://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2

https://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a
(cherry picked from commit 8159319)
kibanamachine added a commit that referenced this issue Feb 19, 2025
…1805)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Fix editing in KQL Query Bar
(#208212)](#208212)

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

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-19T15:43:10Z","message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Fix editing in KQL Query
Bar","number":208212,"url":"https://github.com/elastic/kibana/pull/208212","mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208212","number":208212,"mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
kibanamachine added a commit that referenced this issue Feb 19, 2025
…1804)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Fix editing in KQL Query Bar
(#208212)](#208212)

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

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-19T15:43:10Z","message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Fix editing in KQL Query
Bar","number":208212,"url":"https://github.com/elastic/kibana/pull/208212","mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208212","number":208212,"mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
kibanamachine added a commit that referenced this issue Feb 19, 2025
…11803)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Solution] Fix editing in KQL Query Bar
(#208212)](#208212)

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

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-19T15:43:10Z","message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Fix editing in KQL Query
Bar","number":208212,"url":"https://github.com/elastic/kibana/pull/208212","mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208212","number":208212,"mergeCommit":{"message":"[Security
Solution] Fix editing in KQL Query Bar (#208212)\n\n**Partially
resolves: #203523**\n\n## Summary\n\nFixing the issue of KQL query bar
edit component not showing properly\nlong multiline KQL queries.\n\nThe
query now isn't fully visible, and it's not possible to navigate\nwith
Up/Down keyboard keys. It's also not possible to scroll down, as\nthe
component doesn't allow to insert new line symbols.\n\nI am fixing the
behavior by:\n- setting the `bubbleSubmitEvent={true}` so that the key
press can\npropagate to higher components and be served properly. This
fixes the\nproblem of not allowing to enter new lines.\n- I am not
touching the broken behavior of Up/Down arrow keys, which\nintercepts
the event and instead of moving the cursor, iterates items in\nthe
Suggestions panel, which is counterintuitive. Separate issue will
be\ncreated for the Kibana Visualization team.\n- I am modifying one css
style in Kibana Visualization to set height to\nand adding a class to
set proper alignment of buttons.\n\n# BEFORE\n- Not possible to insert
new lines. \n- Arrow DOWN takes focus to Suggestions Panel, then
together with Arrow\nUP it is used to iterate the suggestions\n- When
textarea grows it gets hidden below the parent's
panel\n\n\nhttps://github.com/user-attachments/assets/d97b81e3-7409-4089-865d-89ee702744f9\n\n#
AFTER \n- Possible to insert new lines\n- Behavior of DOWN / UP Arrows
stays the same \n- When textarea grows the whole panel
resizes\n\n\n\nhttps://github.com/user-attachments/assets/3a59923b-0fb1-49e7-b11d-55474f465ca2\n\n\nhttps://github.com/user-attachments/assets/48efd325-1c66-43ca-9936-69ef37b4ee7a","sha":"8159319d75a3563228378a54492cb27919efea18"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
@jkelas jkelas reopened this Feb 20, 2025
@jkelas jkelas added the fixed label Feb 20, 2025
@jkelas
Copy link
Contributor

jkelas commented Feb 20, 2025

@pborgonovi The bug has been fixed in #208212 and backported to the 8.18 branch. Please validate when you have time.

@pborgonovi
Copy link
Contributor

I've validated fix is good in both main and 8.18 branch

Screen.Recording.2025-02-20.at.11.56.59.AM.mov

Closing this bug as fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate bug Fixes for quality problems that affect the customer experience Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area fixed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0
Projects
None yet
6 participants