-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Index pattern save => Index pattern service #76706
Index pattern save => Index pattern service #76706
Conversation
@elasticmachine merge upstream |
…tkime/kibana into refactor_index_pattern_save_refactor
Pinging @elastic/kibana-app-arch (Team:AppArch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved to unblock merge request. src/core/server/server.api.md
will be updated when you update branch with the latest master
@@ -7,5 +7,5 @@ | |||
<b>Signature:</b> | |||
|
|||
```typescript | |||
QueryStringInput: React.FC<Pick<Props, "placeholder" | "onBlur" | "onChange" | "onSubmit" | "query" | "size" | "indexPatterns" | "prepend" | "screenTitle" | "dataTestSubj" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">> | |||
QueryStringInput: React.FC<Pick<Props, "query" | "prepend" | "size" | "className" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have the same problem with latest master? #76890
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that this type in the current form doesn't provide a lot of value and it's better to declare it explicitly microsoft/rushstack#1958 (comment) instead of relying on an inferred type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed export const QueryStringInput = withKibana(QueryStringInputUI);
to export const QueryStringInput = withKibana<Props>(QueryStringInputUI);
with no change in the resulting docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, because withKibana
is inferring the result type with Omit
.
Before:
const QueryStringInput: React.FC<Pick<Pick<Props, "query" | "prepend" ....>
After:
const QueryStringInput: React.FC<Pick<Props, "query" | "prepend" ....>
The main point that the generated document doesn't provide any useful information about the inferred interface. It's hard to say what is a type of query
property, for example.
For comparison: the output with an explicit QueryStringInputProps
interface #77054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right right.
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Index pattern save => Index pattern service
Summary
IndexPattern.save
=>IndexPatternsService.save
IndexPatternService
is passed intoIndexPattern
instances as a dependency. This is a temporary compromise while refactoring that allows smaller PRs.Checklist
For maintainers
Dev docs
IndexPattern.save
has been replaced withIndexPatternsService.save