Skip to content

Commit

Permalink
Merge branch 'main' into update-renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Nov 28, 2022
2 parents ee04d8b + 469ba55 commit d1eefc3
Show file tree
Hide file tree
Showing 13 changed files with 12,905 additions and 12,891 deletions.
6 changes: 3 additions & 3 deletions extension/src/experiments/columns/collect/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ const mergeParentColumnByPath = (
parentPath: string,
label: string
) => {
if (!acc[path]) {
if (acc[path]) {
acc[path].hasChildren = true
} else {
acc[path] = {
hasChildren: true,
label,
parentPath,
path,
type
}
} else {
acc[path].hasChildren = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion extension/src/experiments/model/quickPicks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const getItem = (experiment: Experiment, firstThreeColumnOrder: string[]) => ({
15
)

return value !== null ? `${truncatedKey}:${value}` : ''
return value === null ? '' : `${truncatedKey}:${value}`
})
.filter(Boolean)
.join(', '),
Expand Down
2 changes: 1 addition & 1 deletion extension/src/experiments/model/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class ExperimentsTree
path.slice(type.length + 1) || path,
30
)
return value !== null ? `| ${truncatedKey} | ${value} |\n` : ''
return value === null ? '' : `| ${truncatedKey} | ${value} |\n`
})
.join('')

Expand Down
2 changes: 1 addition & 1 deletion extension/src/experiments/model/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getDataFromColumnPath = (
return {
splitUpPath,
value:
columnPath === 'Created' && typeof value === 'undefined'
columnPath === 'Created' && value === 'undefined'
? null
: getStringifiedValue(value)
}
Expand Down
14 changes: 8 additions & 6 deletions extension/src/plots/model/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ const transformRevisionData = (
): { revisions: string[]; datapoints: unknown[] } => {
const field = multiSourceEncodingUpdate.strokeDash?.field
const isMultiSource = !!field

const availableRevisions = selectedRevisions.filter(rev =>
Object.keys(revisionData).includes(rev)
)
const transformNeeded =
isMultiSource && (isMultiView || isConcatenatedField(field))

Expand All @@ -551,7 +553,7 @@ const transformRevisionData = (
datapoints: selectedRevisions
.flatMap(revision => revisionData?.[revision]?.[path])
.filter(Boolean),
revisions: selectedRevisions
revisions: availableRevisions
}
}

Expand All @@ -562,12 +564,12 @@ const transformRevisionData = (
datapoints: updateDatapoints(
path,
revisionData,
selectedRevisions,
availableRevisions,
'rev',
fields
),
revisions: updateRevisions(
selectedRevisions,
availableRevisions,
multiSourceEncodingUpdate.strokeDash.scale.domain
)
}
Expand All @@ -577,11 +579,11 @@ const transformRevisionData = (
datapoints: updateDatapoints(
path,
revisionData,
selectedRevisions,
availableRevisions,
field,
fields
),
revisions: selectedRevisions
revisions: availableRevisions
}
}

Expand Down
Loading

0 comments on commit d1eefc3

Please sign in to comment.