Skip to content

Commit 81848c5

Browse files
authored
Merge pull request #924 from osmlab/prerelease
Prepare for v3.4.2
2 parents 00768ab + 4196f72 commit 81848c5

File tree

95 files changed

+3172
-2753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3172
-2753
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ REACT_APP_GEOGRAPHIC_INDEXING_DELAY=2
5656
# iD editor base URL
5757
REACT_APP_ID_EDITOR_SERVER_URL='https://www.openstreetmap.org/edit'
5858

59+
# RapiD editor base URL
60+
REACT_APP_RAPID_EDITOR_SERVER_URL='https://mapwith.ai/rapid'
61+
5962
# Level0 editor base URL
6063
REACT_APP_LEVEL0_EDITOR_SERVER_URL='http://level0.osmz.ru/index.php'
6164

CHANGELOG.md

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

10+
## [v3.4.2] - 2019-10-04
11+
### Added
12+
- Completion and review of multiple tasks together
13+
- Templates for generating forms to be filled by mapper during task completion
14+
- RapiD editor option by @gaoxm
15+
- Updated help links by @mvexel
16+
- Additional resiliency to missing task geometries
17+
- Option to include specific task properties as columns in CSV exports
18+
- Minor updates to home page
19+
20+
### Fixed
21+
- Keyboard shortcuts not correctly accounting for modifier keys
22+
- Broken profile pics for some users who uploaded their own avatars to OSM
23+
- Error at end of challenge for users viewing nearby-tasks map
24+
- Erroneous link that implied mappers could review their own tasks
25+
- Locked tasks erroneously offered to users when browsing a challenge
26+
- OSM elements not automatically selected in iD editor (#906)
27+
- Quick-fix task properties not reflecting current OSM tags (#915)
28+
- Task reset back to created status not served to recent viewer
29+
- Potential divide-by-zero error when no results for challenge stats
30+
31+
### Changed
32+
- Control for viewing all tags on a quick-fix tag diff from icon to text
33+
34+
1035
## [v3.4.1] - 2019-09-17
1136
### Added
1237
- Current Month option to leaderboard (#885)

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maproulette3",
3-
"version": "3.4.1",
3+
"version": "3.4.2",
44
"private": true,
55
"dependencies": {
66
"@mapbox/geojsonhint": "^2.0.1",
@@ -23,6 +23,7 @@
2323
"downshift": "^2.0.3",
2424
"file-saver": "^2.0.2",
2525
"fuse.js": "^3.1.0",
26+
"handlebars": "^4.2.0",
2627
"leaflet": "^1.5.1",
2728
"leaflet-vectoricon": "https://github.com/nrotstan/Leaflet.VectorIcon.git#with-viewbox",
2829
"leaflet.markercluster": "^1.4.1",
@@ -73,6 +74,7 @@
7374
"route-matcher": "^0.1.0",
7475
"stale-lru-cache": "^5.1.1",
7576
"uuid": "^3.3.2",
77+
"uuid-time": "^1.0.0",
7678
"vkbeautify": "^0.99.3",
7779
"xmltojson": "^1.3.5"
7880
},

src/components/AdminPane/HOCs/WithCurrentTask/WithCurrentTask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { connect } from 'react-redux'
33
import _get from 'lodash/get'
44
import { saveTask,
55
deleteTask } from '../../../../services/Task/Task'
6-
import WithLoadedTask from '../WithLoadedTask/WithLoadedTask'
6+
import WithLoadedTask from '../../../HOCs/WithLoadedTask/WithLoadedTask'
77

88
/**
99
* WithCurrentTask makes available to the WrappedComponent the current task

src/components/AdminPane/Manage/ChallengeDashboard/ChallengeDashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import WithCurrentChallenge
2020
import WithWidgetWorkspaces
2121
from '../../../HOCs/WithWidgetWorkspaces/WithWidgetWorkspaces'
2222
import WithFilteredClusteredTasks
23-
from '../../HOCs/WithFilteredClusteredTasks/WithFilteredClusteredTasks'
23+
from '../../../HOCs/WithFilteredClusteredTasks/WithFilteredClusteredTasks'
2424
import WithChallengeMetrics
2525
from '../../HOCs/WithChallengeMetrics/WithChallengeMetrics'
2626
import WithChallengeReviewMetrics

src/components/AdminPane/Manage/ChallengeTaskMap/Messages.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/components/AdminPane/Manage/ManageChallenges/EditChallenge/Messages.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default defineMessages({
161161
categoryDescription: {
162162
id: 'Admin.EditChallenge.form.category.description',
163163
defaultMessage: "Selecting an appropriate high-level category for your " +
164-
"challenge can aid users in quickly discovering challenges that " +
164+
"challenge can aid users in quickly discovering challenges that " +
165165
"match their interests. Choose the Other category if nothing seems " +
166166
"appropriate.",
167167
},
@@ -423,4 +423,16 @@ will not be able to make sense of it.
423423
id: "Admin.EditChallenge.form.customBasemap.description",
424424
defaultMessage: "Insert a custom base map URL here. E.g. `https://\\{s\\}.tile.openstreetmap.org/\\{z\\}/\\{x\\}/\\{y\\}.png` {dummy}",
425425
},
426+
427+
exportablePropertiesLabel: {
428+
id: 'Admin.EditChallenge.form.exportableProperties.label',
429+
defaultMessage: "Properties to export in CSV",
430+
},
431+
432+
exportablePropertiesDescription: {
433+
id: 'Admin.EditChallenge.form.exportableProperties.description',
434+
defaultMessage: "Any properties included in this comma separated list " +
435+
"will be exported as a column in the CSV export and populated with the " +
436+
"first matching feature property from each task.",
437+
},
426438
})

src/components/AdminPane/Manage/ManageChallenges/EditChallenge/Step4Schema.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ export const jsSchema = intl => {
8080
enumNames: _map(defaultBasemapChoices, 'name'),
8181
default: ChallengeBasemap.none.toString(),
8282
},
83+
exportableProperties: {
84+
title: intl.formatMessage(messages.exportablePropertiesLabel),
85+
type: "string",
86+
},
8387
},
8488
dependencies: { // Only show customBasemap if defaultBasemap set to Custom
8589
defaultBasemap: {
@@ -144,6 +148,10 @@ export const uiSchema = intl => ({
144148
"ui:emptyValue": "",
145149
"ui:help": intl.formatMessage(messages.customBasemapDescription, {dummy: ''}),
146150
},
151+
exportableProperties: {
152+
"ui:emptyValue": "",
153+
"ui:help": intl.formatMessage(messages.exportablePropertiesDescription),
154+
},
147155
})
148156

149157
export const numericEnvSetting = (settingName, defaultValue) => {

src/components/AdminPane/Manage/ViewChallengeTasks/Messages.js

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,46 +48,16 @@ export default defineMessages({
4848
"searches until indexing is complete."
4949
},
5050

51-
bulkSelectionTooltip: {
52-
id: "Admin.manageTasks.controls.bulkSelection.tooltip",
53-
defaultMessage: "Select tasks for bulk operation",
54-
},
55-
56-
changeStatusToLabel: {
57-
id: "Admin.manageTasks.controls.changeStatusTo.label",
58-
defaultMessage: "Change status to ",
59-
},
60-
61-
chooseStatusLabel: {
62-
id: "Admin.manageTasks.controls.chooseStatus.label",
63-
defaultMessage: "Choose ... ",
64-
},
65-
6651
changePriorityLabel: {
6752
id: "Admin.manageTasks.controls.changePriority.label",
6853
defaultMessage: "Change Priority",
6954
},
7055

71-
showReviewColumnsLabel: {
72-
id: "Admin.manageTasks.controls.showReviewColumns.label",
73-
defaultMessage: "Show Review Columns",
74-
},
75-
76-
hideReviewColumnsLabel: {
77-
id: "Admin.manageTasks.controls.hideReviewColumns.label",
78-
defaultMessage: "Hide Review Columns",
79-
},
80-
8156
priorityLabel: {
8257
id: "Admin.manageTasks.priorityLabel",
8358
defaultMessage: "Priority",
8459
},
8560

86-
exportCSVLabel: {
87-
id: "Admin.manageTasks.controls.exportCSV.label",
88-
defaultMessage: "Export CSV",
89-
},
90-
9161
filterByStatusLabel: {
9262
id: "Admin.manageTasks.controls.filterByStatus.label",
9363
defaultMessage: "Filter by Status",
@@ -103,23 +73,28 @@ export default defineMessages({
10373
defaultMessage: "Filter by Priority",
10474
},
10575

106-
exportGeoJSONLabel: {
107-
id: "Admin.manageTasks.controls.exportGeoJSON.label",
108-
defaultMessage: "Export GeoJSON",
109-
},
110-
11176
clearFiltersLabel: {
11277
id: "Admin.manageTasks.controls.clearFilters.label",
11378
defaultMessage: "Clear Filters",
11479
},
11580

116-
taskCountShownStatus: {
117-
id: "Admin.TaskAnalysisTableHeader.taskCountStatus",
118-
defaultMessage: "Shown: {countShown} Tasks",
81+
inspectTaskLabel: {
82+
id: "Admin.ChallengeTaskMap.controls.inspectTask.label",
83+
defaultMessage: "Inspect Task",
84+
},
85+
86+
editTaskLabel: {
87+
id: "Admin.ChallengeTaskMap.controls.editTask.label",
88+
defaultMessage: "Edit Task",
89+
},
90+
91+
nameLabel: {
92+
id: "Admin.Task.fields.name.label",
93+
defaultMessage: "Task:",
11994
},
12095

121-
taskPercentShownStatus: {
122-
id: "Admin.TaskAnalysisTableHeader.taskPercentStatus",
123-
defaultMessage: "Shown: {percentShown}% ({countShown}) of {countTotal} Tasks",
96+
statusLabel: {
97+
id: "Admin.Task.fields.status.label",
98+
defaultMessage: "Status:",
12499
},
125100
})

src/components/AdminPane/Manage/ViewChallengeTasks/ViewChallengeTasks.js

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ import { TaskPriority,
1717
from '../../../../services/Task/TaskPriority/TaskPriority'
1818
import { TaskStatusColors }
1919
from '../../../../services/Task/TaskStatus/TaskStatus'
20+
import AsManager from '../../../../interactions/User/AsManager'
2021
import WithBoundedTasks
21-
from '../../HOCs/WithBoundedTasks/WithBoundedTasks'
22+
from '../../../HOCs/WithBoundedTasks/WithBoundedTasks'
2223
import MapPane from '../../../EnhancedMap/MapPane/MapPane'
2324
import SvgSymbol from '../../../SvgSymbol/SvgSymbol'
2425
import BusySpinner from '../../../BusySpinner/BusySpinner'
2526
import IntervalRender from '../../../IntervalRender/IntervalRender'
26-
import ChallengeTaskMap from '../ChallengeTaskMap/ChallengeTaskMap'
27-
import TaskAnalysisTable from '../TaskAnalysisTable/TaskAnalysisTable'
27+
import ChallengeTaskMap from '../../../ChallengeTaskMap/ChallengeTaskMap'
28+
import TaskAnalysisTable from '../../../TaskAnalysisTable/TaskAnalysisTable'
2829
import TaskBuildProgress from './TaskBuildProgress'
2930
import GeographicIndexingNotice from './GeographicIndexingNotice'
3031
import messages from './Messages'
3132
import Dropdown from '../../../Dropdown/Dropdown'
3233

34+
const TaskMap = ChallengeTaskMap('challengeOwner')
35+
3336
/**
3437
* ViewChallengeTasks displays challenge tasks as both a map and a table,
3538
* along with filtering controls for showing subsets of tasks.
@@ -177,16 +180,21 @@ export class ViewChallengeTasks extends Component {
177180
<div className='admin__manage-tasks'>
178181
<GeographicIndexingNotice challenge={this.props.challenge} />
179182

180-
<MapPane>
181-
<ChallengeTaskMap taskInfo={this.props.taskInfo}
182-
setChallengeOwnerMapBounds={this.props.setChallengeOwnerMapBounds}
183-
lastBounds={this.props.mapBounds}
184-
lastZoom={this.props.mapZoom}
185-
statusColors={TaskStatusColors}
186-
filterOptions={filterOptions}
187-
monochromaticClusters
188-
{...this.props} />
189-
</MapPane>
183+
<div className="mr-h-100">
184+
<MapPane>
185+
<TaskMap
186+
taskInfo={this.props.taskInfo}
187+
setMapBounds={this.props.setChallengeOwnerMapBounds}
188+
lastBounds={this.props.mapBounds}
189+
lastZoom={this.props.mapZoom}
190+
statusColors={TaskStatusColors}
191+
filterOptions={filterOptions}
192+
taskMarkerContent={TaskMarkerContent}
193+
challengeId={this.props.challenge.id}
194+
monochromaticClusters
195+
{...this.props} />
196+
</MapPane>
197+
</div>
190198

191199
<div className="mr-my-4 xl:mr-flex mr-justify-between">
192200
<ul className="mr-mb-4 xl:mr-mb-0 md:mr-flex">
@@ -201,13 +209,15 @@ export class ViewChallengeTasks extends Component {
201209
</li>
202210
</ul>
203211

204-
{_get(this.props, 'clusteredTasks.tasks.length') !== _get(this.props, 'taskInfo.tasks.length', 0) ? clearFiltersControl : null}
205-
</div>
212+
{_get(this.props, 'clusteredTasks.tasks.length') !== _get(this.props, 'taskInfo.tasks.length', 0) ? clearFiltersControl : null}
213+
</div>
206214

207-
<TaskAnalysisTable filterOptions={filterOptions}
208-
changeStatus={this.changeStatus}
209-
totalTaskCount={_get(this.props, 'clusteredTasks.tasks.length')}
210-
{...this.props} />
215+
<TaskAnalysisTable
216+
filterOptions={filterOptions}
217+
changeStatus={this.changeStatus}
218+
totalTaskCount={_get(this.props, 'clusteredTasks.tasks.length')}
219+
{...this.props}
220+
/>
211221
</div>
212222
)
213223
}
@@ -238,6 +248,50 @@ const buildFilterDropdown = (titleId, filters) => {
238248
)
239249
}
240250

251+
const TaskMarkerContent = props => {
252+
const manager = AsManager(props.user)
253+
const taskBaseRoute =
254+
`/admin/project/${props.challenge.parent.id}` +
255+
`/challenge/${props.challengeId}/task/${props.marker.options.taskId}`
256+
257+
return (
258+
<React.Fragment>
259+
<div>
260+
{
261+
props.intl.formatMessage(messages.nameLabel)
262+
} {
263+
props.marker.options.name
264+
}
265+
</div>
266+
<div>
267+
{
268+
props.intl.formatMessage(messages.statusLabel)
269+
} {
270+
props.intl.formatMessage(messagesByStatus[props.marker.options.status])
271+
}
272+
</div>
273+
274+
<div className="marker-popup-content__links">
275+
<div>
276+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
277+
<a onClick={() => props.history.push(`${taskBaseRoute}/inspect`)}>
278+
{props.intl.formatMessage(messages.inspectTaskLabel)}
279+
</a>
280+
</div>
281+
282+
{manager.canWriteProject(props.challenge.parent) &&
283+
<div>
284+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
285+
<a onClick={() => props.history.push(`${taskBaseRoute}/edit`)}>
286+
{props.intl.formatMessage(messages.editTaskLabel)}
287+
</a>
288+
</div>
289+
}
290+
</div>
291+
</React.Fragment>
292+
)
293+
}
294+
241295
ViewChallengeTasks.propTypes = {
242296
/** The tasks to display */
243297
filteredClusteredTasks: PropTypes.shape({

0 commit comments

Comments
 (0)