Skip to content

Commit

Permalink
Merge pull request #1269 from osmlab/prerelease
Browse files Browse the repository at this point in the history
v3.6.4
  • Loading branch information
nrotstan authored Jun 10, 2020
2 parents 481c9f8 + 64143dd commit 2e92ca8
Show file tree
Hide file tree
Showing 10 changed files with 1,494 additions and 1,468 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ The format is based on
This project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [v3.6.4] - 2020-06-09
### Added
- Updated community translations

### Fixed
- Error during display of certain users with missing avatars


## [v3.6.3] - 2020-06-08
### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maproulette3",
"version": "3.6.3",
"version": "3.6.4",
"private": true,
"dependencies": {
"@apollo/client": "^3.0.0-beta.44",
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardChallenge/CardChallenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CardChallenge extends Component {
)}
>
<header className="mr-card-challenge__header" onClick={this.props.cardClicked}>
<div>
<div className="mr-max-w-full">
<Taxonomy {...this.props} {...this.props.challenge} />
<h3 className="mr-card-challenge__title">
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const FeaturedList = props => {
<CardChallenge
{...props}
key={challenge.id}
className="mr-card-challenge--featured mr-bg-transparent"
className="mr-card-challenge--featured mr-bg-transparent mr-w-full"
challenge={challenge}
isExpanded
permanentlyExpanded
Expand Down
11 changes: 8 additions & 3 deletions src/interactions/User/AsAvatarUser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _get from 'lodash/get'
import _isEmpty from 'lodash/isEmpty'
import defaultPic from '../../static/images/user_no_image.png'

/**
Expand All @@ -14,9 +15,13 @@ export class AsAvatarUser {
}

profilePic(size) {
const urlParts = this.rawAvatarURL().replace(/\?s=\d+/, '?').split('?')
return /user_no_image/.test(this.rawAvatarURL()) ? defaultPic :
`${urlParts[0]}?s=${size}&${urlParts.slice(1).join('?')}`
const rawURL = this.rawAvatarURL()
if (_isEmpty(rawURL) || /user_no_image/.test(rawURL)) {
return defaultPic
}

const urlParts = rawURL.replace(/\?s=\d+/, '?').split('?')
return `${urlParts[0]}?s=${size}&${urlParts.slice(1).join('?')}`
}
}

Expand Down
14 changes: 14 additions & 0 deletions src/interactions/User/AsAvatarUser.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import AsAvatarUser from './AsAvatarUser'
import defaultPic from '../../static/images/user_no_image.png'

describe('profilePic', () => {
it("returns default pic if user has empty avatar URL", () => {
const user = AsAvatarUser({avatarURL: ""})
expect(user.profilePic(200)).toEqual(defaultPic)
})

it("returns default pic if server is assigned default user_no_image avatar", () => {
const user = AsAvatarUser({avatarURL: "https://maproulette.org/images/user_no_image.jpg"})
expect(user.profilePic(200)).toEqual(defaultPic)
})
})
1,292 changes: 646 additions & 646 deletions src/lang/de.json

Large diffs are not rendered by default.

252 changes: 126 additions & 126 deletions src/lang/es.json

Large diffs are not rendered by default.

1,378 changes: 689 additions & 689 deletions src/lang/uk.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/styles/components/cards/challenge.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

&__title {
@apply mr-my-1;
@apply mr-my-1 mr-max-w-full mr-break-words;

a {
@apply mr-text-white;
Expand Down

0 comments on commit 2e92ca8

Please sign in to comment.