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
Don't select a default project if there is more than one project #387
Don't select a default project if there is more than one project #387
Conversation
We should have We shouldn't show the red error text when the page first loads. Only if the user focuses the project select, but doesn't select anything. |
c5dfd3c
to
3ba703c
Compare
@spadgett added required and error text when no project selected after losing focus. |
@spadgett curious on "Sorts projects by displayName" . Should we enhance this to sort primary by last accessed by the user & secondary by displayName? @dtaylor113 also curious if this is ui-select if we are including the search capability here? |
|
Yeah, I think so. It's also possible to group items in ui-select, so we could have "Recent" and "All" groups if we want. |
@dtaylor113 https://github.com/openshift/origin-web-console/search?utf8=%E2%9C%93&q=name-taken&type= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add back name-taken
and make sure it's being used properly by callers.
@@ -45,19 +43,11 @@ export class SelectProjectController implements angular.IController { | |||
}); | |||
} | |||
|
|||
public $onChanges(onChangesObj: angular.IOnChangesObject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should handle changes to the passed-in projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
<div class="form-group" ng-class="{'has-error' : $ctrl.forms.selectProjectForm.selectProject.$error.cannotAddToProject || | ||
($ctrl.forms.selectProjectForm.selectProject.$touched && | ||
$ctrl.forms.selectProjectForm.selectProject.$invalid)}"> | ||
<label class="control-label required" for="project">Add to Project</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's for="project"
, but I don't see an id="project"
anywhere. Not new, but we should fix.
If we use an ID here, let's pick a more specific name that is less likely to conflict with another ID that happens to be on the page. It might be easiest just to remove that for now because I'm not sure how to set the ID of the input with ui-select.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, removed for="project"
I see that the HTML is using |
No, it can't be replaced by We need to add |
To be clear, we should still use |
3ba703c
to
cbd795d
Compare
Hi @spadgett, ok added back |
cbd795d
to
505283a
Compare
Thanks @dtaylor113 LGTM |
The following changes have been made to the
<select-project>
component:No Project Selected
User clicks on then off dropdown, and doesn't select a project:
Project Selected
Fixes: openshift/origin-web-console#1833