Commit Β·
91462cf
1
Parent(s): 2d33606
Chain metadata: keep each field's label+value together (inline break-inside)
Browse filesThe break-inside-avoid utility class is not in the vendored static
Tailwind CSS, so chain-metadata fields (e.g. Chain Composition) could
split label and value across columns. Add an inline breakInside style.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
frontend/src/components/datasets/protein/ChainBasicInfoCards.tsx
CHANGED
|
@@ -70,14 +70,14 @@ const ChainBasicInfoCards: React.FC<ChainBasicInfoCardsProps> = ({ metadata, isL
|
|
| 70 |
|
| 71 |
{/* Compact three-column metadata flow */}
|
| 72 |
<div className="gap-4" style={{ columnCount: 3, columnGap: '1rem' }}>
|
| 73 |
-
<div className="break-inside-avoid mb-3">
|
| 74 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Protein Name</div>
|
| 75 |
<div className="text-sm font-semibold text-slate-900 font-mono" title={metadata?.entry?.title || ''}>
|
| 76 |
{metadata?.entry?.title || 'β'}
|
| 77 |
</div>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
-
<div className="break-inside-avoid mb-3">
|
| 81 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">PDB ID</div>
|
| 82 |
<div className="text-sm font-semibold text-slate-900">
|
| 83 |
<a
|
|
@@ -92,32 +92,32 @@ const ChainBasicInfoCards: React.FC<ChainBasicInfoCardsProps> = ({ metadata, isL
|
|
| 92 |
</div>
|
| 93 |
</div>
|
| 94 |
|
| 95 |
-
<div className="break-inside-avoid mb-3">
|
| 96 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Chain ID</div>
|
| 97 |
<div className="text-sm font-semibold text-slate-900 font-mono">{chainId || 'β'}</div>
|
| 98 |
</div>
|
| 99 |
|
| 100 |
-
<div className="break-inside-avoid mb-3">
|
| 101 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">UniProt ID</div>
|
| 102 |
<div className="text-sm font-semibold text-slate-900 font-mono">{getUniProtId()}</div>
|
| 103 |
</div>
|
| 104 |
|
| 105 |
-
<div className="break-inside-avoid mb-3">
|
| 106 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Binding Status</div>
|
| 107 |
<div className="text-sm font-semibold text-slate-900 capitalize">{metadata?.binding_status || 'β'}</div>
|
| 108 |
</div>
|
| 109 |
|
| 110 |
-
<div className="break-inside-avoid mb-3">
|
| 111 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Chain Composition</div>
|
| 112 |
<div className="text-sm font-semibold text-slate-900 capitalize">{metadata?.chain_composition || 'β'}</div>
|
| 113 |
</div>
|
| 114 |
|
| 115 |
-
<div className="break-inside-avoid mb-3">
|
| 116 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">CATH ID</div>
|
| 117 |
<div className="text-sm font-semibold text-slate-900 font-mono">{metadata?.cath_id || 'uncategorized'}</div>
|
| 118 |
</div>
|
| 119 |
|
| 120 |
-
<div className="break-inside-avoid mb-3">
|
| 121 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">CATH Domain</div>
|
| 122 |
<div className="text-sm font-semibold text-slate-900 font-mono">
|
| 123 |
{metadata?.cath_superfamily ? (
|
|
@@ -134,7 +134,7 @@ const ChainBasicInfoCards: React.FC<ChainBasicInfoCardsProps> = ({ metadata, isL
|
|
| 134 |
</div>
|
| 135 |
</div>
|
| 136 |
|
| 137 |
-
<div className="break-inside-avoid mb-3">
|
| 138 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">State ID</div>
|
| 139 |
<div className="text-sm font-semibold text-slate-900 font-mono">{metadata?.state_id || 'β'}</div>
|
| 140 |
</div>
|
|
|
|
| 70 |
|
| 71 |
{/* Compact three-column metadata flow */}
|
| 72 |
<div className="gap-4" style={{ columnCount: 3, columnGap: '1rem' }}>
|
| 73 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 74 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Protein Name</div>
|
| 75 |
<div className="text-sm font-semibold text-slate-900 font-mono" title={metadata?.entry?.title || ''}>
|
| 76 |
{metadata?.entry?.title || 'β'}
|
| 77 |
</div>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 81 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">PDB ID</div>
|
| 82 |
<div className="text-sm font-semibold text-slate-900">
|
| 83 |
<a
|
|
|
|
| 92 |
</div>
|
| 93 |
</div>
|
| 94 |
|
| 95 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 96 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Chain ID</div>
|
| 97 |
<div className="text-sm font-semibold text-slate-900 font-mono">{chainId || 'β'}</div>
|
| 98 |
</div>
|
| 99 |
|
| 100 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 101 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">UniProt ID</div>
|
| 102 |
<div className="text-sm font-semibold text-slate-900 font-mono">{getUniProtId()}</div>
|
| 103 |
</div>
|
| 104 |
|
| 105 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 106 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Binding Status</div>
|
| 107 |
<div className="text-sm font-semibold text-slate-900 capitalize">{metadata?.binding_status || 'β'}</div>
|
| 108 |
</div>
|
| 109 |
|
| 110 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 111 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">Chain Composition</div>
|
| 112 |
<div className="text-sm font-semibold text-slate-900 capitalize">{metadata?.chain_composition || 'β'}</div>
|
| 113 |
</div>
|
| 114 |
|
| 115 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 116 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">CATH ID</div>
|
| 117 |
<div className="text-sm font-semibold text-slate-900 font-mono">{metadata?.cath_id || 'uncategorized'}</div>
|
| 118 |
</div>
|
| 119 |
|
| 120 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 121 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">CATH Domain</div>
|
| 122 |
<div className="text-sm font-semibold text-slate-900 font-mono">
|
| 123 |
{metadata?.cath_superfamily ? (
|
|
|
|
| 134 |
</div>
|
| 135 |
</div>
|
| 136 |
|
| 137 |
+
<div className="break-inside-avoid mb-3" style={{ breakInside: 'avoid' }}>
|
| 138 |
<div className="text-xs font-medium text-slate-500 uppercase tracking-wider mb-1">State ID</div>
|
| 139 |
<div className="text-sm font-semibold text-slate-900 font-mono">{metadata?.state_id || 'β'}</div>
|
| 140 |
</div>
|