Skip to content

[8.19] [Discover] SCSS to Emotions migration part 3/4 (#222947)#224213

Merged
akowalska622 merged 4 commits intoelastic:8.19from
akowalska622:backport/8.19/pr-222947
Jun 18, 2025
Merged

[8.19] [Discover] SCSS to Emotions migration part 3/4 (#222947)#224213
akowalska622 merged 4 commits intoelastic:8.19from
akowalska622:backport/8.19/pr-222947

Conversation

@akowalska622
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## Summary

Parent issue: [[DataDiscovery] Replace SCSS with
CSS-in-JS](elastic#209807 (comment))

Followed [Emotion standards
guide](https://docs.google.com/document/d/1CPflY8yCc3lZDg2BQkaMTgIkZlqiAEyMcAAvZbsjcTc/edit?pli=1&tab=t.0#heading=h.4zj1jq66y5an)

Part 3 of SCSS -> Emotion migration. Files included:

### Part 3
- `src/platform/plugins/shared/field_formats/public/index.scss`
-
`src/platform/plugins/shared/field_formats/public/lib/content_types/_html_content_type.scss`
-
`src/platform/plugins/shared/field_formats/public/lib/content_types/_index.scss`
-
`src/platform/plugins/shared/field_formats/public/lib/converters/_index.scss`
-
`src/platform/plugins/shared/field_formats/public/lib/converters/_string.scss`
-
`src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_source/source.scss`
-
`src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table/table.scss`
-
`src/platform/plugins/shared/unified_doc_viewer/public/components/json_code_editor/json_code_editor.scss`

(cherry picked from commit adffdde)

# Conflicts:
#	src/core/packages/application/common/src/global_app_style.tsx
#	src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_source/source.tsx
#	src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table/table.scss
#	src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table/table.tsx
#	src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table/table_cell_value.tsx
@akowalska622 akowalska622 added the backport This PR is a backport of another PR label Jun 17, 2025
@akowalska622 akowalska622 enabled auto-merge (squash) June 17, 2025 10:38
@akowalska622 akowalska622 self-assigned this Jun 18, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #53 / Observability Logs Explorer DataSourceSelector with installed integrations and uncategorized data streams when open on the integrations tab should load more integrations by scrolling to the end of the list

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fieldFormats 70 57 -13
unifiedDocViewer 354 339 -15
total -28

Async chunks

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

id before after diff
unifiedDocViewer 247.4KB 233.3KB -14.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fieldFormats 62.1KB 57.4KB -4.7KB

History

cc @akowalska622

Copy link
Contributor

@AlexGPlay AlexGPlay left a comment

Choose a reason for hiding this comment

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

lgtm - just a quick question, is useMemoizedStyles not available in this 8.19?

@akowalska622 akowalska622 merged commit 5e7f466 into elastic:8.19 Jun 18, 2025
8 checks passed
@akowalska622
Copy link
Contributor Author

lgtm - just a quick question, is useMemoizedStyles not available in this 8.19?

It's not, it was not backported, but also as far as I know, while using euiThemeVars (old way) instead of useEuiTheme, it's not necessary to memoize them. useMemoizedStyles was introduced specifically for using useEuiTheme tokens (according to those guidelines)

akowalska622 added a commit that referenced this pull request Jul 28, 2025
… revert formatter styles (#228086) (#228941)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Discover][A11y] Add underline to search result highlights
(#228086)](#228086)

Additionally it reverts styles, which were accidentally deleted in
backport: #224213

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

<!--BACKPORT [{"author":{"name":"Ania
Kowalska","email":"63072419+akowalska622@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-22T09:54:02Z","message":"[Discover][A11y]
Add underline to search result highlights (#228086)\n\n##
Summary\n\nCloses #214592 \n\nThis PR adds `text-decoration: dotted
underline` to search result\nhighlights due to accessibility
reasons.\n\n<img width=\"1427\" height=\"493\" alt=\"Screenshot
2025-07-15 at 21 08
59\"\nsrc=\"https://github.com/user-attachments/assets/c9edb19a-7a59-4aef-b8fe-91f424f62abf\"\n/>\n\n<img
width=\"542\" height=\"774\" alt=\"Screenshot 2025-07-15 at 21 07
50\"\nsrc=\"https://github.com/user-attachments/assets/e7be0fd1-78d0-46a7-abc4-ec6f4652c7ab\"\n/>\n\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"24e9dc251093713f8d5e1a2585b0f0ad18b63a51","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Platform-Design","Project:Accessibility","WCAG
A","release_note:skip","impact:medium","Team:DataDiscovery","defect-level-1","backport:version","v9.1.0","v8.19.0","platform-accessibility","v9.2.0"],"title":"[Discover][A11y]
Add underline to search result
highlights","number":228086,"url":"https://github.com/elastic/kibana/pull/228086","mergeCommit":{"message":"[Discover][A11y]
Add underline to search result highlights (#228086)\n\n##
Summary\n\nCloses #214592 \n\nThis PR adds `text-decoration: dotted
underline` to search result\nhighlights due to accessibility
reasons.\n\n<img width=\"1427\" height=\"493\" alt=\"Screenshot
2025-07-15 at 21 08
59\"\nsrc=\"https://github.com/user-attachments/assets/c9edb19a-7a59-4aef-b8fe-91f424f62abf\"\n/>\n\n<img
width=\"542\" height=\"774\" alt=\"Screenshot 2025-07-15 at 21 07
50\"\nsrc=\"https://github.com/user-attachments/assets/e7be0fd1-78d0-46a7-abc4-ec6f4652c7ab\"\n/>\n\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"24e9dc251093713f8d5e1a2585b0f0ad18b63a51"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228086","number":228086,"mergeCommit":{"message":"[Discover][A11y]
Add underline to search result highlights (#228086)\n\n##
Summary\n\nCloses #214592 \n\nThis PR adds `text-decoration: dotted
underline` to search result\nhighlights due to accessibility
reasons.\n\n<img width=\"1427\" height=\"493\" alt=\"Screenshot
2025-07-15 at 21 08
59\"\nsrc=\"https://github.com/user-attachments/assets/c9edb19a-7a59-4aef-b8fe-91f424f62abf\"\n/>\n\n<img
width=\"542\" height=\"774\" alt=\"Screenshot 2025-07-15 at 21 07
50\"\nsrc=\"https://github.com/user-attachments/assets/e7be0fd1-78d0-46a7-abc4-ec6f4652c7ab\"\n/>\n\n\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[ ] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...","sha":"24e9dc251093713f8d5e1a2585b0f0ad18b63a51"}}]}]
BACKPORT-->

---------

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants