Skip to content

Commit

Permalink
Rename Open Tasks to Pending (#7187)
Browse files Browse the repository at this point in the history
* added new publications to the docs

* rename open tasks to pending tasks

* add explanationand slightly redesign open assigment list view

* updated page title

* slight rephrasing

* Update frontend/javascripts/admin/project/transfer_all_tasks_modal.tsx

Co-authored-by: Florian M <[email protected]>

* Update frontend/javascripts/admin/statistic/open_tasks_report_view.tsx

Co-authored-by: Florian M <[email protected]>

* Update frontend/javascripts/admin/statistic/open_tasks_report_view.tsx

Co-authored-by: Florian M <[email protected]>

* Update frontend/javascripts/admin/project/project_list_view.tsx

Co-authored-by: Florian M <[email protected]>

---------

Co-authored-by: Florian M <[email protected]>
  • Loading branch information
hotzenklotz and fm3 authored Jul 10, 2023
1 parent 5ffe159 commit 9794caf
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
### Changed
- Redesigned the info tab in the right-hand sidebar to be fit the new branding and design language. [#7110](https://github.com/scalableminds/webknossos/pull/7110)
- Optimized processing of parallel requests (new thread pool configuration, asynchronous FossilDB client), improving performance and reducing idle waiting. [#7139](https://github.com/scalableminds/webknossos/pull/7139)
- Renamed "open" tasks to "pending" and slightly redesigned the available task assignment view for clarity. [#7187](https://github.com/scalableminds/webknossos/pull/7187)

### Fixed
- Fixed rare rendering bug at viewport edge for anisotropic datasets. [#7163](https://github.com/scalableminds/webknossos/pull/7163)
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/admin/project/project_list_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class ProjectListView extends React.PureComponent<Props, State> {
width={250}
/>
<Column
title="Open Assignments"
title="Pending Task Instances"
dataIndex="numberOfOpenAssignments"
key="numberOfOpenAssignments"
sorter={Utils.compareBy(typeHint, (project) => project.numberOfOpenAssignments)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class TransferAllTasksModal extends React.PureComponent<Props, State> {
</Modal>
);
} else {
const title = `All users with open tasks of ${project.name}`;
const title = `All users with active tasks for ${project.name}`;
return (
<Modal
title={title}
Expand Down
55 changes: 44 additions & 11 deletions frontend/javascripts/admin/statistic/open_tasks_report_view.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Spin, Table, Card } from "antd";
import { Spin, Table, Card, Typography, Tooltip, Tag } from "antd";
import * as React from "react";
import type { APIOpenTasksReport } from "types/api_flow_types";
import { getOpenTasksReport } from "admin/admin_rest_api";
import { handleGenericError } from "libs/error_handling";
import * as Utils from "libs/utils";
import TeamSelectionForm from "./team_selection_form";
import { InfoCircleOutlined } from "@ant-design/icons";

const { Column } = Table;
const typeHint: APIOpenTasksReport[] = [];
type State = {
Expand Down Expand Up @@ -45,8 +47,24 @@ class OpenTasksReportView extends React.PureComponent<{}, State> {
render() {
return (
<div className="container">
<h3>Open Tasks</h3>

<h3>Available Task Assignments</h3>
<Typography.Paragraph type="secondary">
Select a team to show an overview of its users and the number of available task assigments
they qualify for. Task availability for each user is determined by assigned experiences,
team memberships, the number of pending task instances, etc. For tasks with multiple
instances, each user will get at most one. Note that individual tasks may be listed as
available to multiple users here, but each will only be handed to the first user to
request it.
<a
href="https://docs.webknossos.org/webknossos/tasks.html"
target="_blank"
rel="noopener noreferrer"
>
<Tooltip title="Read more in the documentation">
<InfoCircleOutlined style={{ marginLeft: 10 }} />
</Tooltip>
</a>
</Typography.Paragraph>
<Card>
<TeamSelectionForm onChange={(team) => this.fetchData(team.id)} />
</Card>
Expand Down Expand Up @@ -75,21 +93,36 @@ class OpenTasksReportView extends React.PureComponent<{}, State> {
width={200}
/>
<Column
title="# Assignments"
title="# Available Tasks"
dataIndex="totalAssignments"
defaultSortOrder="ascend"
sorter={Utils.compareBy(typeHint, (task) => task.totalAssignments)}
width={150}
/>
<Column
title=""
title="Available Tasks by Project"
key="content"
render={(_text, item) =>
// @ts-expect-error ts-migrate(2571) FIXME: Object is of type 'unknown'.
Object.keys(item.assignmentsByProjects)
// @ts-expect-error ts-migrate(2571) FIXME: Object is of type 'unknown'.
.map((key) => `${key} (${item.assignmentsByProjects[key]})`)
.join(", ")
render={(_text, item: APIOpenTasksReport) =>
Object.keys(item.assignmentsByProjects).map((key) => {
const [projectName, experience] = key.split("/");
return (
<div key={key}>
<Tooltip
title={
<span>
There are potentially {item.assignmentsByProjects[key]} tasks from the
project <i>{projectName}</i> available for automatic assignment for this
user because they match the configured assignment criteria; especially
the required experience level <i>{experience}</i>.
</span>
}
>
{projectName}: {item.assignmentsByProjects[key]}
</Tooltip>
<Tag style={{ marginLeft: 6 }}>{experience}</Tag>
</div>
);
})
}
/>
</Table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class ProjectProgressReportView extends React.PureComponent<{}, State> {
<Column
title={
<Badge
count="Open"
count="Pending"
style={{
background: colors.open,
}}
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/admin/task/task_list_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ class TaskListView extends React.PureComponent<Props, State> {
key="status"
render={(status, task: APITask) => (
<div className="nowrap">
<span title="Open Instances">
<span title="Pending Instances">
<PlayCircleOutlined />
{status.open}
</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function getStatisticsSubMenu(collapse: boolean): SubMenuType {
key: "/reports/openTasks",
label: (
<PricingEnforcedSpan requiredPricingPlan={PricingPlanEnum.Team}>
<Link to="/reports/openTasks">Open Tasks</Link>
<Link to="/reports/openTasks">Available Task Assignments</Link>
</PricingEnforcedSpan>
),
},
Expand Down

0 comments on commit 9794caf

Please sign in to comment.