Skip to content

[react@18] bump styled-components#192368

Merged
Dosant merged 9 commits intoelastic:mainfrom
Dosant:react18/bump-styled-components
Sep 20, 2024
Merged

[react@18] bump styled-components#192368
Dosant merged 9 commits intoelastic:mainfrom
Dosant:react18/bump-styled-components

Conversation

@Dosant
Copy link
Copy Markdown
Contributor

@Dosant Dosant commented Sep 9, 2024

Summary

Prep for #138222

This PR updates styled-components package to the latest v5 version. I would like to do it for react@18 upgrade to suppress a noisy warning that is coming from styled-components when it is used with react@18. Here is that PR https://github.com/styled-components/styled-components/pull/3564/files

Updates the failed snapshot tests.

Dear reviewers, could you please smoke-check your apps visually? This is a minor upgrade, but I think it is worth to click around anyway.

@Dosant Dosant changed the title bump styled components [react@18] bump styled-components Sep 9, 2024
@Dosant
Copy link
Copy Markdown
Contributor Author

Dosant commented Sep 10, 2024

@elasticmachine merge upstream

@Dosant Dosant added Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// release_note:skip Skip the PR/issue when compiling release notes labels Sep 10, 2024
@Dosant Dosant marked this pull request as ready for review September 10, 2024 16:01
@Dosant Dosant requested review from a team as code owners September 10, 2024 16:01
@Dosant Dosant requested review from a team and rylnd September 10, 2024 16:01
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@Dosant Dosant requested review from a team September 10, 2024 16:01
Copy link
Copy Markdown
Contributor

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for doing this.

@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. labels Sep 10, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

Copy link
Copy Markdown
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Security solutions changes LGTM. We've got some snapshot tests accidentally testing third-party APIs, which I'll open a PR for in a second 👍

rylnd added a commit to rylnd/kibana that referenced this pull request Sep 12, 2024
This removes some indavertent testing of third-party
APIs/implementations by not directly passing the result of a `render()`
call to `toMatchSnapshot()`. In all cases, this was solved by
passing `render().container` (the root element rendered by the
testing library) instead.

These changes remove implementation details of both styled-components
(elastic#192368 being the reason for this commit) and testing-library from the
snapshots.
@Dosant
Copy link
Copy Markdown
Contributor Author

Dosant commented Sep 13, 2024

@elasticmachine merge upstream

Copy link
Copy Markdown
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

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

APM Change LGTM 🚀

Copy link
Copy Markdown
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Data Discovery changes LGTM 👍

rylnd added a commit that referenced this pull request Sep 13, 2024
…2747)

## Summary

This removes some indavertent testing of third-party
APIs/implementations caused by directly passing the result of a
`render()` call to `toMatchSnapshot()`.

In all cases, this was solved by passing `render().container` (the root
element rendered by the testing library) instead.

These changes remove implementation details of both styled-components
(#192368 being the reason for this commit) and testing-library from the
snapshots.


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
…yled-components

# Conflicts:
#	x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/value_with_space_warning/__tests__/__snapshots__/value_with_space_warning.test.tsx.snap
@Dosant
Copy link
Copy Markdown
Contributor Author

Dosant commented Sep 19, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

kibana-ci commented Sep 19, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 0a211da
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192368-0a211da08a30

Failed CI Steps

Metrics [docs]

Page load bundle

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

id before after diff
kbnUiSharedDeps-npmDll 6.2MB 6.2MB +734.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Dosant Dosant merged commit b1434a4 into elastic:main Sep 20, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 20, 2024
## Summary

Prep for elastic#138222

This PR updates `styled-components` package to the latest v5 version. I
would like to do it for react@18 upgrade to suppress a noisy warning
that is coming from `styled-components` when it is used with react@18.
Here is that PR
https://github.com/styled-components/styled-components/pull/3564/files

Updates the failed snapshot tests.

Dear reviewers, could you please smoke-check your apps visually? This is
a minor upgrade, but I think it is worth to click around anyway.

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

💚 All backports created successfully

Status Branch Result
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 Sep 20, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[react@18] bump `styled-components`
(#192368)](#192368)

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

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

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2024-09-20T09:26:47Z","message":"[react@18]
bump `styled-components` (#192368)\n\n## Summary\r\n\r\nPrep for
https://github.com/elastic/kibana/issues/138222\r\n\r\n\r\nThis PR
updates `styled-components` package to the latest v5 version. I\r\nwould
like to do it for react@18 upgrade to suppress a noisy warning\r\nthat
is coming from `styled-components` when it is used with
react@18.\r\nHere is that
PR\r\nhttps://github.com/styled-components/styled-components/pull/3564/files\r\n\r\n\r\nUpdates
the failed snapshot tests.\r\n\r\n\r\nDear reviewers, could you please
smoke-check your apps visually? This is\r\na minor upgrade, but I think
it is worth to click around
anyway.","sha":"b1434a446fecd1feae4230e0e9a4fbe0fea4d8f1","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","apm:review"],"title":"[react@18]
bump
`styled-components`","number":192368,"url":"https://github.com/elastic/kibana/pull/192368","mergeCommit":{"message":"[react@18]
bump `styled-components` (#192368)\n\n## Summary\r\n\r\nPrep for
https://github.com/elastic/kibana/issues/138222\r\n\r\n\r\nThis PR
updates `styled-components` package to the latest v5 version. I\r\nwould
like to do it for react@18 upgrade to suppress a noisy warning\r\nthat
is coming from `styled-components` when it is used with
react@18.\r\nHere is that
PR\r\nhttps://github.com/styled-components/styled-components/pull/3564/files\r\n\r\n\r\nUpdates
the failed snapshot tests.\r\n\r\n\r\nDear reviewers, could you please
smoke-check your apps visually? This is\r\na minor upgrade, but I think
it is worth to click around
anyway.","sha":"b1434a446fecd1feae4230e0e9a4fbe0fea4d8f1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192368","number":192368,"mergeCommit":{"message":"[react@18]
bump `styled-components` (#192368)\n\n## Summary\r\n\r\nPrep for
https://github.com/elastic/kibana/issues/138222\r\n\r\n\r\nThis PR
updates `styled-components` package to the latest v5 version. I\r\nwould
like to do it for react@18 upgrade to suppress a noisy warning\r\nthat
is coming from `styled-components` when it is used with
react@18.\r\nHere is that
PR\r\nhttps://github.com/styled-components/styled-components/pull/3564/files\r\n\r\n\r\nUpdates
the failed snapshot tests.\r\n\r\n\r\nDear reviewers, could you please
smoke-check your apps visually? This is\r\na minor upgrade, but I think
it is worth to click around
anyway.","sha":"b1434a446fecd1feae4230e0e9a4fbe0fea4d8f1"}}]}]
BACKPORT-->

---------

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@Dosant Dosant added the React@18 label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:review ci:project-deploy-observability Create an Observability project React@18 release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.