Skip to content

Commit

Permalink
Merge pull request #705 from DemocracyLab/ConstrainFilenamesOnProfile
Browse files Browse the repository at this point in the history
Constrain filenames on profile
  • Loading branch information
marlonkeating authored Jul 29, 2021
2 parents ec23e41 + 3c61ddd commit c1c8c20
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
14 changes: 13 additions & 1 deletion civictechprojects/static/css/partials/_AboutUser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,16 @@
.AboutUser-root .left-column, .AboutUser-root .right-column {
padding-top: 15px;
padding-bottom: 15px;
}
}

.AboutUser-file-list {
display: flex;
align-items: center;
a {
max-width: calc(100%);
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
3 changes: 2 additions & 1 deletion civictechprojects/static/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@
@import "partials/PositionList";
@import "partials/LinkList";
@import "partials/Video";
@import "partials/FileUploadList";
@import "partials/FileUploadList";

2 changes: 1 addition & 1 deletion common/components/controllers/AboutUserController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class AboutUserController extends React.PureComponent<{||}, State> {
user &&
user.user_files &&
user.user_files.map((file, i) => (
<div key={i}>
<div className="AboutUser-file-list" key={i}>
<a href={file.publicUrl} target="_blank" rel="noopener noreferrer">
{this._legibleFileName(file)}
</a>
Expand Down

0 comments on commit c1c8c20

Please sign in to comment.