Skip to content
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

User search field #2370

Merged
merged 12 commits into from
Nov 11, 2020
Merged

User search field #2370

merged 12 commits into from
Nov 11, 2020

Conversation

ActiveChooN
Copy link
Contributor

@ActiveChooN ActiveChooN commented Oct 28, 2020

Motivation and context

изображение

This PR provide user search field for assignee field for the task. It should increase UX with user search by username and increase loading speed for cvat.org.

How has this been tested?

Manually

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@ActiveChooN ActiveChooN added the enhancement New feature or request label Oct 28, 2020
@bsekachev
Copy link
Member

Could you please merge develop to CI passes?

@bsekachev
Copy link
Member

It looks like some unit tests of cvat-core & cypress tests are broken

@coveralls
Copy link

coveralls commented Oct 30, 2020

Coverage Status

Coverage decreased (-0.02%) to 61.514% when pulling 8c22003 on dk/user-search into a916e65 on develop.

@ActiveChooN
Copy link
Contributor Author

@bsekachev, all tests was fixed

@bsekachev
Copy link
Member

Now each new character creates new HTTP request. How about debouncing a user input? 0.5-1 seconds I suppose would be appropriate.
Screenshot from 2020-11-10 12-44-33

@@ -4,6 +4,7 @@

module.exports = {
env: {
amd: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eslint warn about require usage without that flag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just set node to true

@@ -86,7 +86,7 @@ context('Multiple users. Assign task, job.', () => {
it('Assign the task to the second user and logout', () => {
cy.openTask(taskName);
cy.get('.cvat-task-details').within(() => {
cy.get('.cvat-user-selector').click({ force: true });
cy.get('.cvat-user-search-field').click({ force: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selector .cvat-user-selector is still appear in the project (cvat-ui/src/components/task-page/styles.scss)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the styles also applicable for the new element

cvat-ui/src/components/task-page/user-selector.tsx Outdated Show resolved Hide resolved
@bsekachev
Copy link
Member

It is not very obvious how to remove assignee with current UI element. To do that I need to remove the text and click outside the input field (enter doesn't work for example). I suppose it might be more user-friendly.
One more approach which probably better I see is adding X icon at the right of input for the purpose.

@bsekachev
Copy link
Member

@ActiveChooN
On other points the patch is nice and it significantly accelerates the user interface. Let's fix left comments, resolve conflicts and merge it

@bsekachev
Copy link
Member

@dvkruchinin Hi, on CI we get Failed to connect to Chrome, retrying in 1 second (attempt 23/62). As far as I remember you've fixed something like that. Doesn't the fix work? Maybe try to find another ways or workarounds? It is not a rare issue

@dvkruchinin
Copy link
Contributor

@dvkruchinin Hi, on CI we get Failed to connect to Chrome, retrying in 1 second (attempt 23/62). As far as I remember you've fixed something like that. Doesn't the fix work? Maybe try to find another ways or workarounds? It is not a rare issue

Hi,
It was more of a test. Since in the discussions, cypress users wrote that someone this fix helped, someone did not. Yes, I'll keep looking. And I want to believe that this error has become less common.

@ActiveChooN
Copy link
Contributor Author

@bsekachev

It is not very obvious how to remove assignee with current UI element. To do that I need to remove the text and click outside the input field (enter doesn't work for example). I suppose it might be more user-friendly.
One more approach which probably better I see is adding X icon at the right of input for the purpose.

Added Enter button for empty search request

I suppose the styles also applicable for the new element

Strange margins here, removed styles

@bsekachev bsekachev merged commit 8334f06 into develop Nov 11, 2020
@ActiveChooN ActiveChooN deleted the dk/user-search branch November 11, 2020 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants