-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Migrate expandedDoc to internalStateContainer #153369
Conversation
@@ -37,7 +36,6 @@ export function DiscoverMainApp(props: DiscoverMainProps) { | |||
const services = useDiscoverServices(); | |||
const { chrome, docLinks, data, spaces, history } = services; | |||
const usedHistory = useHistory(); | |||
const [expandedDoc, setExpandedDoc] = useState<DataTableRecord | undefined>(undefined); |
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 the main change, removal of expandedDoc
high up in the component tree
To DiscoverAppState / DiscoverDataStateContainer
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: cc @kertal |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
Looking great! Thanks, Matthias! 👍
Summary
This PR migrates the stateful
expandedDoc
property (It determines which ES document should be displayed in the flyout showing he doc viewer, and needs to be closed when e.g. the inspector is displayed) to theinternalStateContainer
, one lessuseState
based prop left that needs to be passed down the component tree.Additionally
AppState
is renamed toDiscoverAppState
,DataStateContainer
toDiscoverDataStateContainer
andInternalStateContainer
toDiscoverInternalStateContainer
for better consistency of naming and easier autocompletion when developingChecklist