O3-2210:Create a new form control for embedding diagrams #1
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.
Here's a summary of the functionalities I have tackled for the afe-diagram-embed component:
Rendering the Diagram: I implemented the rendering logic to display the diagram within the component using an
<img>
tag or any appropriate method based on your requirements.Annotation Button: I added an annotation button to the component, which, when clicked, opens an external application (e.g., React Image Annotate) for annotating the diagram. i used window.open to launch the external application.
Custom Styling: I customized the component's styles in the associated SCSS file (afe-diagram-embed.component.scss) to achieve the desired visual appearance. i ensured the component followed the required theming and styling guidelines, such as toggling the theme based on the "dark" input, though more designs will follow
Custom Control Integration: i assumed that the afe-diagram-embed component is a custom control within the form engine. However, we haven't integrated it fully with the form submission process yet. We focused on the rendering and annotation functionalities for now.
Issue: https://issues.openmrs.org/browse/O3-2210