-
Notifications
You must be signed in to change notification settings - Fork 0
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 mode #134
Add annotation mode #134
Conversation
Annotation target can be set from view (setup). The annotation wizard needs to adapt to the changing annotation target without effecting the original annotation flow.
Save progress with annotation mode, selecting a direct annotation target will always go to step 3
Commit for resolving Sonar Cloud issues
Quality Gate passedIssues Measures |
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.
lgtm
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.
One comment but isn;t blocking, something to consider in a future pr
🧥
* @param annotationTargetType The type of the annotation target, either class or term | ||
* @param jsonPath The JSON path that targets the class or term | ||
*/ | ||
const SetAnnotationTarget = (annotationTargetType: 'class' | 'term', jsonPath: string) => { |
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.
A lot of this seems duplicate from the media.tsx file, do you think you can reuse some code?
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.
Yeah my initial idea was to include as an utility function, only I am not allowed to use hooks out of React components, hence I chose to do it this way. I could include it at an ever higher level and pass it as props, but its irrelevant for a lot of child components. For now this seemed the best way, but can probably be optimized somehow in the future.
Adds the annotation mode to the Digital Specimen page to allow for direct targeting of properties from the view.
This includes some slight changes and fixes to the annotation wizard in general.