Skip to content
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

[Tree-widget]: learning snippets #1031

Merged
merged 31 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
923b676
initial tests
MartynasStrazdas Aug 22, 2024
f98dda0
test fixes and aditional tests
MartynasStrazdas Aug 26, 2024
33948ec
Tree widget left over tests
MartynasStrazdas Sep 2, 2024
4beb5b4
cleanup
MartynasStrazdas Sep 2, 2024
71c3c49
Merge branch 'master' into mast/tree-widget-learning-snippets
MartynasStrazdas Sep 2, 2024
67d5fa4
Update dependencies
MartynasStrazdas Sep 2, 2024
d1fe91a
warning fixes
MartynasStrazdas Sep 3, 2024
c457b69
readMe adjustments
MartynasStrazdas Sep 3, 2024
1ee0dbe
cleanUp
MartynasStrazdas Sep 3, 2024
ddd0656
cleanup
MartynasStrazdas Sep 3, 2024
ca71698
dependencies and act warning fixes
MartynasStrazdas Sep 3, 2024
9fb287c
import fix
MartynasStrazdas Sep 3, 2024
f5d6834
fix
MartynasStrazdas Sep 3, 2024
d556418
small fixes
MartynasStrazdas Sep 3, 2024
0b67cb9
Change
MartynasStrazdas Sep 3, 2024
5b18080
import order fix
MartynasStrazdas Sep 3, 2024
23aadb5
fixes
MartynasStrazdas Sep 3, 2024
727ea2d
Update change/@itwin-tree-widget-react-0bdfd58a-2c3d-4499-9a14-66ff2a…
MartynasStrazdas Sep 4, 2024
f1fb3b1
Fixes
MartynasStrazdas Sep 4, 2024
d04fba2
Merge branch 'mast/tree-widget-learning-snippets' of https://github.c…
MartynasStrazdas Sep 4, 2024
edc9d67
fixes
MartynasStrazdas Sep 4, 2024
cfbace8
readme adjustments
MartynasStrazdas Sep 4, 2024
eabaae3
pipeline fix
MartynasStrazdas Sep 4, 2024
168e9b5
Partial fixes
MartynasStrazdas Sep 5, 2024
fab7913
Update apps/learning-snippets/src/test/tree-widget/Telemetry.test.tsx
MartynasStrazdas Sep 5, 2024
75f7f0b
fixes
MartynasStrazdas Sep 5, 2024
1d54fa2
Merge branch 'mast/tree-widget-learning-snippets' of https://github.c…
MartynasStrazdas Sep 5, 2024
de361c5
fix
MartynasStrazdas Sep 5, 2024
9a5d9cd
Destructure useButtonProps result
saskliutas Sep 5, 2024
8e8cdc8
Merge branch 'master' into mast/tree-widget-learning-snippets
saskliutas Sep 5, 2024
830d630
lint
saskliutas Sep 5, 2024
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
18 changes: 17 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@
"outFiles": [
"${workspaceFolder}/packages/itwin/map-layers/lib/**/*.js"
]
},
{
"name": "Tests: Learning-snippets",
"cwd": "${workspaceFolder}/apps/learning-snippets",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/apps/learning-snippets/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"./.mocharc.json",
"--no-timeouts",
"lib/test/**/*.test.js"
],
"outFiles": [
"${workspaceFolder}/apps/learning-snippets/lib/**/*.js"
]
}
]
}
}
24 changes: 24 additions & 0 deletions apps/learning-snippets/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"require": [
"raf/polyfill",
"ignore-styles"
],
"check-leaks": true,
"timeout": "60000",
"globals": [
"IS_REACT_ACT_ENVIRONMENT"
],
"file": [
"./lib/test/setup.js"
],
"ignore": [
"lib/coverage/**/*"
],
"reporter": "node_modules/@itwin/build-tools/mocha-reporter",
"reporter-option": [
"mochaFile=lib/test/junit_results.xml"
],
"spec": [
"./lib/test/**/*.test.js"
]
}
42 changes: 42 additions & 0 deletions apps/learning-snippets/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const iTwinPlugin = require("@itwin/eslint-plugin");
const reactPlugin = require("eslint-plugin-react");
const eslintConfigPrettier = require("eslint-config-prettier");
const unusedImports = require("eslint-plugin-unused-imports");

module.exports = [
{
files: ["**/*.{ts,tsx}"],
...iTwinPlugin.configs.uiConfig,
rules: {
...iTwinPlugin.configs.uiConfig.rules,
"@itwin/no-internal": ["error"],
},
},
{
files: ["**/*.{ts,tsx}"],
rules: {
...reactPlugin.configs["jsx-runtime"].rules,
},
},
{
plugins: {
"unused-imports": unusedImports,
},
files: ["**/*.{ts,tsx}"],
rules: {
"no-duplicate-imports": "off",
"import/no-duplicates": "error",
"object-curly-spacing": ["error", "always"],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": ["error", { vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" }],
curly: ["error", "all"],
},
},
eslintConfigPrettier,
];
87 changes: 87 additions & 0 deletions apps/learning-snippets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"name": "@itwin/presentation-learning-snippets",
"version": "0.0.0",
"description": "Learning snippets for ReadMes",
"private": true,
"scripts": {
"build": "npm run link:deps && tsc",
"build:watch": "tsc -w",
"clean": "rimraf lib build",
"cover": "npm run -s test",
"lint": "eslint ./src/**/*.{ts,tsx}",
"test": "mocha --enable-source-maps --config ./.mocharc.json",
"docs": "betools extract --fileExt=ts,tsx --extractFrom=./src --recursive --out=./build/docs/extract",
"link:deps": "node ./scripts/linkWorkspaceDeps.js"
},
"dependencies": {
"@itwin/tree-widget-react": "workspace:*",
"@itwin/presentation-hierarchies": "^0.5.0",
"@itwin/presentation-shared": "^0.4.1",
"@itwin/itwinui-react": "3.14.1",
"@itwin/unified-selection": "^0.5",
"@itwin/appui-abstract": "^4.8.0",
"@itwin/appui-react": "^4.16.0",
"@itwin/build-tools": "^4.8.0",
"@itwin/components-react": "^4.16.0",
"@itwin/core-backend": "^4.8.0",
"@itwin/core-bentley": "^4.8.0",
"@itwin/core-common": "^4.8.0",
"@itwin/core-frontend": "^4.8.0",
"@itwin/core-geometry": "^4.8.0",
"@itwin/core-orbitgt": "4.8.0",
"@itwin/core-quantity": "^4.8.0",
"@itwin/core-react": "^4.16.0",
"@itwin/core-telemetry": "^4.8.0",
"@itwin/ecschema-metadata": "^4.8.0",
"@itwin/ecschema-rpcinterface-common": "^4.8.0",
"@itwin/ecschema-rpcinterface-impl": "^4.8.0",
"@itwin/eslint-plugin": "^4.1.1",
"@itwin/imodel-components-react": "^4.16.0",
"@itwin/presentation-backend": "^4.8.0",
"@itwin/presentation-common": "^4.8.0",
"@itwin/presentation-components": "^5.3.3",
"@itwin/presentation-frontend": "^4.8.0",
"@itwin/presentation-testing": "^5.0.13",
"@testing-library/dom": "^9.3.3",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/chai": "4.3.5",
"@types/jsdom": "^21.1.6",
"@types/mocha": "^10.0.6",
"@types/node": "^18.18.10",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@types/sinon": "^17.0.2",
"@types/sinon-chai": "^3.2.12",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"chai": "^4.3.7",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.34.4",
"eslint-plugin-unused-imports": "^3.2.0",
"fast-xml-parser": "^4.3.6",
"global-jsdom": "^9.2.0",
"ignore-styles": "^5.0.1",
"jsdom": "^23.1.0",
"mocha": "^10.2.0",
"raf": "^3.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^6.0.1",
"sinon": "^17.0.1",
"sinon-chai": "^3.7.0",
"typescript": "~5.0.0",
"xmlhttprequest": "^1.8.0"
},
"dependenciesMeta": {
"@itwin/tree-widget-react": {
"injected": true
}
},
"eslintConfig": {
"extends": [
".eslintrc.js"
]
}
}
Loading
Loading