-
Notifications
You must be signed in to change notification settings - Fork 31
Improve filter button #308
Improve filter button #308
Conversation
This moves the filter button to the right side of the filter bar. This was done so the filter button UI was attached to the actual filter UI, so the button affords closing and opening the side bar. This iteration doesn't include any animation. Animation would require some extra work.
…ove_filter_button
This was done to ensure this new show/hide filter button looks nice at all breakpoints an devices.
This is how it's looking at various breakpoints. @jenniferthibault @noahmanger, the position of the filter buttons breaks at the smallest breakpoint when its minified. It's running into the header below it. |
@msecret I'm working through some other tweaks to different elements on other screen sizes you've shown, but: |
…ove_filter_button
This looks way better. A couple other ideas:
|
On small screens I'm worried that the icon switching sides with the text might be kind of a weird jump. Is there a reason you had it like that? |
THANK YOU @noahmanger ! It made sense in my head when I was making it, but I didn't pause to review it when finished. For small screens, the icon is now on the left so that people read it (and hopefully get the signal) before they have to read the text. For large screens, since the text is moving left-right, the icon is on the right so that the words disappear & reveal in-sync with the animation. Does that make sense, or should they all be on the same side? cc @msecret — sorry for the confusion here. |
Nice. Yeah I think it makes sense to be on the right on large screens. I like it! |
@noahmanger @jenniferthibault , I just updated this, here are some new screens. |
This incorporated fixes such as positioning the button on various breakpoints, centering the paging content at the mobile breakpoints, ensuring the arrows on the hide/show filters button is always there and ensuring consistent borders and positioning.
Before the filter code had to be duplicated in two separate templates for candidates and committees. This moves it into a shared files that uses variables set by both parent templates to display the filters.
This only incorperates the design feedback on teh actual filter button not the other things about positioning. - Lining up filter button and result info box so they're aligned visually. - Keep the filter button the same color on hover so it fits nicely with the box it's part of. - Ensure result table's width is always a percentage so it's width lines up with the result info box above when the filter toggles. - Move apply filter button to the center at sm and md breakpoints.
We are adding animation to the side bar when it opens and closes to make the tranistion more seamless to the user.
…ove_filter_button
Jen recommended adding more padding to the filter box and table for the mobile view so it matches up with the padding for the header above it.
After discussion with Jen, we decided that the sorting icon would make more sense if right next to the text for the header rather the off to the right so they have a spacial connection to eachother.
Still left to do:
|
@@ -23,24 +23,144 @@ | |||
} | |||
|
|||
.side-panel { |
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 is my fault for the way this was originally implemented, but the glossary also has the .side-panel
class, so all of these style changes break it. We could either move them to .side-panel--left
or remove the .side-panel
class from the glossary. (They started out as similarly functioning things, so made sense for them to share some styles, but they're no pretty different so maybe it makes more sense to break them out).
margin-top: 1em; | ||
} | ||
|
||
&.side-panel--open { |
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.
Does this need to be nested or can it be moved up a level?
The styles for the side bar were breaking the style for the glossary side bar. This change moves the style rules so it only applies to the new side bar.
…ove_filter_button Conflicts: static/js/modules/tables.js
@@ -165,6 +165,7 @@ function initTable($table, $form, baseUrl, columns) { | |||
var $paging = $(api.table().container()).find('.results-info--top'); | |||
$paging.prepend($('#filter-toggle')); |
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 line needs to be removed. It's moving the button.
This moves the filter button to the right side of the filter bar. This
was done so the filter button UI was attached to the actual filter
UI, so the button affords closing and opening the side bar.
This iteration doesn't include any animation. Animation would require
some extra work.
Fixes #293