Skip to content
Snippets Groups Projects
Commit 02725616 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '323-display-of-html-in-element-notes' into 'main'

notes are rendered as HTML

See merge request !330
parents 3af26558 bda7d0e7
No related branches found
No related tags found
2 merge requests!341Resolve "Export graphics - add "Current view"",!330notes are rendered as HTML
Pipeline #98925 passed
minerva-front (18.0.5) stable; urgency=medium
* Bug fix: anchor overlays were disappearing after clicking on anchor and
outside of the anchor (#319)
* Bug fix: bioEntity HTML notes in the left panel were not rendered as html
(#323)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 27 Nov 2024 13:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 05 Dec 2024 13:00:00 +0200
minerva-front (18.0.4) stable; urgency=medium
* Bug fix: link to search result from overview image caused map not to
......
......@@ -14,6 +14,7 @@ import { DrawerHeading } from '@/shared/DrawerHeading';
import { ElementSearchResultType } from '@/types/models';
import { CommentItem } from '@/components/Map/Drawer/BioEntityDrawer/Comments/CommentItem.component';
import { ModificationResidueItem } from '@/components/Map/Drawer/BioEntityDrawer/ModificationResidueItem';
import React from 'react';
import { CollapsibleSection } from '../ExportDrawer/CollapsibleSection';
import { AnnotationItem } from './AnnotationItem';
import { AssociatedSubmap } from './AssociatedSubmap';
......@@ -73,7 +74,10 @@ export const BioEntityDrawer = (): React.ReactNode => {
{bioEntityData.notes && (
<span>
<hr className="border-b border-b-divide" />
<div className="text-sm font-normal">{bioEntityData.notes}</div>
<div
className="text-sm font-normal"
dangerouslySetInnerHTML={{ __html: bioEntityData.notes }}
/>
</span>
)}
{isModificationAvailable && (
......
......@@ -8,6 +8,7 @@ import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { currentDrawerReactionCommentsSelector } from '@/redux/bioEntity/bioEntity.selectors';
import { CommentItem } from '@/components/Map/Drawer/BioEntityDrawer/Comments/CommentItem.component';
import { ZERO } from '@/constants/common';
import React from 'react';
import { ReferenceGroup } from './ReferenceGroup';
import { ConnectedBioEntitiesList } from './ConnectedBioEntitiesList';
......@@ -37,7 +38,13 @@ export const ReactionDrawer = (): React.ReactNode => {
Type: <b className="font-semibold">{reaction.type}</b>
</div>
<hr className="border-b border-b-divide" />
{reaction.notes && <div className="text-sm font-normal">{reaction.notes}</div>}
{reaction.notes && (
<div
className="text-sm font-normal"
dangerouslySetInnerHTML={{ __html: reaction.notes }}
/>
)}
<h3 className="font-semibold">Annotations:</h3>
{referencesGrouped.map(group => (
<ReferenceGroup key={group.source} group={group} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment