-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
reposition footer #2269
reposition footer #2269
Conversation
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 am okay with this. However, I do notice that on some pages where the content is not also restricted to the col-10
width (like the "User Manager", the "Set Manager", etc.), things look a little unbalanced. The footer is to the left of center relative to the full width content directly above it.
htdocs/themes/math4/system.html.ep
Outdated
@@ -172,7 +172,7 @@ | |||
% } | |||
% | |||
% # Footer | |||
<div id="footer" role="contentinfo"><%= include 'ContentGenerator/Base/footer' %></div> | |||
<div id="footer" role="contentinfo" class="row"><%= include 'ContentGenerator/Base/footer' %></div> |
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.
When I converted the footer into an included Mojolicious template from the old template system in which this was a template escape, I maintained the structure which had the containing div
here. I really should have moved that containing div into the included footer template though. This is made worse conceptually with this change though, because this div
has the row
class which is important for the col
class on the div
in the included template. So I suggest that this be changed to
<div id="footer" role="contentinfo" class="row"><%= include 'ContentGenerator/Base/footer' %></div> | |
<%= include 'ContentGenerator/Base/footer' =%> |
and the <div id="footer" role="contentinfo" class="row">...</div>
be moved into the footer.html.ep file.
Yeah, I'm noticing that now too on the login screen, which I really don't like since that's a screen everyone sees a lot. I'll rethink this. |
Is it possible for a template (like the main template for a page) to store a value in some way so the footer template can access it? Then the main templates could store something about their width (e.g. |
Yes. I added a pull request to this branch that implements the mechanism for this. It is not complete though. I left the work of going through page by page and determining what width is needed to you. I think most pages will not need anything as the default of |
I think that in most cases the |
I set the overall footer class in Then set the class in several pages where that the overall positioning was different. In the Set Assigner template, the instruction text at the bottom is now in a bs grid that has the same width as the scrolling record lists above, and then of course the footer is the same. In the scoring template, I changed to use a bs grid around the tools at the top of the page for selecting sets, and then made the footer match 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.
This generally looks good except the scoring page. I am not entirely sold on centering the footer relative to the left part of the page content for the pages that have the info box, but I can live with it.
@@ -19,6 +19,8 @@ | |||
<%= maketext('Select user(s) and/or set(s) below and click the action button of your choice.') =%> | |||
</p> | |||
% | |||
% stash->{footerWidthClass} = 'col-xl-10 col-md-12'; |
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.
The col-md-12
is not actually needed. The col-xl-10
class does not have effect if the window width is below the xl
breakpoint, and for anything under that the div
will have width:100%
set (any direct descendant of a row
gets that). It doesn't hurt, but it isn't needed either.
<%= $c->hidden_authen_fields =%> | ||
<%= hidden_field returning => 1 =%> | ||
<div class="row"> | ||
<div class="col-sm-6 mb-2"> |
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 don't really like how this page looks the best with the change here to a col-sm-6
and the later change from col-sm-7
to col-sm-6
. The styles as they were did a better job of preventing the radio button labels from wrapping. The only wrapping that occurred before was of the "Include percentage grades columns for all sets" label on the bottom, and that only happened for narrow windows and that didn't look that bad. I don't really thing the set names need that much width in most cases anyway.
In general, I don't think that the changes to this file look good at all. After scoring several sets this looks quite unbalanced. Here is a screenshot:
The hr
above the scoring results goes the entire width of the page, and also doesn't look right even if the scoring region isn't so wide.
I agreed with @drgrice1 about the footer on the scoring tools page, but other than that, this looks good. |
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 am not liking the new layout for the form on the scoring page.
I do like the lists for the set scoring file downloads though.
<%= $c->hidden_authen_fields =%> | ||
<%= hidden_field returning => 1 =%> | ||
<div class="row"> | ||
<div class="mb-2 col-6"> |
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.
The changes here and the wrapping row
and col
divs above make wrapping of the radio button labels even worse. Even with the shortened labels. I also don't like that the border is now flush up against the site nav. Generally, borders don't work very well on the div
's that are part of a bootstrap grid layout. You are probably going to need to add another div
inside grid layout div
's that contains the form, and put the border on that. The following screenshots are taken at the same window widths, the first with this pull request, and the second with the develop branch.
Also, I really don't like that you removed the sm
breakpoint from this. Below the sm
breakpoint (the xs
layout) is generally for mobile devices. Here is what things look like with this pull request compared to develop on an android device in Google Chrome:
Notice that selects behave differently on mobile devices, and it is better if this is not in the col
layout.
I added a pull request to this branch that fixes the things I mentioned in one way. |
Thanks for that, it's merged now and it looks better. Still accepting opinions if the footer should go back to being |
I am okay either way on that. The issue is that no matter what you choose, the footer will not always be aligned with whatever is directly above it (with the current layout -- see below). If there are no scoring files, then the scoring section below is not shown. If there are scoring files, then the data shown may be wide or narrow depending on the contents of the scoring file, and generally aligning the footer with that is completely impossible since One option would be to remove |
This had conflicts that I just resolved with a rebase and some editing. It was just about the presence of the word "at" in the footer for "Page generated ...". |
I never saw or used the I am not really sure why have two of these. Did only the Anyway suppose you select sets A, B, C, and check the box "Record scores for each set", and click to score. Next week you come back and you select only set C, and you do not check that box, and you score. The two files I'm not going to mess with any of this, but it seems like it needs attention. Possibly revisiting how many of the features here are useful and/or actually used. |
I tried this. It rarely applies the Another thing about this I was trying to do, is when the csv file being shown is not wide, having it artificially extend all the way to the right of the page seems wrong. The illusion of that happening is there now because I gave the |
This sets a default `footerWidthClass` stash value to `col-12` in the ContentGenerator `go` method. Any module or template can modify that as needed to match its layout. This is done in `templates/ContentGenerator/Instructor/Index.html.ep`, `templates/ContentGenerator/Instructor/Stats/index.html.ep`, and `templates/ContentGenerator/Problem.html.ep`. Note that this can also be done directly in the perl code for any package that derives from the ContentGenerator as well (i.e., in a `.pm` file). To do so call `$c->stash->{footerWidthClass} = '...'`. I have left the remaining pages for you to determine, since I am uncertain what you will want on some of them.
This puts the footer in a bootstrap row, and makes it a col-10 above the large breakpoint.
On large screens, the footer was looking too far to the right, imo. This generally nudges it a bit to the left.