Skip to content

Commit 2fb84ac

Browse files
authored
[CORE-558] Wrap long EntityNames for better readability (#5367)
1 parent 6eee201 commit 2fb84ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/components/src/TooltipTrigger.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const styles = {
1919
boxShadow: '0 1px 3px 2px rgba(0,0,0,0.3)',
2020
lineHeight: 1.5,
2121
pointerEvents: 'none',
22+
whiteSpace: 'pre-line',
23+
wordBreak: 'break-word',
2224
},
2325
notch: {
2426
position: 'absolute',

src/pages/workspaces/workspace/submissionHistory/SubmissionDetails.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ const SubmissionDetails = _.flow(
468468
*/
469469
const hasWorkflowCostEstimates = _.some((w) => !('costType' in w) || w.costType === 'Estimated', workflows);
470470

471+
// Style for text wrapping
472+
const wrapStyle = { whiteSpace: 'normal', overflowWrap: 'break-word' };
473+
471474
/*
472475
* Page render
473476
*/
@@ -553,7 +556,7 @@ const SubmissionDetails = _.flow(
553556
makeSection('Total Run Cost', [
554557
typeof cost === 'number' ? `${Utils.formatUSD(cost)} ${hasWorkflowCostEstimates ? 'Estimated' : 'Actual'} cost` : 'N/A',
555558
]),
556-
makeSection('Data Entity', [div([entityName]), div([entityType])]),
559+
makeSection('Data Entity', [div({ style: wrapStyle }, [entityName]), div({ style: wrapStyle }, [entityType])]),
557560
makeSection('Submission ID', [
558561
h(Link, { href: bucketBrowserUrl(submissionRoot.replace('gs://', '')), ...Utils.newTabLinkProps }, submissionId),
559562
h(ClipboardButton, {

0 commit comments

Comments
 (0)