-
Notifications
You must be signed in to change notification settings - Fork 356
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
Layouts - always create paging_div, hidden if needed #3271
Conversation
@karelhala @martinpovolny please review. |
Not yet please .. this is still missing the bit where we show the div when hidden, but only in cases where we don't set |
Testing:
For me, the URL is The page is using EDIT: except that |
content layout - always creates paging_div, under #main-content center div with/no listnav - create paging_div conditionally, *after* #main-content center div dashboard - no paging_div, but no ajax transitions to other screens either this updates center div with/without listnav to always create paging_div, hidden if necessary that way, ReportDataController.prototype.movePagination should always succeed, and the pagination will never appear above GTL. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1501035
those classes don't do anything but make it easier to determine the current layout
Testing 2:
before/after: no paging visible
before: paging visible
EDIT: this is true as well |
… truthy assuming @pages being truthy means we should be showing paging, this sends the paging data to GTL, and makes the GTL to show paging_div when present.
this should work for miq-pagination because the GTL will unhide it OTOH if there are forms which expect paging_div to be visible without explicitly unhiding it, they will be missing their buttons
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.
Codewise looks good and simple. Will test on couple of screens if it won't break anything.
This should be ready for testing... I'm pretty sure this should mean no more paging above gtl. I'm almost sure paging should always be there when it should. I'm a bit worried that form buttons may get hidden on forms which don't explicitly show paging_div. |
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/65b5d1c6c25d1ef59126e3a2f1cebb6c4dbf36d5~...989dc324bc6cc3ab93180350485d57bd37b01aa4 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 **
|
Tested in UI. LGTM 👍 |
Tested on multiple edit/config/policy screens and everything looks good. |
Layouts - always create paging_div, hidden if needed (cherry picked from commit b0e99b6) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1536563
Gaprindashvili backport details:
|
content layout - always creates paging_div, after #main-content
center div with/no listnav - create paging_div conditionally, after #main-content
center div dashboard - no paging_div, but no ajax transitions to other screens either
this updates center div with/without listnav to always create paging_div, hidden if necessary
that way, ReportDataController.prototype.movePagination should always succeed, and the pagination will never appear above GTL.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1501035
(also https://bugzilla.redhat.com/show_bug.cgi?id=1535946 which is marked as a dup)