-
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
[PoC] persisted state service #63451
Conversation
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.
Pushed some updates to clean up the typings & remove casting, and I think everything works now. From another plugin, if you do this:
async start(core, { share }) {
const visDef = await share.persistableState.get('visualizations');
}
...then you should get the correct type on visDef
, with autocomplete working.
I also added mocks for the share plugin since there was a TS compilation failure on the vis mocks.
TS won't pass just yet though; there are a few failures related to vis tests that are using extractReferences
, but AFAIK nothing related to the new service.
src/plugins/share/public/persistable_state/persistable_state_service.ts
Outdated
Show resolved
Hide resolved
// TODO: should be PersistableState<SerializableState> | ||
[key: string]: PersistableState<unknown>; | ||
} |
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.
Same comment on SerializableState
-- this should replace unknown
once VisSavedObject
is updated or changed to a different interface.
type State = string | number | boolean | null | undefined | SerializableState; | ||
|
||
interface SerializableState { | ||
[key: string]: State | State[]; | ||
} |
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.
This is more or less ripped off from core's SavedObjectAttributes
, just with a different name to prevent confusion.
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/discover·ts.Discover "before all" hook for "main view"Standard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/console/_console·ts.console app console app "before all" hook for "should show the default request"Standard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/console/_console·ts.console app console app "before all" hook for "should show the default request"Standard Out
Stack Trace
and 25 more failures, only showing the first 3. History
To update your PR or re-run it, just comment with: |
f5d88da
to
c96387f
Compare
This seems like a new feature or enhancement so it shouldn't go in v7.8.1 patch release. I removed that label. You probably want to add v7.9.0 |
Summary
continuing on #63085
Checklist
Delete any items that are not applicable to this PR.
For maintainers