Skip to content

Commit

Permalink
[UI] Wrap parameter/urls on overflow (#3747)
Browse files Browse the repository at this point in the history
* [UI] Wrap parameter/urls on overflow

* Add comment about css

* Let artifact preview take over full width
  • Loading branch information
Bobgy committed May 13, 2020
1 parent e8356bc commit bd4be88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 7 additions & 3 deletions frontend/src/components/DetailsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ export const css = stylesheet({
flexGrow: 1,
},
valueText: {
maxWidth: 400,
// flexGrow expands value text to full width.
flexGrow: 1,
// For current use-cases, value text shouldn't be very long. It will be not readable when it's long.
// Therefore, it's easier we just show it completely in the UX.
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
// Sometimes, urls will be unbreakable for a long string. overflow-wrap: break-word
// allows breaking an url at middle of a word so it will not overflow and get hidden.
overflowWrap: 'break-word',
},
});

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/MinioArtifactPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { ValueComponentProps } from './DetailsTable';
const css = stylesheet({
root: {
width: '100%',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
preview: {
maxHeight: 250,
Expand Down

0 comments on commit bd4be88

Please sign in to comment.