Skip to content
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

Fix the placement of form buttons on the ops screens #1500

Merged
merged 1 commit into from
Jun 8, 2017

Conversation

skateman
Copy link
Member

@skateman skateman commented Jun 7, 2017

Before this got broken, the #paging_div contained the #form_buttons_div and the JS adjusted the parent's position only. As the #form_buttons_div is no longer the child of #paging_div, I had to adjust the JS with an extra test for the buttons' visibility.

This is a not very clean solution, but I will revisit it when refactoring the HTML layout + CSS styling of the right cell.

Fixes #1497

@skateman skateman changed the title Fix the placement of form buttons on the ops screens [WIP] Fix the placement of form buttons on the ops screens Jun 7, 2017
@skateman skateman force-pushed the form-buttons-div-fix branch from 5421e99 to 4aa69e1 Compare June 8, 2017 08:05
@skateman skateman changed the title [WIP] Fix the placement of form buttons on the ops screens Fix the placement of form buttons on the ops screens Jun 8, 2017
@skateman
Copy link
Member Author

skateman commented Jun 8, 2017

@martinpovolny can you take a look? It would require some clicking in the UI on variuous form/paginator/gtl places...

@miq-bot miq-bot removed the wip label Jun 8, 2017
}
if (toolbar.find("*:visible").length > 0) {
height += toolbar.outerHeight();
height += toolbar.outerHeight() ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra space

@martinpovolny
Copy link
Member

@skateman : the code and the explanation look correct.

@h-kataria : can you, please, take a look?

Generally we need get rid of this. The buttons should be part of the form and we should not be doing any crazy stuff such as inserting buttons into every page and then showing/hinding them or having 2 sets of buttons enabled/disabled. We need to carry on removing these "magic" traps from the code. And of course if we have partial called "pagination" is should never include form buttons...

@skateman skateman force-pushed the form-buttons-div-fix branch from 4aa69e1 to bc15616 Compare June 8, 2017 12:47
@miq-bot
Copy link
Member

miq-bot commented Jun 8, 2017

Checked commit skateman@bc15616 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. ⭐

@dclarizio
Copy link

@martinpovolny

The buttons should be part of the form and we should not be doing any crazy stuff such as inserting buttons into every page and then showing/hinding them or having 2 sets of buttons enabled/disabled.

The reason they were separated was we didn't want the user to have to scroll down to find the form buttons (i.e. they only change the name field at the top and nothing else) and we couldn't figure out how to "lock" them to the bottom of the div (at least at the time). If we can make a solution that does that for us, I'm all in!

@h-kataria
Copy link
Contributor

verified, fixes missing form button issues in UI. These explorers are special cases where we didn't have GTL/pagination since we don't expect lists to be longer. Height for the main_content div was being calculated using paging_div which did not exist in this case.

@h-kataria h-kataria added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 8, 2017
@h-kataria h-kataria merged commit deef2b6 into ManageIQ:master Jun 8, 2017
@martinpovolny
Copy link
Member

@dclarizio : in this case I would love to have some guidelines.

I see in patternfly doc and in angularized forms that the buttons are part of the form.

Is that something we are generally going to do or do we want to keep the functionality of form buttons on a fixed place in some parts of the app (to save users from the scrolling)?

If we want to keep that we might just clean it up and make sure that it's done the same on all pages.

@skateman skateman deleted the form-buttons-div-fix branch June 9, 2017 09:18
@dclarizio
Copy link

@martinpovolny perhaps we should discuss with @serenamarie125 . . . just thinking we might get some push back from users if all of a sudden they have to scroll to the form buttons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants