Uh oh!
There was an error while loading. Please reload this page.
Lineage: improved node details, withLineage - #237
Conversation
- attempt to fuzzy match against run types
- allows for quickly populating side pane - can be enabled via "prefetchSeed" option on a lineage graph (true by default)
- common display component, DetailDisplay, shared with Detail (QueryGridModel variant)
- wraps DetailWithModel to provide QueryModel based component for lineage nodes
# Conflicts: # packages/components/package.json # packages/components/src/components/base/models/QueryInfo.ts # packages/components/src/components/forms/detail/Detail.tsx # packages/components/src/components/forms/detail/DetailEditRenderer.tsx # packages/components/src/components/lineage/Lineage.spec.ts # packages/components/src/components/lineage/LineageGraph.tsx # packages/components/src/components/lineage/LineageSummary.tsx # packages/components/src/components/lineage/SampleTypeLineageCounts.tsx # packages/components/src/components/lineage/actions.ts # packages/components/src/components/lineage/grid/LineageGrid.spec.tsx # packages/components/src/components/lineage/grid/LineageGrid.tsx # packages/components/src/components/lineage/grid/LineageGridDisplay.tsx # packages/components/src/components/lineage/models.ts # packages/components/src/components/lineage/node/LineageNodeDetail.tsx # packages/components/src/components/lineage/node/LineageNodeList.tsx # packages/components/src/components/lineage/types.ts # packages/components/src/components/lineage/utils.ts # packages/components/src/components/lineage/vis/VisGraph.tsx # packages/components/src/components/lineage/vis/VisGraphGenerator.ts # packages/components/src/index.ts # packages/components/src/stories/Lineage.tsx # packages/components/src/stories/mock.tsx
- linting updates
- provides "lineage" as a context provided value to sub-nodes of a withLineage wrapped component
- prepare steps header
- caches result + post-processing
- custom components for rendering run steps, node lists
- fix will be applied to server-side for dispensing decoded schemaNames This reverts commit f5f3f27
- shared anchor wrapping component for displaying hover links in lineage
# Conflicts: # packages/components/package.json # packages/components/src/index.ts # packages/components/src/stories/mock.tsx
labkey-alan
left a comment
There was a problem hiding this comment.
Looks good, but I did leave some specific pieces of feedback. Also worth noting VisGraph.highlightNode is unused and probably worth deleting?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
labkey-nicka
commented
Apr 30, 2020
It actually is in use in |
# Conflicts: # packages/components/package.json # packages/components/src/components/lineage/LineageSummary.tsx # packages/components/src/components/lineage/types.ts # packages/components/src/index.ts # packages/components/src/stories/Lineage.tsx
| return this.queryInfo?.getColumn(fieldKey); | ||
| } | ||
| get detailColumns(): QueryColumn[] { |
There was a problem hiding this comment.
Should the function return type be QueryColumn[] | undefined ?
| return this.queryInfo?.getAllColumns(this.viewName, List(this.omittedColumns)).toArray(); | ||
| } | ||
| get updateColumns(): QueryColumn[] { |
There was a problem hiding this comment.
Should the function return type be QueryColumn[] | undefined ?
| body = ( | ||
| <div> | ||
| {data.map((row: any, i: number) => { | ||
| // key safety |
There was a problem hiding this comment.
The 'key safety' comment could be more descriptive. Creating a case-insensitive (ordered) map seems like something we might have a utility method for. If not, then maybe we should?
Rationale
This PR updates our client-side
<LineageGraph />and related components to better support node details from theexperiment-lineage.api. Runs, Run Steps, Data Inputs & Outputs, Material Inputs & Outputs are now supported in the detail pane.Runs provide additional details:

Drill down into run steps:

Related Pull Requests
Changes
Lineage
withLineageHoC which coordinates fetching, loading, error, and loaded states for aLineagemodel. This model can be utilized by any componentwithLineagewraps.Lineage, the model that wraps ourexperiment-lineage.api, are now wrapped by thewithLineageHoC. This includes:<LineageGraph/><LineageGrid/><LineageSummary/><SampleTypeLineageCounts/>Lineagemodels toreactnglobal store. Lineage components are no longerreactn-based rendering this persistence unnecessary as it is no longer utilized. Invalidation of lineage results, viainvalidateLineageResults(), is still available, but the implementation has been moved.Lineagenow supports prefetching the lineage node for the specified seed. This utilizes therecently introduced
experiment-resolve.apiwhich allows for fetching of a single node from theserver (as opposed to the entire lineage). This "prefetch" request is made asynchronous to the lineage request and allows for resolving the seed node to occur before the entire lineage result is loaded. This is a follow on performance enhancement for 39252.
fetchLineagenow makes all requests againstexperiment-lineage.apiwith theincludeInputsAndOutputsandincludeRunStepsset to true.Lineage Graph
initialModelprop has been removed in favor of using the prefetching of the seed result(as mentioned above).
<LineageNodeDetailFactory/>, which contains logic for determining what component to show in the right-hand side of the<LineageGraph/>. This logic was formerly handled viaLineageGraph.renderSelectedNodes().Lineage Grid
Locationinto a new component,<LineageGridFromLocation/>, which takes a location and parses the props into a<LineageGrid />.<LineageGrid />still derives a model from the providedLineage, however, this now usesgetDerivedStateFromPropsto produce the next state.withQueryModels
<DetailPanelWithModel />which utilizeswithQueryModelsto render "detail" information from aQueryModel.<DetailDisplay/>, has been factored out of theQueryGridModel-based<Detail/>and is reused by heQueryModel-based<DetailPanelWithModel/>.LoadingStatea reusable enum across components. Factored out ofQueryModeland additionally used byLineage.detailColumnsandupdateColumnshas been added toQueryInfoto allow for shared access to this logic.isDetailColumnandisUpdateColumnhas been added toQueryColumnto allow for shared access to this logic.