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] Change handling whitespace for textarea autoheight to pre #203993

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

jkelas
Copy link
Contributor

@jkelas jkelas commented Dec 12, 2024

Resolves: #178615

Summary

Change the way kbnQueryBar__textarea--autoHeight css class handles the whitespace. Instead of normal use pre. This improves the behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect Chrome nor Safari.

BEFORE

Chrome

image

Safari

image

Firefox (the issue is here)

image

AFTER

Chrome

image

Safari

image

Firefox (Note that the issue is gone)

image

Note: please notice that for some reason, with this setting, Firefox additionally presents the whole text at the bottom as one line. But that should be OK.
image

@jkelas jkelas added release_note:fix v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team backport:version Backport to applied version labels v8.18.0 v8.16.2 v8.17.1 labels Dec 12, 2024
@jkelas jkelas marked this pull request as ready for review December 12, 2024 11:41
@jkelas jkelas requested a review from a team as a code owner December 12, 2024 11:41
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@jkelas jkelas added v8.16.3 and removed v8.16.2 labels Dec 13, 2024
@jkelas jkelas merged commit e287528 into elastic:main Dec 13, 2024
11 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 13, 2024
…t to `pre` (elastic#203993)

**Resolves: elastic#178615**

## Summary

Change the way kbnQueryBar__textarea--autoHeight css class handles the
whitespace. Instead of `normal` use `pre`. This improves the
behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect
Chrome nor Safari.

## BEFORE
### Chrome
<img width="1013" alt="image"
src="https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e"
/>

### Safari
<img width="925" alt="image"
src="https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f"
/>

### Firefox **(the issue is here)**
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7"
/>

## AFTER
### Chrome
<img width="1014" alt="image"
src="https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b"
/>

### Safari
<img width="942" alt="image"
src="https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8"
/>

### Firefox **(Note that the issue is gone)**
<img width="924" alt="image"
src="https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97"
/>

Note: please notice that for some reason, with this setting, Firefox
additionally presents the whole text at the bottom as one line. But that
should be OK.
<img width="831" alt="image"
src="https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6"
/>

(cherry picked from commit e287528)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 13, 2024
…t to `pre` (elastic#203993)

**Resolves: elastic#178615**

## Summary

Change the way kbnQueryBar__textarea--autoHeight css class handles the
whitespace. Instead of `normal` use `pre`. This improves the
behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect
Chrome nor Safari.

## BEFORE
### Chrome
<img width="1013" alt="image"
src="https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e"
/>

### Safari
<img width="925" alt="image"
src="https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f"
/>

### Firefox **(the issue is here)**
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7"
/>

## AFTER
### Chrome
<img width="1014" alt="image"
src="https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b"
/>

### Safari
<img width="942" alt="image"
src="https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8"
/>

### Firefox **(Note that the issue is gone)**
<img width="924" alt="image"
src="https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97"
/>

Note: please notice that for some reason, with this setting, Firefox
additionally presents the whole text at the bottom as one line. But that
should be OK.
<img width="831" alt="image"
src="https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6"
/>

(cherry picked from commit e287528)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 13, 2024
…t to `pre` (elastic#203993)

**Resolves: elastic#178615**

## Summary

Change the way kbnQueryBar__textarea--autoHeight css class handles the
whitespace. Instead of `normal` use `pre`. This improves the
behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect
Chrome nor Safari.

## BEFORE
### Chrome
<img width="1013" alt="image"
src="https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e"
/>

### Safari
<img width="925" alt="image"
src="https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f"
/>

### Firefox **(the issue is here)**
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7"
/>

## AFTER
### Chrome
<img width="1014" alt="image"
src="https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b"
/>

### Safari
<img width="942" alt="image"
src="https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8"
/>

### Firefox **(Note that the issue is gone)**
<img width="924" alt="image"
src="https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97"
/>

Note: please notice that for some reason, with this setting, Firefox
additionally presents the whole text at the bottom as one line. But that
should be OK.
<img width="831" alt="image"
src="https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6"
/>

(cherry picked from commit e287528)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 13, 2024
…toheight to &#x60;pre&#x60; (#203993) (#204172)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Security Solution] Change handling whitespace for textarea
autoheight to &#x60;pre&#x60;
(#203993)](#203993)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-13T08:35:42Z","message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Change handling whitespace for textarea autoheight to
`pre`","number":203993,"url":"https://github.com/elastic/kibana/pull/203993","mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203993","number":203993,"mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 13, 2024
…oheight to &#x60;pre&#x60; (#203993) (#204173)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Change handling whitespace for textarea
autoheight to &#x60;pre&#x60;
(#203993)](#203993)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-13T08:35:42Z","message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Change handling whitespace for textarea autoheight to
`pre`","number":203993,"url":"https://github.com/elastic/kibana/pull/203993","mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203993","number":203993,"mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 13, 2024
…toheight to &#x60;pre&#x60; (#203993) (#204171)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] Change handling whitespace for textarea
autoheight to &#x60;pre&#x60;
(#203993)](#203993)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Jacek
Kolezynski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-13T08:35:42Z","message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","backport:version","v8.18.0","v8.16.3","v8.17.1"],"title":"[Security
Solution] Change handling whitespace for textarea autoheight to
`pre`","number":203993,"url":"https://github.com/elastic/kibana/pull/203993","mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203993","number":203993,"mergeCommit":{"message":"[Security
Solution] Change handling whitespace for textarea autoheight to `pre`
(#203993)\n\n**Resolves: #178615**\n\n## Summary\n\nChange the way
kbnQueryBar__textarea--autoHeight css class handles the\nwhitespace.
Instead of `normal` use `pre`. This improves the\nbehavior for long
pre-formatted texts in the query field in Firefox. It doesn't
affect\nChrome nor Safari.\n\n\n## BEFORE\n### Chrome \n<img
width=\"1013\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e\"\n/>\n\n###
Safari\n<img width=\"925\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f\"\n/>\n\n###
Firefox **(the issue is here)**\n<img width=\"927\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7\"\n/>\n\n\n##
AFTER\n### Chrome\n<img width=\"1014\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b\"\n/>\n\n###
Safari\n<img width=\"942\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8\"\n/>\n\n###
Firefox **(Note that the issue is gone)**\n<img width=\"924\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97\"\n/>\n\nNote:
please notice that for some reason, with this setting,
Firefox\nadditionally presents the whole text at the bottom as one line.
But that\nshould be OK.\n<img width=\"831\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6\"\n/>","sha":"e287528eda0ba1a3056c8693baeb8e7f6588342e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jacek Kolezynski <[email protected]>
@banderror banderror added bug Fixes for quality problems that affect the customer experience Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Edit Security Solution Detection Rule Editing workflow and removed v8.17.0 v8.16.2 labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Edit Security Solution Detection Rule Editing workflow release_note:fix 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.16.3 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
5 participants