-
Notifications
You must be signed in to change notification settings - Fork 232
Edit/Create Projects on page in a popup #1901
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
Conversation
I have not removed the create project and/or edit project pages. Not sure if we want them removed as part of this PR or not. |
app/views/projects.html
Outdated
Create Project | ||
</a> | ||
</button> | ||
<origin-modal-popup shown="showNewProjectPanel" modal-title="Create Project" on-close="closeNewProjectPanel()"> |
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.
As much as possible, I'd like to be consistent in how we handle callbacks for our components. It looks like shown
and on-close
are handled differently here (as well as on-cancel
for create-project
).
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.
I could change either of the components but that would need to be done there and not here. Most of the components bind functions using < or =, I used & for the new origin-modal-popup component. Should I change that?
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.
Right, understood. I suggest we should use <
. I'd at least like to be consistent with callbacks inside the same component. Here shown
is <
and onClose
is &
in the same component.
Sorry, I missed this reviewing openshift/origin-web-common#135
(As an aside, I find callbacks in Angular components generally weird and confusing...)
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.
Wondering if onShown
is not better as well for consistent naming.
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.
shown is a flag not a function.
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.
I can rename the controller variable to reduce confusion.
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.
Ah OK please disregard then :)
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 and renamed the variables.
app/views/projects.html
Outdated
@@ -101,7 +105,7 @@ <h2 class="h1"> | |||
</a> | |||
</li> | |||
<li role="menuitem"> | |||
<a ng-href="project/{{project.metadata.name}}/edit?then=./"> | |||
<a ng-href="#" ng-click="editProject(project)"> |
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.
<a href="" ng-click="editProject(project)">
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
app/scripts/controllers/projects.js
Outdated
$scope.showEditProjectPanel = false; | ||
|
||
$scope.editProject = function(project) { | ||
$scope.edittingProject = project; |
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.
editingProject
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
c618746
to
976a951
Compare
If we remove them, we might think about redirects for the old URLs (maybe just /create-project) in case someone has a link / bookmark. Not too worried about it for this PR. |
app/views/projects.html
Outdated
@@ -25,9 +25,13 @@ <h2 class="text-center">Loading...</h2> | |||
<h1>My Projects</h1> | |||
<div class="projects-options"> | |||
<div class="projects-add" ng-if="canCreate"> | |||
<a href="create-project" class="btn btn-md btn-primary"> | |||
<button ng-click="createProject()" class="btn btn-md btn-primary"> | |||
<span class="fa fa-plus"></span> |
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.
aria-hidden="true"
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
app/views/projects.html
Outdated
@@ -101,7 +105,7 @@ <h2 class="h1"> | |||
</a> | |||
</li> | |||
<li role="menuitem"> | |||
<a ng-href="project/{{project.metadata.name}}/edit?then=./"> | |||
<a ng-href="" ng-click="editProject(project)"> |
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.
nit: href=""
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
If we remove the create project page, we'll also need to update our e2e tests. |
976a951
to
44b91fc
Compare
Created issue #1917 to remove the pages. |
Removed WIP status now that we have updated the version of origin-web-common. |
Hey @jeff-phillips-18. I pulled the changes down, and everything works well. Thanks. A couple of small style questions for @openshift/team-ux-review. I won't block the PR on any of these, particularly if they require origin-web-common changes. Just small things I noticed.
No margin (current): 2px margin:
Without
|
Added Trello card https://trello.com/c/djoHeMob for QE testing. |
[test] to make sure this doesn't break our e2e tests |
44b91fc
to
7a76660
Compare
Fixed the create button spacing. Added issue for input and button sizes: openshift/origin-web-common#142 |
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.
LGTM except for the typo
@@ -41,3 +41,7 @@ | |||
text-decoration: none; | |||
} | |||
} | |||
|
|||
.icon-button-text { | |||
padding-left: 4px; |
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.
👍 thanks for making this a generic style
app/views/projects.html
Outdated
@@ -101,7 +105,7 @@ <h2 class="h1"> | |||
</a> | |||
</li> | |||
<li role="menuitem"> | |||
<a ng-href="project/{{project.metadata.name}}/edit?then=./"> | |||
<a g-href="" ng-click="editProject(project)"> |
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.
typo: g-href
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.
ugh
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
7a76660
to
8a5d4fa
Compare
Fixed popup vertical positioning for projects with descriptions. |
Evaluated for origin web console test up to 8a5d4fa |
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.
LGTM
Origin Web Console Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_web_console/37/) (Base Commit: 8cb608b) (PR Branch Commit: 8a5d4fa) |
[merge] |
Origin Web Console Merge Results: Waiting: You are in the build queue at position: 1 |
Evaluated for origin web console merge up to 8a5d4fa |
https://trello.com/c/djoHeMob
Requires openshift/origin-web-common#135