-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add dynamic field selector to actions menu #9543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2ad3a6b
add assignee selector to tasks-actions
klakhov d71e5fe
update broken solution
klakhov afccce7
Merge branch 'develop' into kl/add-dynamic-select
klakhov 1786192
Refactor task update handling. Update user selector.
klakhov 2d82692
use state callback without prefix
klakhov e605ef6
add project assignee selector
klakhov 883a2ab
job selectors
klakhov b04e335
notifications for errors
klakhov 36fd4fd
set correct weights for menu items
klakhov 686deb1
refactor to reduce code duplication
klakhov 17d5458
Merge branch 'develop' into kl/add-dynamic-select
klakhov 2b2dccf
Added label with an arrow
klakhov a2eb1fb
Merge branch develop
klakhov 017d928
Applied code-style comments
klakhov 5762049
Updated actions menu to have edit field logic in higher level component
klakhov 3ce61a5
Merge branch 'develop' into kl/add-dynamic-select
klakhov 3e8ae83
Merge branch 'develop' into kl/add-dynamic-select
klakhov 386c880
Remove unused prop
klakhov d1b4b86
Add changelog
klakhov ae825c5
Fix changelog
klakhov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Added | ||
|
||
- Selector that allows inline editing of the following fields from card views: `assignee`, `state`, and `stage`. | ||
(<https://github.com/cvat-ai/cvat/pull/9543>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import React from 'react'; | ||
import { RightOutlined } from '@ant-design/icons'; | ||
import Text from 'antd/lib/typography/Text'; | ||
|
||
import './styles.scss'; | ||
|
||
interface CVATMenuEditLabelProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export function CVATMenuEditLabel(props: CVATMenuEditLabelProps): JSX.Element { | ||
const { children } = props; | ||
return ( | ||
<div className='cvat-menu-edit-label'> | ||
<Text>{children}</Text> | ||
<RightOutlined /> | ||
</div> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (C) CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import React from 'react'; | ||
import Select from 'antd/lib/select'; | ||
import { JobStage, JobState } from 'cvat-core-wrapper'; | ||
|
||
interface JobStateSelectorProps { | ||
value: JobState; | ||
onSelect: (newValue: JobState) => void; | ||
} | ||
|
||
export function JobStateSelector({ value, onSelect }: JobStateSelectorProps): JSX.Element { | ||
return ( | ||
<Select | ||
className='cvat-job-item-state' | ||
popupClassName='cvat-job-item-state-dropdown' | ||
value={value} | ||
onChange={onSelect} | ||
> | ||
<Select.Option value={JobState.NEW}>{JobState.NEW}</Select.Option> | ||
<Select.Option value={JobState.IN_PROGRESS}>{JobState.IN_PROGRESS}</Select.Option> | ||
<Select.Option value={JobState.REJECTED}>{JobState.REJECTED}</Select.Option> | ||
<Select.Option value={JobState.COMPLETED}>{JobState.COMPLETED}</Select.Option> | ||
</Select> | ||
); | ||
} | ||
|
||
interface JobStageSelectorProps { | ||
value: JobStage; | ||
onSelect: (newValue: JobStage) => void; | ||
} | ||
|
||
export function JobStageSelector({ value, onSelect }: JobStageSelectorProps): JSX.Element { | ||
return ( | ||
<Select | ||
className='cvat-job-item-stage' | ||
popupClassName='cvat-job-item-stage-dropdown' | ||
value={value} | ||
onChange={onSelect} | ||
> | ||
<Select.Option value={JobStage.ANNOTATION}> | ||
{JobStage.ANNOTATION} | ||
</Select.Option> | ||
<Select.Option value={JobStage.VALIDATION}> | ||
{JobStage.VALIDATION} | ||
</Select.Option> | ||
<Select.Option value={JobStage.ACCEPTANCE}> | ||
{JobStage.ACCEPTANCE} | ||
</Select.Option> | ||
</Select> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.