Skip to content

[Fix] fix type issues from unparameterized PropsWithChildren type usages#182014

Merged
mistic merged 4 commits intoelastic:mainfrom
delanni:fix-type-errors-re-propswithchildren
Apr 29, 2024
Merged

[Fix] fix type issues from unparameterized PropsWithChildren type usages#182014
mistic merged 4 commits intoelastic:mainfrom
delanni:fix-type-errors-re-propswithchildren

Conversation

@delanni
Copy link
Copy Markdown
Member

@delanni delanni commented Apr 29, 2024

Summary

Original problem: PropsWithChildren require a generic type parameter (there's no default). This was not made visible in the merged PR, because we had type-checking on the PRs temporarily (accidentally) removed.

Thsi PR fixes the fallout from #181257 => Errors: https://buildkite.com/elastic/kibana-on-merge/builds/44454

@delanni delanni added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 29, 2024
@delanni delanni requested review from a team as code owners April 29, 2024 17:09
@delanni delanni added v8.14.0 v8.15.0 and removed backport:skip This PR does not require backporting labels Apr 29, 2024
@delanni delanni requested a review from a team as a code owner April 29, 2024 18:01
@delanni delanni requested review from a team as code owners April 29, 2024 19:49
@delanni delanni requested a review from a team April 29, 2024 19:49
@delanni delanni requested review from a team as code owners April 29, 2024 19:49
@delanni delanni requested a review from a team April 29, 2024 19:49
@delanni delanni requested review from a team as code owners April 29, 2024 19:49
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. labels Apr 29, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@pzl pzl requested review from tomsonpl and removed request for pzl April 29, 2024 19:50

export const FieldStatsFlyoutProvider: FC<{
children: React.ReactNode;
children?: React.ReactNode;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was causing an error in x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx if left as a required field


const renderUseMetricsExplorerDataHook = () => {
const wrapper: FC<PropsWithChildren> = ({ children }) => {
const wrapper: FC<PropsWithChildren<any>> = ({ children }) => {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was an any prior to the original PR as well, by committing the type for FC, this just makes it explicit. Would require a precise type.

};

export const TestProvidersComponent: FC<PropsWithChildren> = ({ children }) => (
export const TestProvidersComponent: FC<PropsWithChildren<any>> = ({ children }) => (
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If left as unknown it would cause issues where TestProvidersComponent is used

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/i18n-react 1 0 -1
@kbn/ml-url-state 2 1 -1
esUiShared 4 3 -1
presentationUtil 3 2 -1
total -4

History

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

Copy link
Copy Markdown
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

Shared UX changes LGTM

@mistic mistic merged commit 4a90df2 into elastic:main Apr 29, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.14 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.14:
- Add explicit children types (#181257)

Manual backport

To create the backport manually run:

node scripts/backport --pr 182014

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 182014 locally

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 1, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 182014 locally

2 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 182014 locally

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 182014 locally

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add the label auto-backport or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 182014 locally

@delanni delanni added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. v8.14.0 labels Aug 9, 2024
@delanni delanni deleted the fix-type-errors-re-propswithchildren branch August 9, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:review backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. v8.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants