Skip to content

Commit

Permalink
Improve the styles for the KnowledgeTable component.
Browse files Browse the repository at this point in the history
  • Loading branch information
yjcyxky committed Mar 26, 2024
1 parent 00daf8a commit d08f4f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion studio/src/components/EntityCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const EntityCard = (metadata: Entity | undefined) => {
return <div>No metadata found!</div>;
} else {
return (
<div style={{ overflowWrap: 'break-word', width: '500px', maxHeight: '200px', overflow: 'scroll' }}>
<div style={{ overflowWrap: 'break-word', width: '420px', maxHeight: '200px', overflow: 'scroll' }}>
<p style={{ marginBottom: '5px' }}>
<span style={{ fontWeight: 'bold' }}>Species: </span>
{guessSpecies(`${metadata.taxid}` || '')}
Expand Down
1 change: 1 addition & 0 deletions studio/src/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ html,
body,
#root {
height: 100%;
min-width: 1000px;
}

.colorWeak {
Expand Down
7 changes: 6 additions & 1 deletion studio/src/pages/KnowledgeTable/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@
.ant-drawer-body {
padding: 0 24px;
}
}
}

.entity-id-popover {
max-width: 450px;
white-space: wrap;
}
18 changes: 8 additions & 10 deletions studio/src/pages/KnowledgeTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ const KnowledgeTable: React.FC = (props) => {
<Popover
placement="rightTop"
title={
<span>
<span className='entity-id-popover-title'>
<Tag color={guessColor(nodeData.label)}>{nodeData.label}</Tag>
{nodeData.id} | {nodeData.name}
</span>
Expand All @@ -282,10 +282,9 @@ const KnowledgeTable: React.FC = (props) => {
{truncateString(text)}
</Popover>
) : (
truncateString(text)
// <Tooltip title={text}>
// {truncateString(text)}
// </Tooltip>
<Tooltip title={text}>
{truncateString(text)}
</Tooltip>
)}
{<br />}
{record.source_id.startsWith('ENTREZ:') ?
Expand Down Expand Up @@ -361,7 +360,7 @@ const KnowledgeTable: React.FC = (props) => {
<Popover
placement="rightTop"
title={
<span>
<span className='entity-id-popover-title'>
<Tag color={guessColor(nodeData.label)}>{nodeData.label}</Tag>
{nodeData.id} | {nodeData.name}
</span>
Expand All @@ -377,10 +376,9 @@ const KnowledgeTable: React.FC = (props) => {
{truncateString(text)}
</Popover>
) : (
truncateString(text)
// <Tooltip title={text}>
// {truncateString(text)}
// </Tooltip>
<Tooltip title={text}>
{truncateString(text)}
</Tooltip>
)}
{<br />}
{record.target_id.startsWith('ENTREZ:') ?
Expand Down

0 comments on commit d08f4f0

Please sign in to comment.