-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve usability mobile/tablet #664
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 took this a little further now. We still need to make sure it renders ok depending on the PRIME/EPA flavor, as well as just general cleanup of the code where appropriate.
I think this could work well, what do you think?
One other thought. We could also set an indeterminate state for the request session; if the browser width its less than 500 or something small, set to collapsed mode by default:
|
@casey1173 is this one ready? |
yeah, but I had trouble recreating that bug we saw this morning |
yeah, but I had trouble recreating that bug we saw this morning
Ok, would you mind describing the bug and I'll keep on the lookout for it
during my review?
|
Sure! When the sidebar was minimized the hamburger popup button disappeared, but there were still invisible links. This was on an assessment page (aka from the assessment_rooted page; the crumbless menu popup is meant to disappear when there are not any options to display). |
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.
LGTM - made a few minor comments, but please merge if you're happy w/ my changes!
@@ -16,6 +17,11 @@ const toggleSidebarCollapse = function(isCollapsed, submit) { | |||
if (document.getElementById("sidebar-container") === null) { | |||
return; | |||
} | |||
if ($("#sidebar-container").data("collapsed") == "empty") { | |||
if ($(document).width() < 500) { |
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.
changed to 576 and left a comment to why
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.
also changed word to unset
@@ -54,8 +54,8 @@ const setupAjax = document => { | |||
}; | |||
|
|||
$(document).ready(() => { | |||
sidebarStartup(); | |||
tryWebAppStartup(); | |||
setupAjax(document); |
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 moved setupAjax
to the beginning; should have been that way from the beginning...
@@ -6,6 +6,7 @@ const toggleSidebarCollapse = function(isCollapsed, submit) { | |||
.data("collapsed", isCollapsed) | |||
.toggleClass("sidebar-collapsed", isCollapsed); | |||
$("#toggle-sidebar").html(toggleText); | |||
$(".sidebar-link-holder").toggleClass("hidden"); |
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.
renamed to sidebar-link-dropdown
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.
also added the expected class value since we know it; makes it more deterministic
@casey1173 the JS got me thinking that we were replicating some CSS features - an alternative approach to this is ready for review in #672 |
Removes the authentication check for hiding the sidebar. This lets users (especially on mobile) hide the sidebar without needing to be logged in.