-
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
Association decorators should not show error notifications #2165
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e0b90fc
Hacky fix for no error associations
hudson-newey 32b9d0f
Use AssociationInjectorService
hudson-newey 466ec7a
Start writing tests
hudson-newey 36ee5eb
Create new instances of association injector api services
hudson-newey 4ef1022
Write association injector tests
hudson-newey f89408c
staging semi-working version
hudson-newey 7a17d7e
Fix circular dependency issues
hudson-newey c9a013d
Add association model tests
hudson-newey 10fcdb4
Comment out new changes to get good diff view
hudson-newey 61df856
Fix all but one test file
hudson-newey 3fb1203
Fix tests
hudson-newey 2d8f790
Formatting and documentation changes
hudson-newey 577d31c
Push review feedback
hudson-newey fcea2bd
Correctly merge options in baw-api.service
hudson-newey 7920913
Correctly type AssociationInjector and fix related bugs
hudson-newey dd15901
Fix linting errors
hudson-newey 56e4612
Migrate association injector tests
hudson-newey 615fa3b
Add comments for branded types
hudson-newey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! this file should only be used as a last resort to exclude files from pettier | ||
# you should always prefer to use // prettier-ignore to exluce individual lines | ||
|
||
# we ignore the service token file from pettier so that we can one-line all of | ||
# the service tokens | ||
# this makes it much more readable as each service token has its ownn line | ||
src/app/services/baw-api/ServiceTokens.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { | |
AfterViewInit, | ||
Component, | ||
ElementRef, | ||
Injector, | ||
Inject, | ||
OnInit, | ||
ViewChild, | ||
} from "@angular/core"; | ||
|
@@ -40,6 +40,8 @@ import { ShallowAudioEventsService } from "@baw-api/audio-event/audio-events.ser | |
import { AudioEvent } from "@models/AudioEvent"; | ||
import { PageFetcherContext } from "@ecoacoustics/web-components/@types/services/gridPageFetcher"; | ||
import { annotationResolvers, AnnotationService } from "@services/models/annotation.service"; | ||
import { AssociationInjector } from "@models/ImplementsInjector"; | ||
import { ASSOCIATION_INJECTOR } from "@services/association-injector/association-injector.tokens"; | ||
import { AnnotationSearchParameters } from "../annotationSearchParameters"; | ||
|
||
// TODO: using extends here makes the interface loosely typed | ||
|
@@ -75,7 +77,7 @@ class VerificationComponent | |
private route: ActivatedRoute, | ||
private router: Router, | ||
private location: Location, | ||
private injector: Injector | ||
@Inject(ASSOCIATION_INJECTOR) private injector: AssociationInjector | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto here |
||
) { | ||
super(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ok this is a bit of a smell. the only place the association injector should be needed is from services that create models.
we should also be injecting this injector in creation of whatever is using it - the search parameters
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.
Related issue: #2167