-
Notifications
You must be signed in to change notification settings - Fork 26
JENKINS-62285 Don't use browser alert for notifications and confirmation #60
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
src/main/webapp/js/addrole.js
Outdated
alert('The role was added successfully'); | ||
location.reload(); // refresh the page | ||
showNotificationOK('The role was added successfully'); | ||
//location.reload(); // refresh the page |
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 shouldn't leave commented out code in, it looks like the function handles this?
//location.reload(); // refresh the page |
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 forgot that, removed now
It would be best to name your PR with a summary description of what this PR does |
src/main/webapp/js/managesids.js
Outdated
} else { | ||
alert('Unable to remove the sid.' + request.responseText); | ||
showNotificationOK('Sid removed successfully.'); | ||
} else {s |
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
} else {s | |
} else { |
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
} | ||
|
||
function showNotificationOK(message) { | ||
showNotification(message, notificationBar.OK, 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.
There's a small problem with this behaviour. The page only refreshes when the success notification disappears. So for about 2 seconds, the notification shows but the content is not updated. With the alerts, as soon as the user clicked OK, the page was refreshed. Would it be possible to use a modal popup here? Also note that I'm working on #58 which will completely change the UI.
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.
Hi, thanks for your comment. I will search for modal solution, not sure though if its possible or not. For providing similar functionality I added optional reload feature, which waits for notification.DELAY.
About the UI change, of course It is up to you. We can apply this change until the new UI is published.
@timja Do you know any examples for Modal implementation ? Thanks.
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.
better to not refresh the page and to do a live update, or let the user refresh it themselves really.
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 think that is topic of the UI change that @AbhyudayaSharma mentioned. Should we decline this request 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.
Yeah, the code will likely still be useful, thanks for doing this!
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.
No problem
Thanks @aytuncbeken ! This code will be useful for me when working on #58. I'm closing this PR then. |
Hi,
As a part of the UI Hackfest. I fixed the issue JENKINS-62285.
I hope this PR is acceptable for you.
You can see the details of the issue from here.
https://issues.jenkins-ci.org/browse/JENKINS-62285