Skip to content

Commit

Permalink
fix(files): wrap tooltips of long file names (#1709)
Browse files Browse the repository at this point in the history
- Set break-word property to tooltip.
- Changed overflow of rows to visible.
- Set tooltip width to not exceed the menus width.

Closes  #1464
  • Loading branch information
melegiul authored Jan 11, 2021
1 parent 6a22823 commit 20d7ff4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ export default class Tool extends React.Component {
<div style={{
bottom: '-10px',
left: '50%',
transform: 'translate(-50%, 100%)'
}} className={`nowrap white z-max bg-navy-muted br2 pa1 f6 absolute ${(show && overflow) ? 'db' : 'dn'}`}>
transform: 'translate(-50%, 100%)',
wordWrap: 'break-word',
width: '100%'
}} className={`white z-max bg-navy-muted br2 pa1 f6 absolute ${(show && overflow) ? 'db' : 'dn'}`}>
<span style={{
width: '17px',
height: '17px',
Expand Down
2 changes: 1 addition & 1 deletion src/files/file/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const File = ({
className += ' selected'
}

const styles = { height: 55, overflow: 'hidden' }
const styles = { height: 55, overflow: 'visible' }

if (focused || (selected && !translucent) || coloured || (isOver && canDrop)) {
styles.backgroundColor = '#F0F6FA'
Expand Down

0 comments on commit 20d7ff4

Please sign in to comment.