diff --git a/CHANGELOG b/CHANGELOG index 164d439725d7d6f8d161cd2947ce7a78e6de63c5..a0285e6e2e939ed4776c3404634d84fa98d28b4b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,10 @@ 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 diff --git a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx index 14fc544913abfe3f726e15fe0e0a52f820e402ff..1e54091e78b533c2abf7e82d191673799fe1474d 100644 --- a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx +++ b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx @@ -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 && ( diff --git a/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx b/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx index 1423ef7d11a71e2b51e8206a047ba28d3c0e4d83..f772343e1ee862b941fb35a35ab479dcbb4034e6 100644 --- a/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx +++ b/src/components/Map/Drawer/ReactionDrawer/ReactionDrawer.component.tsx @@ -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} />