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

Add Annotation Search and Verification Pages #2145

Merged
merged 106 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 98 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
f577236
Created verification interface
hudson-newey Jun 19, 2024
f592b24
Abstract out verification form
hudson-newey Jun 20, 2024
0d6a5a7
Backfilled verification models
hudson-newey Jun 20, 2024
7565f42
Created rudimentary search page
hudson-newey Jun 20, 2024
fef476a
Pushing
hudson-newey Jun 24, 2024
1f87fc7
Minor changes to verification interface
hudson-newey Jul 11, 2024
cd3df18
polish
hudson-newey Jul 11, 2024
55b370d
Push
hudson-newey Jul 15, 2024
5b782c2
Add tests
hudson-newey Jul 16, 2024
51e4525
Update verification component build
hudson-newey Aug 17, 2024
12cba40
Correctly import web components
hudson-newey Sep 23, 2024
608d6a3
Add auth token to verification grid media requests
hudson-newey Sep 27, 2024
85813bd
Basic test boilerplate
hudson-newey Sep 30, 2024
233d18b
Consolidate search and verification grid page
hudson-newey Sep 30, 2024
8daf3b6
Basic unit test outline
hudson-newey Sep 30, 2024
9742500
Update web-components version
hudson-newey Oct 1, 2024
1d90dbd
Add outline for web component tests
hudson-newey Oct 1, 2024
de1defc
Add warning modal for lost progress
hudson-newey Oct 1, 2024
0732783
Improve shadow root selectors
hudson-newey Oct 1, 2024
1450fab
Restructure annotation routes
hudson-newey Oct 2, 2024
eb5bf12
Add test fixtures for new routes
hudson-newey Oct 2, 2024
eab75c7
Improve test helpers
hudson-newey Oct 2, 2024
995effe
Staging annotation search form tests
hudson-newey Oct 2, 2024
425e3ce
Add id field to annotation search form
hudson-newey Oct 3, 2024
1feeeb1
Staging to use pagination template
hudson-newey Oct 3, 2024
9631d22
Use paginationTemplate for search results page
hudson-newey Oct 3, 2024
08c9774
Display warning when there are no filter conditions
hudson-newey Oct 3, 2024
74bfe09
Add context to grid tiles
hudson-newey Oct 3, 2024
b2a108e
Add support for UnsavedInputGuard
hudson-newey Oct 4, 2024
9dd24d5
Add theming colors to web components
hudson-newey Oct 4, 2024
37d6c92
Working mvp of verification interface
hudson-newey Oct 4, 2024
e214538
Fix search parameters on search page
hudson-newey Oct 7, 2024
5cc6da3
Do not show QSP for page=1
hudson-newey Oct 7, 2024
ffdf88a
Minor improvements
hudson-newey Oct 9, 2024
3bcceb2
Add support for adding custom elements
hudson-newey Oct 9, 2024
6637d05
Fix grid tile content component being rendered twice
hudson-newey Oct 9, 2024
15b651a
Feedback changes
hudson-newey Oct 10, 2024
48f978a
Fix pagination in verification grid
hudson-newey Oct 10, 2024
e36a361
Add grid tile content tests
hudson-newey Oct 10, 2024
8780faa
Add context request tests to grid tile content component
hudson-newey Oct 10, 2024
6462368
Add tests for audio event card component
hudson-newey Oct 10, 2024
1890044
Fix context popup overflow
hudson-newey Oct 10, 2024
1c4f5e5
Compact tile slotted content
hudson-newey Oct 10, 2024
9f0e507
Remove verification models and services
hudson-newey Oct 10, 2024
8fa8e82
Ann annotation data model
hudson-newey Oct 11, 2024
88a6639
Update outdated CI dependencies
hudson-newey Oct 11, 2024
e68c060
Hack: Increase bundle size
hudson-newey Oct 11, 2024
3fb125e
Fix ssr rendering
hudson-newey Oct 11, 2024
0b733b9
Decrease bundle size & dynamically import context token
hudson-newey Oct 11, 2024
6b90a4a
Remove mock dataset
hudson-newey Oct 11, 2024
abf6410
Staging changes
hudson-newey Oct 13, 2024
222fd49
Quick hacky fix for project scoping
hudson-newey Oct 14, 2024
f24f0c4
Warning dialog copy changes
hudson-newey Oct 14, 2024
161ae01
Copy feedback and fix auth token qsp
hudson-newey Oct 14, 2024
1c0fb52
Patch tag array referencing issue
hudson-newey Oct 14, 2024
ddcf3f1
Various bug fixes and web components bump
hudson-newey Oct 14, 2024
c8c6792
Fix publish workflow
hudson-newey Oct 14, 2024
4d0ee19
Add advanced filters section to annotation search form
hudson-newey Oct 15, 2024
1f1e2d5
Fix unresolved model throwing errors
hudson-newey Oct 15, 2024
687f4aa
Fix review comments to start on qsp resolvers
hudson-newey Oct 16, 2024
3402f67
Add annotation qsp model to resolver
hudson-newey Oct 16, 2024
2d61d08
Fix edge cases for media rounding
hudson-newey Oct 16, 2024
9c2748e
Only show warning when there are more than 1000 items
hudson-newey Oct 16, 2024
9e0240a
Automatically close context when paging
hudson-newey Oct 16, 2024
51571ca
Grid tile component changes
hudson-newey Oct 16, 2024
3a242aa
typeahead callback factory methods and context decorators
hudson-newey Oct 17, 2024
cfee78b
Improve typing for context decorator
hudson-newey Oct 17, 2024
608d3a8
Move route models to annotationSearchParameters
hudson-newey Oct 17, 2024
dd055dd
Fix audio event card tests
hudson-newey Oct 17, 2024
fa9e07b
Add disabled attributes to date/time filter component
hudson-newey Oct 17, 2024
aa0cba7
Half way through self-review
hudson-newey Oct 18, 2024
c471ab1
Finish new service tests
hudson-newey Oct 18, 2024
bf3a723
Staging
hudson-newey Oct 20, 2024
528502d
Improve if-logged-in component and tests
hudson-newey Oct 21, 2024
2e7b744
Finish search page tests
hudson-newey Oct 21, 2024
3a8e1f9
Add verification annotation search form tests
hudson-newey Oct 21, 2024
a8b4404
9 tests remaining for verification component tests
hudson-newey Oct 21, 2024
6d8709b
Backfill verification component tests
hudson-newey Oct 22, 2024
e104731
More resiliant karama test runner
hudson-newey Oct 22, 2024
1d7e7a1
Prefill end date from url parameters
hudson-newey Oct 22, 2024
44e4214
Fix some faulty annotation search form tests
hudson-newey Oct 22, 2024
48256ed
Staging to test bundling changes
hudson-newey Oct 23, 2024
5d9ba01
Fix broken bundling of workers & worklets in tests
hudson-newey Oct 23, 2024
62c86d2
Fix iframe and fetch errors in tests
hudson-newey Oct 23, 2024
c8d63d8
Staging for esm compliant web component testing
hudson-newey Oct 24, 2024
c1f94e7
Fix re-declaration of custom elements
hudson-newey Oct 24, 2024
1ccee4b
Fix advanced filter toggling logic and leaky tests
hudson-newey Oct 25, 2024
06407d7
Bump components version
hudson-newey Oct 27, 2024
a1b85b4
Bump components version to fix aliases
hudson-newey Oct 28, 2024
c389b42
Revert timeout
hudson-newey Oct 28, 2024
5efa956
Fix CI conflicts and lint errors
hudson-newey Oct 28, 2024
efe9cd7
Increase timeout for dropdown selectors
hudson-newey Oct 28, 2024
0845ce8
Fix race conditions by bumping web components
hudson-newey Oct 28, 2024
dd67199
Don't rely on bootstrap auto-selection in dropdowns
hudson-newey Oct 28, 2024
c07e905
Tempoarily comment out flakey test
hudson-newey Oct 28, 2024
69b17d3
Add APP_INITIALIZER to prevent race conditions in imports
hudson-newey Oct 28, 2024
c26fbbc
Staging
hudson-newey Oct 28, 2024
37f26b8
Dynamically import web components from dev server
hudson-newey Oct 29, 2024
0ea17a7
Review feedback
hudson-newey Oct 29, 2024
732ba7b
Fix review feedback and fix grid size shrinking bug
hudson-newey Oct 29, 2024
d824e4d
Minor formatting and typing changes
hudson-newey Oct 29, 2024
220339a
Bump web components version for merging
hudson-newey Oct 30, 2024
62154ed
Revert grid size changes
hudson-newey Oct 30, 2024
8517a4f
Disable a faulty test and add todo
hudson-newey Oct 30, 2024
558fd8c
Change to browser-esbuild builder for ssr compatability
hudson-newey Oct 30, 2024
78ba8fe
Don't use window in ssr context
hudson-newey Oct 30, 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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout Workbench Client
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 50
Expand All @@ -48,4 +48,4 @@ jobs:
shell: pwsh
run: ./scripts/build_docker.ps1
-github_actor '${{ github.actor }}'
-release_tag '${{ inputs.release_tag }}${{ github.event.inputs.release_tag }}'
-release_tag '${{ inputs.release_tag }}'
26 changes: 13 additions & 13 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:

steps:
- name: Checkout Baw Client
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: QutEcoacoustics/baw-client
ref: migration

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "12"
cache: "npm"
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: npm run build -- --production

- name: Publish build files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: bin/
name: baw-client
Expand All @@ -91,16 +91,16 @@ jobs:
- FirefoxHeadless
steps:
- name: Checkout Workbench Client
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: baw-client

Expand All @@ -115,9 +115,9 @@ jobs:

- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Unit Test Results (OS ${{ matrix.os }})
name: Unit Test Results (OS ${{ matrix.os }} ${{ matrix.browsers }})
path: TESTS-*.xml

- name: Lint project
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:

steps:
- name: Checkout Workbench Client
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true

Expand All @@ -175,15 +175,15 @@ jobs:

steps:
- name: Checkout Workbench Client
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
Expand All @@ -195,7 +195,7 @@ jobs:
run: npm run build

- name: Publish build files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: ./dist/workbench-client/
name: workbench-client
Expand All @@ -211,7 +211,7 @@ jobs:

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Unit Test Results
Expand Down
35 changes: 24 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser-esbuild",
"builder": "@angular-devkit/build-angular:application",
"defaultConfiguration": "development",
"options": {
"outputPath": "dist/workbench-client/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"browser": "src/main.ts",
"polyfills": ["src/polyfills.ts"],
"tsConfig": "tsconfig.app.json",
"aot": true,
"aot": false,
"optimization": false,
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.json"
"src/manifest.json",
{
"glob": "**/*",
"input": "node_modules/@ecoacoustics/web-components/dist",
"output": "@ecoacoustics/web-components"
}
],
"styles": [
"src/styles.scss"
Expand All @@ -38,7 +44,6 @@
"node_modules"
]
},
"scripts": [],
"sourceMap": true,
"allowedCommonJsDependencies": [
"zone.js/dist/zone-error",
Expand All @@ -48,6 +53,7 @@
},
"configurations": {
"production": {
"aot": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -58,7 +64,6 @@
"outputHashing": "all",
"sourceMap": false,
"extractLicenses": true,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -75,15 +80,20 @@
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"extractLicenses": true,
"buildOptimizer": false
"extractLicenses": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"buildTarget": "workbench-client:build"
"buildTarget": "workbench-client:build",
"headers": {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Resource-Policy": "cross-origin",
"Access-Control-Allow-Origin": "*"
}
},
"configurations": {
"production": {
Expand All @@ -92,13 +102,16 @@
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"codeCoverage": true,
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"customWebpackConfig": {
"path": "./webpack.config.js"
},
"assets": [
"src/assets",
"src/manifest.json"
Expand Down
33 changes: 32 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/6.3/config/configuration-file.html

var maxSigned32BitInt = Math.pow(2, 31) - 1;

// GitHub Actions sets the CI environment variable to true
// see: https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true
var isCi = process.env.CI === "true";

module.exports = function (config) {
config.set({
basePath: "",
Expand All @@ -24,7 +30,18 @@ module.exports = function (config) {
reports: ["html", "lcovonly", "text-summary", "cobertura"],
fixWebpackSourcePaths: true,
},
browserDisconnectTimeout: 30000,
// when running Karma locally, we do not want it to timeout
// if we added a timeout to locally run tests, we would only have the
// timeout duration of time to debug why the tests failed
//
// the timeout is a signed 32 bit integer and does not accept a JS Infinity
// therefore, we set the timeout to the maximum signed 32 bit integer value
// this gives us ~596 hours of time to debug the tests
//
// we reset the timeout to 30 seconds when running in CI so that CI tests
// do not hang indefinitely due to a test failure
browserDisconnectTimeout: isCi ? 30000 : maxSigned32BitInt,
browserNoActivityTimeout: isCi ? 30000 : maxSigned32BitInt,
browserDisconnectTolerance: 3,
browserConsoleLogOptions: {
level: "debug",
Expand All @@ -39,6 +56,20 @@ module.exports = function (config) {
browsers: ["Chrome"],
singleRun: false,
restartOnFileChange: true,
// serve these files through the karma server
// by serving these files through the karma server we can fetch and test
// against real files during testing
files: [
{ pattern: "src/assets/test-assets/*", included: false, served: true },
{
// TODO: this should expose all of node_modules through the karma server
// so that we can dynamically import anything from node_modules
// without adding it to this list
pattern: __dirname + "/node_modules/@ecoacoustics/web-components/**",
included: false,
served: true,
},
],
viewport: {
// Ensure you modify the viewports object (@test/helpers/general.ts) to match
// the values declared here.
Expand Down
Loading
Loading