Skip to content

Commit 2e92ca8

Browse files
authored
Merge pull request #1269 from osmlab/prerelease
v3.6.4
2 parents 481c9f8 + 64143dd commit 2e92ca8

File tree

10 files changed

+1494
-1468
lines changed

10 files changed

+1494
-1468
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ The format is based on
77
This project adheres to
88
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
99

10+
## [v3.6.4] - 2020-06-09
11+
### Added
12+
- Updated community translations
13+
14+
### Fixed
15+
- Error during display of certain users with missing avatars
16+
1017

1118
## [v3.6.3] - 2020-06-08
1219
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maproulette3",
3-
"version": "3.6.3",
3+
"version": "3.6.4",
44
"private": true,
55
"dependencies": {
66
"@apollo/client": "^3.0.0-beta.44",

src/components/CardChallenge/CardChallenge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class CardChallenge extends Component {
6060
)}
6161
>
6262
<header className="mr-card-challenge__header" onClick={this.props.cardClicked}>
63-
<div>
63+
<div className="mr-max-w-full">
6464
<Taxonomy {...this.props} {...this.props.challenge} />
6565
<h3 className="mr-card-challenge__title">
6666
<Link

src/components/FeaturedChallenges/FeaturedChallengesWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const FeaturedList = props => {
7373
<CardChallenge
7474
{...props}
7575
key={challenge.id}
76-
className="mr-card-challenge--featured mr-bg-transparent"
76+
className="mr-card-challenge--featured mr-bg-transparent mr-w-full"
7777
challenge={challenge}
7878
isExpanded
7979
permanentlyExpanded

src/interactions/User/AsAvatarUser.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import _get from 'lodash/get'
2+
import _isEmpty from 'lodash/isEmpty'
23
import defaultPic from '../../static/images/user_no_image.png'
34

45
/**
@@ -14,9 +15,13 @@ export class AsAvatarUser {
1415
}
1516

1617
profilePic(size) {
17-
const urlParts = this.rawAvatarURL().replace(/\?s=\d+/, '?').split('?')
18-
return /user_no_image/.test(this.rawAvatarURL()) ? defaultPic :
19-
`${urlParts[0]}?s=${size}&${urlParts.slice(1).join('?')}`
18+
const rawURL = this.rawAvatarURL()
19+
if (_isEmpty(rawURL) || /user_no_image/.test(rawURL)) {
20+
return defaultPic
21+
}
22+
23+
const urlParts = rawURL.replace(/\?s=\d+/, '?').split('?')
24+
return `${urlParts[0]}?s=${size}&${urlParts.slice(1).join('?')}`
2025
}
2126
}
2227

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import AsAvatarUser from './AsAvatarUser'
2+
import defaultPic from '../../static/images/user_no_image.png'
3+
4+
describe('profilePic', () => {
5+
it("returns default pic if user has empty avatar URL", () => {
6+
const user = AsAvatarUser({avatarURL: ""})
7+
expect(user.profilePic(200)).toEqual(defaultPic)
8+
})
9+
10+
it("returns default pic if server is assigned default user_no_image avatar", () => {
11+
const user = AsAvatarUser({avatarURL: "https://maproulette.org/images/user_no_image.jpg"})
12+
expect(user.profilePic(200)).toEqual(defaultPic)
13+
})
14+
})

src/lang/de.json

Lines changed: 646 additions & 646 deletions
Large diffs are not rendered by default.

src/lang/es.json

Lines changed: 126 additions & 126 deletions
Large diffs are not rendered by default.

src/lang/uk.json

Lines changed: 689 additions & 689 deletions
Large diffs are not rendered by default.

src/styles/components/cards/challenge.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
&__title {
25-
@apply mr-my-1;
25+
@apply mr-my-1 mr-max-w-full mr-break-words;
2626

2727
a {
2828
@apply mr-text-white;

0 commit comments

Comments
 (0)