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

[react@18] bump styled-components #192368

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

Dosant
Copy link
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
Contributor Author

Dosant commented Sep 10, 2024

@elasticmachine merge upstream

@Dosant Dosant added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) 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 a review from rylnd September 10, 2024 16:01
@elasticmachine
Copy link
Contributor

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

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

@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 Observability Infrastructure & Services User Experience Team labels Sep 10, 2024
@elasticmachine
Copy link
Contributor

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

Copy link
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
Contributor Author

Dosant commented Sep 13, 2024

@elasticmachine merge upstream

Copy link
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
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
markov00 pushed a commit to markov00/kibana that referenced this pull request Sep 18, 2024
…stic#192747)

## 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
(elastic#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 Dosant added the backport:prev-minor Backport to the previous minor version (i.e. one version back from main) label Sep 19, 2024
@Dosant
Copy link
Contributor Author

Dosant commented Sep 19, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

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
46 checks passed
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
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
#138222 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":"#192368
bump `styled-components` (#192368)\n\n## Summary\r\n\r\nPrep for
#138222 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":"#192368
bump `styled-components` (#192368)\n\n## Summary\r\n\r\nPrep for
#138222 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:prev-minor Backport to the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.