Skip to content

Commit

Permalink
Merge pull request #1404 from osmlab/prerelease
Browse files Browse the repository at this point in the history
v3.6.12
  • Loading branch information
nrotstan authored Oct 6, 2020
2 parents 32746de + e20a1ee commit 375d6c6
Show file tree
Hide file tree
Showing 76 changed files with 2,946 additions and 661 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ REACT_APP_SERVER_OAUTH_URL='/auth/authenticate?redirect=/mr3'
# OSM API Server
REACT_APP_OSM_API_SERVER='https://api.openstreetmap.org'

# Help/Docs Link
REACT_APP_DOCS_URL='https://learn.maproulette.org'

# Github repository URL. Used for generating links, such as for release notes
REACT_APP_GIT_REPOSITORY_URL='https://github.com/osmlab/maproulette3'

Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ The format is based on
This project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [v3.6.12] - 2020-10-07
### Added
- Updated translations and new Vietnamese locale (thank you translators!)
- learn.maproulette.org as the new home for MapRoulette documentation
- Typeahead dropdown when mentioning a user in a comment
- Ability to specify OSM element type when creating challenges from Overpass
- Search for challenges by id when adding challenges to virtual projects
- Allow tasks to be reviewed consecutively from Manage Challenges tasks table
- Basic support for multiple reviews of task by different reviewers
- Deselect-all control to Lasso map tool panel

### Fixed
- Challenge datasource could revert back to original cloned source (#1381)
- Don't offer Start Challenge button when managing completed challenges
- Incorrect subdomain substitution in basemap URLs
- Inability to sort by cooperative challenges (#1395)
- Inability to update user settings if no custom basemaps set
- User metrics filtering on creation date instead of completion date
- Minor visual fixes

### Changed
- false_positive column to not_an_issue in CSV exports
- [internal] Renamed primary branch of code repository to `main`


## [v3.6.11] - 2020-09-10
### Added
- Info control on challenge results to quickly view basic challenge details
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,9 @@ The project was bootstrapped with
Branch management follows
[GitFlow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) with
active development occurring on the `develop` branch. Pull requests should
target the `develop` branch. The master branch always contains the latest
target the `develop` branch. The main branch always contains the latest
release, and the `prerelease` branch contains features and fixes promoted from
`develop` that are candidates for the next release to `master`.

It is okay for pull requests to the `develop` branch to rely on server features
or fixes that have only been merged into the server's `dev` branch, but they
will not be promoted to the `prelease` branch until the server-side code makes
it into the server's `master` branch.
`develop` that are candidates for the next release to `main`.

Release versions follow [Semantic Versioning](https://semver.org/).

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.11",
"version": "3.6.12",
"private": true,
"dependencies": {
"@apollo/client": "^3.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default class ChallengeControls extends Component {
return (
<div className={this.props.className}>
{hasTasks && isUsableChallengeStatus(status, true) &&
status !== ChallengeStatus.finished &&
<Link
to={`/challenge/${this.props.challenge.id}`}
className={this.props.controlClassName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { FormattedNumber, FormattedMessage } from 'react-intl'
import { Link } from 'react-router-dom'
import _map from 'lodash/map'

import { TaskReviewStatus, messagesByReviewStatus }
from '../../../../services/Task/TaskReview/TaskReviewStatus'
import { USER_TYPE_REVIEWER } from '../../../../services/Leaderboard/Leaderboard'

import messages from './Messages'
Expand All @@ -25,13 +27,24 @@ export default class ChallengeOwnerLeaderboard extends Component {
`${Math.floor(leader.avgTimeSpent / 1000 / 60)}m ${Math.floor(leader.avgTimeSpent / 1000) % 60}s`
: null

let tooltip = userType !== USER_TYPE_REVIEWER ? "" :
`${this.props.intl.formatMessage(messagesByReviewStatus[TaskReviewStatus.approved])}: ${leader.reviewsApproved} \n` +
`${this.props.intl.formatMessage(messagesByReviewStatus[TaskReviewStatus.approvedWithFixes])}: ${leader.reviewsAssisted} \n` +
`${this.props.intl.formatMessage(messagesByReviewStatus[TaskReviewStatus.rejected])}: ${leader.reviewsRejected} \n` +
`-------\n` +
`${this.props.intl.formatMessage(messagesByReviewStatus[TaskReviewStatus.disputed])}: ${leader.reviewsDisputed} \n`

if (leader.additionalReviews > 0) {
tooltip += `${this.props.intl.formatMessage(messages.additionalReviews)}: ${leader.additionalReviews} \n`
}

return (
<li key={leader.userId} className="mr-mb-2 mr-flex mr-justify-between">
<div className="mr-text-sm">
<span className="mr-text-pink mr-font-mono mr-mr-4">
<FormattedNumber value={leader.rank} />.
</span>
<Link to={`/user/metrics/${leader.userId}`}>
<Link to={`/user/metrics/${leader.userId}`} title={tooltip}>
{leader.name}
</Link>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ export default defineMessages({
id: "ChallengeOwnerLeaderboard.averageTime.label",
defaultMessage: "Avg. Time",
},

additionalReviews: {
id: "ChallengeOwnerLeaderboard.additionalReviews.label",
defaultMessage: "Additional Reviews",
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,34 @@ export class EditChallenge extends Component {
delete challengeData.dataOriginDate
}

if (_isEmpty(this.state.formData.overpassQL)) {
delete challengeData.overpassQL
}

if (_isEmpty(this.state.formData.remoteGeoJson)) {
delete challengeData.remoteGeoJson
}

challengeData.checkinComment =
AsEditableChallenge(challengeData).checkinCommentWithoutMaprouletteHashtag()
}

if (this.state.formData.source === "Overpass Query") {
// Overpass Query so delete other options
delete challengeData.remoteGeoJson
delete challengeData.localGeoJSON
}
else if (this.state.formData.source === "Local File") {
// Local file so delete other options
delete challengeData.remoteGeoJson
delete challengeData.overpassQL
}
else if (this.state.formData.source === "Remote URL") {
// Remote Url so delete other options
delete challengeData.overpassQL
delete challengeData.localGeoJSON
}

// The server uses two fields to represent the default basemap: a legacy
// numeric identifier and a new optional string identifier for layers from
// the OSM Editor Layer Index. If we're editing a legacy challenge that
Expand Down Expand Up @@ -410,6 +434,10 @@ export class EditChallenge extends Component {
challengeData.customTaskStyles = !_isEmpty(challengeData.taskStyles)
}

if (!_isEmpty(challengeData.overpassQL)) {
challengeData.source = "Overpass Query"
}

return challengeData
}

Expand Down Expand Up @@ -539,6 +567,14 @@ export class EditChallenge extends Component {
challengeData.taskStyles = []
}

// Only send across overpassTargetType if we have an overpass query
if (challengeData.source !== "Overpass Query") {
challengeData.overpassTargetType = null
}
else if (challengeData.overpassTargetType === "none") {
challengeData.overpassTargetType = ""
}

return challengeData
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Overpass is a powerful querying interface for OpenStreetMap data. Using
[Overpass QL](https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide),
the Overpass Query Language, you can retrieve matching OSM objects that you want
to represent as tasks (each result becomes a separate task).
[Learn more](https://github.com/osmlab/maproulette3/wiki/Using-Overpass-queries-to-create-Challenges).
[Learn more](https://learn.maproulette.org/documentation/using-overpass-to-create-challenges/).
#### Local GeoJSON File
Expand All @@ -273,7 +273,7 @@ lon/lat on the WGS84 datum (EPSG:4326), because this is what MapRoulette uses
internally.
> Note: for challenges with a large number of tasks, we recommend using a
[line-by-line](https://github.com/osmlab/maproulette3/wiki/Line-by-Line-GeoJSON-Format)
[line-by-line](https://learn.maproulette.org/documentation/line-by-line-geojson/)
format instead, which is much more efficient to process. Some advanced features
are only available when the line-by-line format is used.
Expand All @@ -299,7 +299,7 @@ will not be able to make sense of it.
overpassQLDescription: {
id: 'Admin.EditChallenge.form.overpassQL.description',
defaultMessage: "Please see the " +
"[wiki](https://github.com/osmlab/maproulette3/wiki/Using-Overpass-to-create-Challenges) " +
"[docs](https://learn.maproulette.org/documentation/using-overpass-to-create-challenges/) " +
"for important details and common pitfalls when creating challenges " +
"using Overpass queries."
},
Expand All @@ -315,6 +315,31 @@ will not be able to make sense of it.
"managing your challenge to re-execute the query and freshen up your tasks."
},

overpassTargetType: {
id: 'Admin.EditChallenge.form.overpassQL.targetType',
defaultMessage: "Overpass Target Type",
},

overpassTargetDescription: {
id: 'Admin.EditChallenge.form.overpassQL.targetType.description',
defaultMessage: "An error will be generated if your Overpass results do not match the target type.",
},

targetNoneLabel: {
id: 'Admin.EditChallenge.form.overpassQL.target.none',
defaultMessage: "Any",
},

targetWayLabel: {
id: 'Admin.EditChallenge.form.overpassQL.target.way',
defaultMessage: "Ways",
},

targetNodeLabel: {
id: 'Admin.EditChallenge.form.overpassQL.target.node',
defaultMessage: "Nodes",
},

localGeoJsonLabel: {
id: 'Admin.EditChallenge.form.localGeoJson.label',
defaultMessage: "I want to upload a GeoJSON file",
Expand Down Expand Up @@ -403,7 +428,7 @@ will not be able to make sense of it.
defaultPriorityDescription: {
id: 'Admin.EditChallenge.form.defaultPriority.description',
defaultMessage: "See the " +
"[wiki](https://github.com/osmlab/maproulette3/wiki/Prioritizing-Tasks-with-Priority-Rules) " +
"[docs](https://learn.maproulette.org/documentation/task-priority-rules/) " +
"for an explanation of how to setup priority rules.",
},

Expand Down Expand Up @@ -538,8 +563,8 @@ will not be able to make sense of it.
"unique value for each feature in your data**. Tasks missing the " +
"property will be assigned a random identifier even if the task " +
"contains other common id properties. " +
"[Learn more on the wiki]" +
"(https://github.com/osmlab/maproulette3/wiki/Challenge-Managers:-setting-external-task-IDs-(e.g.-OSM-IDs))."
"[Learn more]" +
"(https://learn.maproulette.org/documentation/setting-external-task-identifiers/)."
},

customTaskStyleLabel: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ export const jsSchema = (intl, user, challengeData, extraErrors, options={}) =>
intl.formatMessage(messages.overpassQLDescription),
type: "string",
},
overpassTargetType: {
title: intl.formatMessage(messages.overpassTargetType),
description: intl.formatMessage(messages.overpassTargetDescription),
type: "string",
enum: [
"none",
"way",
"node",
],
enumNames: [
intl.formatMessage(messages.targetNoneLabel),
intl.formatMessage(messages.targetWayLabel),
intl.formatMessage(messages.targetNodeLabel),
],
default: "Overpass Target Type",
}
},
}

Expand Down Expand Up @@ -126,13 +142,13 @@ export const jsSchema = (intl, user, challengeData, extraErrors, options={}) =>
else if (!_isEmpty(challengeData.remoteGeoJson)) {
schema.properties = Object.assign(
schema.properties,
_omit(remoteUrl.properties, ['source'])
_omit(remoteUrl.properties, ['source', 'overpassTargetType'])
)
}
else {
schema.properties = Object.assign(
schema.properties,
_omit(localUpload.properties, ['source'])
_omit(localUpload.properties, ['source', 'overpassTargetType'])
)
}

Expand Down Expand Up @@ -166,6 +182,11 @@ export const uiSchema = (intl, user, challengeData, extraErrors, options={}) =>
"ui:placeholder": intl.formatMessage(messages.overpassQLPlaceholder),
"ui:readonly": sourceReadOnly,
},
overpassTargetType: {
"classNames": "",
"ui:widget": "select",
"ui:options": { inline: true },
},
localGeoJSON: {
"ui:widget": DropzoneTextUpload,
"ui:readonly": sourceReadOnly,
Expand All @@ -184,7 +205,7 @@ export const uiSchema = (intl, user, challengeData, extraErrors, options={}) =>
},
"ui:order": [
"name", "source", "overpassQL", "localGeoJSON", "remoteGeoJson",
"ignoreSourceErrors", "dataOriginDate"
"ignoreSourceErrors", "dataOriginDate", "overpassTargetType"
],
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class ProjectOverview extends Component {
{!this.props.project.enabled &&
<div className="mr-text-red-light mr-flex mr-items-center mr-text-base mr-uppercase mr-mt-2">
<a
href="https://github.com/osmlab/maproulette3/wiki/Challenge-Visibility-and-Discoverability"
href={`${process.env.REACT_APP_DOCS_URL}/documentation/challenge-visibility-and-discovery/`}
className="mr-mr-2 mr-flex mr-items-center"
target="_blank"
rel="noopener noreferrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default defineMessages({
},

moreInfo: {
id: "RebuildTasksControl.modal.moreInfo",
defaultMessage: "[Learn More](https://github.com/osmlab/maproulette3/wiki/Rebuilding-(Updating)-Challenge-Task-Data)"
id: "RebuildTasksControl.modal.learnMore",
defaultMessage: "Learn More"
},

removeUnmatchedLabel: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ export class RebuildTasksControl extends Component {
</div>
<div>
<FormattedMessage {...messages.warning} />
<MarkdownContent
markdown={this.props.intl.formatMessage(
messages.moreInfo
)}
/>
<div className="mr-my-4 mr-links-green-light">
<a
href={`${process.env.REACT_APP_DOCS_URL}/documentation/rebuilding-challenge-tasks/`}
target="_blank"
rel="noopener noreferrer"
>
<FormattedMessage {...messages.moreInfo} />
</a>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ export default defineMessages({
defaultMessage: "Task Property Styling",
},

stylesTip: {
id: 'Admin.TaskPropertyStyleRules.styles.tip',
defaultMessage: "See the " +
"[wiki](https://github.com/osmlab/maproulette3/wiki/Styling-Task-Features) " +
"for details on setting up styles."
stylesDoc: {
id: 'Admin.TaskPropertyStyleRules.styles.doc',
defaultMessage: "Learn about setting up styles"
},

deleteRule: {
Expand Down
Loading

0 comments on commit 375d6c6

Please sign in to comment.