Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'
- run: yarn
- run: yarn lint
Expand All @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'
- run: yarn install &> /dev/null
- run: yarn test
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'yarn'
- run: yarn
- run: yarn build:ci:clean
Expand Down
16 changes: 6 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
"typescript",
"typescriptreact"
],
"editor.formatOnSave": true,
"[javascript]": {
Expand All @@ -25,5 +18,8 @@
},
"[typescriptreact]": {
"editor.formatOnSave": false
}
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
}
21 changes: 20 additions & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ object-assign
*/

/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/*!
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.js.map

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions src/utils/LookmlDiagrammer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,24 @@ export function getJoinedViewsForViews(
})

const aIndex = aBaseObj.fieldIndex

const bIndex = bBaseObj.fieldIndex

const aName = diagramDict.tableData[a] ? a : explore.name
const bName = diagramDict.tableData[b] ? b : explore.name

if (aIndex < bIndex) {
return -1
} else if (
aIndex === bIndex &&
diagramDict.tableData[aName].length <
diagramDict.tableData[bName].length
) {
return -1
const aLength = diagramDict.tableData[aName]?.length ?? 0
const bLength = diagramDict.tableData[bName]?.length ?? 0

if (aIndex !== bIndex) {
if (aIndex === undefined) return 1
if (bIndex === undefined) return -1
return aIndex < bIndex ? -1 : 1
}

if (aLength !== bLength) {
return aLength < bLength ? -1 : 1
}

return 1
})
scaffold[viewName] = joined
Expand Down
Loading
Loading