-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
8b99162
to
c07e905
Compare
if (this.routeSiteId) { | ||
siteIds = [this.routeSiteId]; | ||
} else if (this.routeRegionId) { | ||
siteIds = Array.from(this.routeRegionModel.siteIds); | ||
} else { | ||
siteIds = Array.from(this.routeProjectModel.siteIds); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better if these actually just filtered by the entities that are restricted rather than by site ids.
- it avoids the additional request
- and it's more semantically correct.
audio recording supports filtering by site, region, and project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Audio recordings support filtering by associated site, region, and project models.
Because this data model constructs filter conditions for the audio_events API, our filter condition would have to look something like
// POST /audio_events/filter
{
"filters": {
// notice the double "." on associated models
"audio_recordings.projects.id": {
"in": [1, 2, 3, 4]
}
}
}
However because this is a filter condition on an association of an association it seems to fail
Potentially resolved by
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file a separate issue and cross link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Associated issue
// because the verification grid keybindings are scoped at the component | ||
// level, we automatically focus the verification grid component so that | ||
// users don't have to manually focus the verification grid to start using | ||
// shortcuts | ||
// | ||
// without this automatic focusing, the user would have to click on the | ||
// verification grid (e.g. to make a sub-selection) before being able to | ||
// use the shortcut keys | ||
this.verificationGridElement.nativeElement.focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if we need a focus prompt/indicator on the verification grid... it could be confusing if keyboard shortcuts suddenly don't work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a warning indicator if the verification grid loses focus (bound to the blur
event)
I originally tried some text "Shortcuts are disabled" with a tooltip and button to re-gain focus, but there was a lot of cumulative shift, and the elements would move around a lot, so I ended up going with a simple warning icon + tooltip
src/app/components/annotations/pages/verification/verification.component.ts
Outdated
Show resolved
Hide resolved
src/app/components/shared/if-logged-in/if-logged-in.component.ts
Outdated
Show resolved
Hide resolved
src/app/services/baw-api/audio-recording/audio-recordings.service.ts
Outdated
Show resolved
Hide resolved
ec35a25
to
78ba8fe
Compare
Verification Interface
This pull request creates an annotations search page & accompanying verification grid to the workbench client.
Changes
Features
@angular/elements
allowing us to create custom elements using Angular components (was needed for full Lit + Angular interoperability within slotted content)date-time-input.component
start/end date/time inputspageSize
attribute to pagination templateangular.json
serve.options.headers
objectBug Fixes
UnsavedInputGuard
Code Quality
selectFromTypeahead
andgetElementByInnerText
Issues
Fixes: #2140
Visual Changes
Annotations search page
Verification grid page
Verification grid with context card expanded
Final Checklist
npm run lint
)npm run test:all
)