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

Create a Assignee Picker that allows the user to add/remove/modify the assignee of an issue #1288 #1303

Merged
merged 15 commits into from
Apr 4, 2016

Conversation

garbanzos
Copy link
Contributor

Fixes #1288

image

  • Works in the same way as milestone picker
  • Followed the implementation of milestone picker

@damithc
Copy link
Contributor

damithc commented Mar 3, 2016

Change status when ready for review. Also, post a screenshot. The interaction should be similar to label picker (i.e. type to select). The avatar can be shown bigger.

return true;
}

//TODO yy change remove isUpdateSuccessful from log msg
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this TODO supposed to be 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.

Nope. I will remove it.

@damithc
Copy link
Contributor

damithc commented Mar 27, 2016

@ndt93 this issue needs a reviewer. @garbanzos please ask for a reviewer if you don't get one within 24 hours after it is ready for review.

@ndt93
Copy link
Contributor

ndt93 commented Mar 27, 2016

@dariusf Can you help review this? Thanks.
@garbanzos Can you write tests for this?

private void showAssigneePicker(TurboIssue issue) {
List<TurboUser> assigneeList = ui.logic.getRepo(issue.getRepoId()).getUsers();
AssigneePickerDialog assigneePickerDialog = new AssigneePickerDialog(stage, issue, assigneeList);
Optional<AssigneePickerDialogResponse> assigneeDialogResponse = assigneePickerDialog.showAndWait();
Copy link
Contributor

Choose a reason for hiding this comment

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

Think I said the same things for the milestone picker:

  • Types are implementation details, so we can leave them out of variable names. assignees?
  • We don't really need to name the intermediate result, so we can do new AssigneePickerDialog(...).showAndWait(...).

Also, can the dialog response by an inner class? Then we don't have to prefix it.

- intial semi-working version of assignee picker
- UI and interactions of assignee picker attempts to mimic the label picker
- Scroll pane displays message when there are no assignees that match query
- Added resetList & fixed problem that existing assignee is not showing
- Change style of label and padding of flowpane
return issue.getAssignee().get().equals(assignee.getLoginName());
}

private void setupButtons(DialogPane assigneePickerDialogPane) {
Copy link
Contributor

Choose a reason for hiding this comment

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

To make this a little less verbose, we can maybe leave out the assigneePicker prefix, since it's clear from the context in which this method appears.

@dariusf
Copy link
Contributor

dariusf commented Apr 4, 2016

The avatar taking a long time to load could be made a separate issue.

@garbanzos
Copy link
Contributor Author

@dariusf ready for review again.
I haven't changed the error handling part though.

import java.util.stream.Stream;

public class AssigneePickerState {
private List<PickerAssignee> currentAssigneesList;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the better name is ...UsersList or ...MembersList? There can be only one assignee but there can be a list of users. Create a separate issue to change Assignee to a more appropriate name (Member/User) across all this code.

…ith spaces

- Assignee picker related backend methods accept Optional<String> as argument
- Refactored isFaded to isMatching and removed isHighlighted in PickerAssignee
- Added AssigneePickerDialogResponse
- Added removeAssignee in TurboIssue
- Tweaked UI of assignee picker
	- Changed context menu text for assignee picker menu item
	- Removed test case of 'a' keyboard shortcut from chromedrivertest
	- Added GUI tests for assignee picker
- Moved getExistingAssignee and getSelectedAssignee to PickerAssignee
- Moved AssigneePickerTests from unstable to guitests
- AssigneePickerDialogResponse is now an inner class of AssigneePickerDialog
@garbanzos garbanzos merged commit a61dd08 into HubTurbo:master Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants