File tree Expand file tree Collapse file tree 10 files changed +1494
-1468
lines changed
Expand file tree Collapse file tree 10 files changed +1494
-1468
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ The format is based on
77This 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11import _get from 'lodash/get'
2+ import _isEmpty from 'lodash/isEmpty'
23import 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 / u s e r _ n o _ i m a g e / . test ( this . rawAvatarURL ( ) ) ? defaultPic :
19- `${ urlParts [ 0 ] } ?s=${ size } &${ urlParts . slice ( 1 ) . join ( '?' ) } `
18+ const rawURL = this . rawAvatarURL ( )
19+ if ( _isEmpty ( rawURL ) || / u s e r _ n o _ i m a g e / . 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
Original file line number Diff line number Diff line change 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+ } )
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 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;
You can’t perform that action at this time.
0 commit comments