diff --git a/webapp/src/components/AutomationManager/MetadataBox/index.stories.tsx b/webapp/src/components/AutomationManager/MetadataBox/index.stories.tsx index ee05dc0..6c4a21b 100644 --- a/webapp/src/components/AutomationManager/MetadataBox/index.stories.tsx +++ b/webapp/src/components/AutomationManager/MetadataBox/index.stories.tsx @@ -39,6 +39,10 @@ const { make, componentMeta } = makeStory({ export default componentMeta; export const Basic = make({}); +export const LongDescription = make({ + description: + "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", +}); export const IsSelected = make({ isSelected: true }); export const InvalidState = make({ state: "unavailable" }); export const WithIssue = make({ issue: "look at me" }); diff --git a/webapp/src/components/Inputs/InputTextView.css b/webapp/src/components/Inputs/InputTextView.css index e970b02..9257d3b 100644 --- a/webapp/src/components/Inputs/InputTextView.css +++ b/webapp/src/components/Inputs/InputTextView.css @@ -2,16 +2,6 @@ max-height: 2em; } -.input-text-view.view span { - height: 100%; - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - word-wrap: break-word; - line-break: loose; - overflow-wrap: break-word; -} - .input-text-view.edit .MuiFilledInput-input { padding-top: 0.5em; padding-bottom: 0.5em; diff --git a/webapp/src/components/Inputs/InputTextView.tsx b/webapp/src/components/Inputs/InputTextView.tsx index 2d5c7f9..1d4fdf7 100644 --- a/webapp/src/components/Inputs/InputTextView.tsx +++ b/webapp/src/components/Inputs/InputTextView.tsx @@ -32,11 +32,13 @@ export const InputTextView: FC> = ( onClick={() => !props.disabled && setViewMode(false)} > {!!props.value ? ( - {props.value} +
+ {props.value} +
) : ( - - {props.placeholder} - +
+ {props.placeholder} +
)} {!props.disabled && ( diff --git a/webapp/src/styles/root.css b/webapp/src/styles/root.css index 3423a78..c786626 100644 --- a/webapp/src/styles/root.css +++ b/webapp/src/styles/root.css @@ -60,4 +60,18 @@ body, .row { display: flex; flex-direction: row; +} + + +.text-ellipsis { + display: table; + table-layout: fixed; + width: 100%; +} + +.text-ellipsis span, a, h1, h2, h3, h4, h5, h6 { + display: table-cell; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } \ No newline at end of file