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
Fixes #23481 - Host Collection Action Modal Links #7353
Conversation
Issues: #23481 |
@Rohoover: Could you take a quick look at 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.
Anyway we could put in a back button? This would prevent stacking modals.
@Rohoover : Sorry about the messed up graphics. Some weird gif conversion issue.
Let me try a few alternative approaches around preventing stacking modals and I will get back to you..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.
I prefer the modals not stack, that content be loaded into the same modal with a back button to go to the original modal.
6e5b72b
to
27fda1b
Compare
Updates: The Errata Modal should behave as requested now. |
[test prprocessor] |
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'm not sure if this is the 'right' way to go about fixing the links from a Javascript perspective. What is the transitionTo()
function? Why were we using it before and why should we stop using it?
Even though I mention linking directly without modals, I ultimately think we should try to keep it working as it has been (with modals) if we can because it should decrease the code changes.
@@ -105,6 +105,103 @@ <h4 data-block="modal-header">Content Host Errata Management</h4> | |||
</table> | |||
</div> | |||
</div> | |||
|
|||
<div name="errataDetails" ng-show="showErrata"> |
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'm unclear why this is a better solution than simply linking to the erratum details page. If we really want to use modals, at least we could use a partial to reduce the risk of introducing bugs if something (i.e. the API) changes in the future. From a development point of view, it's just not DRY. Also, the erratum details page lists the repositories and content hosts affected as well, which I think (the repos) is useful information not currently provided by these modals.
I can see an argument for the modal in that it decreases context switching for our users. Maybe they just want to apply any applicable errata but want to just 'peek' at a few errata to see which packages are provided, etc.
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.
@akofink : So this modal logic with link redirects had these 2 pages Errata Content host and Errata Details which become dead code following this change.
These 2 pages worked fine till 6.2 but once we moved to modals in 6.3, the redirects stopped working.
Do you suggest turning these pages into modals or a simple redirect to the regular errata detail page etc..(We still have some context switching involved with links on the other modals. I don't know why errata was treated differently in the first place)
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.
Hmmm... I guess we should fix it to work as was intended in 3.4 (6.3) with the modals? It's kind of a UX question, so maybe @Rohoover has some input. We should definitely still support all the workflows we used to support in 3.0 (6.2) before we changed over to modals.
@@ -80,7 +80,7 @@ <h4 data-block="modal-header" translate> | |||
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions"> | |||
<td class="row-select"></td> | |||
<td colspan="8"> | |||
<a ui-sref="subscription.info({subscriptionId: subscription.id})" class="confined-text"> | |||
<a ng-click="ok();" ui-sref="subscription.info({subscriptionId: subscription.id})" class="confined-text"> |
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.
This confirmation modal doesn't lock out the yes/no buttons after the first click, so I can easily get 500 errors from the server by clicking yes/no multiple times before I'm redirected to the task progress.
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.
This probably should be made into a separate issue rather than being fixed in this PR.
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 will go ahead open an issue around the same.
The transitionTo() method was used to redirect to the errata details and content hosts page specific to the errata action on host collections.
I am trying not to use those page as redirect links but content inside the existing modal seems more user friendly instead of the redirection.
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.
Sorry for the delay. I wanted to spin up a 6.2 box to see how it used to work. I think the way you've implemented is 'correct', meaning that it seems to work very similar to the way it used to work in 6.2, just with modals! :)
If we're no longer using those two views, let's go ahead and delete them in this PR.
- https://github.com/Katello/katello/blob/master/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-content-hosts.html
- https://github.com/Katello/katello/blob/master/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-details.html
I will go ahead and delete the 2 pages and open an issue around the yes/no button disabling. Thanks @akofink ! |
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.
Nice work! ACK!
Description:
The Host Collection Modals have links which do not work.
Steps to reproduce:
Go to Hosts> Host Collections > Any record > Click on Errata Installation
In the table in the modal, click on any link, it leads to an error in the console.
On the other modal links (eg: Host Collections, Subscriptions etc), even though the page redirects on a link click, the modal doesn't close.
Suggested solution: